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

Function mips_timer_init_params

freebsd/mips/nlm/tick.c:143–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 6

platform_startFunction · 0.70
platform_startFunction · 0.50
platform_startFunction · 0.50
platform_startFunction · 0.50
platform_startFunction · 0.50
platform_startFunction · 0.50

Calls 1

set_cputickerFunction · 0.85

Tested by

no test coverage detected