MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mips_timer_init_params

Function mips_timer_init_params

freebsd/mips/mips/tick.c:142–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void
143mips_timer_init_params(uint64_t platform_counter_freq, int double_count)
144{
145
146 /*
147 * XXX: Do not use printf here: uart code 8250 may use DELAY so this
148 * function should be called before cninit.
149 */
150 counter_freq = platform_counter_freq;
151 /*
152 * XXX: Some MIPS32 cores update the Count register only every two
153 * pipeline cycles.
154 * We know this because of status registers in CP0, make it automatic.
155 */
156 if (double_count != 0)
157 counter_freq /= 2;
158
159 cycles_per_usec = counter_freq / (1 * 1000 * 1000);
160 set_cputicker(tick_ticker, counter_freq, 1);
161}
162
163static int
164sysctl_machdep_counter_freq(SYSCTL_HANDLER_ARGS)

Callers 2

platform_startFunction · 0.50
platform_startFunction · 0.50

Calls 1

set_cputickerFunction · 0.85

Tested by

no test coverage detected