2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
7 #include <boot/stage2.h>
12 #include <arch/timer.h>
15 static bigtime_t sTickRate
;
19 arch_timer_set_hardware_timer(bigtime_t timeout
)
26 new_val_64
= (timeout
* sTickRate
) / 1000000;
28 asm("mtdec %0" :: "r"((uint32
)new_val_64
));
33 arch_timer_clear_hardware_timer()
35 asm("mtdec %0" :: "r"(0x7fffffff));
40 arch_init_timer(kernel_args
*ka
)
42 sTickRate
= ka
->arch_args
.time_base_frequency
;