1 INTERFACE [hpet_timer]:
11 IMPLEMENTATION [hpet_timer]:
20 #include "std_macros.h"
35 hpet_irq = Hpet::int_num();
36 if (hpet_irq == 0 && Hpet::int_avail(2))
39 if (Config::scheduler_one_shot)
45 // setup hpet for periodic here
48 if (!Config::scheduler_one_shot)
49 // from now we can save energy in getchar()
50 Config::getchar_does_hlt_works_ok = Config::hlt_works_ok;
53 Irq_chip::hw_chip->setup(&ib, hpet_irq);
59 printf("Using HPET timer on IRQ %d (%s Mode) for scheduling\n",
61 Config::scheduler_one_shot ? "One-Shot" : "Periodic");
64 IMPLEMENT inline int Timer::irq_line() { return hpet_irq; }
66 IMPLEMENT inline NEEDS["irq_pin.h"]
73 IMPLEMENT inline NEEDS["hpet.h", "irq_pin.h"]
81 IMPLEMENT inline NEEDS["hpet.h", "irq_pin.h"]
85 Hpet::disable_timer();
91 Timer::update_one_shot(Unsigned64 /*wakeup*/)
97 Timer::update_timer(Unsigned64 /*wakeup*/)