#include <geekos/io_defs.h>
+#include <geekos/vmm_stubs.h>
+
/* PAD this currently is in nvram.c */
/* JRL: This is completely broken
extern void deliver_timer_interrupt_to_vmm(uint_t period_us);
*/
volatile ulong_t g_numTicks;
-ulong_t clock_time(void){
- return g_numTicks;
-}
-
-
/*
* Number of times the spin loop can execute during one timer tick
*/
# define Debug(args...)
#endif
+ulong_t clock_time(void){//in millisec
+ return g_numTicks * (1000/HZ);
+}
+
/* ----------------------------------------------------------------------
* Private functions
* ---------------------------------------------------------------------- */
}
- /* JRL: Broken,
- deliver_timer_interrupt_to_vmm(1000000/HZ);
- */
+
+ send_tick_to_vmm(1000000/HZ);
+
End_IRQ(state);
}
KASSERT(!Interrupts_Enabled());
+ PrintBoth ("there\n");
+
if (timeEventCount == MAX_TIMER_EVENTS) {
return -1;
} else {