struct vm_device * thedev = NULL;
+/*JRL: A hack and a fatal bug
static struct vm_device * demultiplex_timer_interrupt(uint_t period_us)
{
// hack
return thedev;
}
-
+*/
+/* JRL: Doesn't work
struct bcd_num {
uchar_t bot : 4;
uchar_t top : 4;
}
}
+*/
-
-
+/* JRL: This is completely broken...
void deliver_timer_interrupt_to_vmm(uint_t period_us)
{
struct vm_device * dev = demultiplex_timer_interrupt(period_us);
}
}
-
+*/
static int set_nvram_defaults(struct vm_device * dev)
{
#include <geekos/io_defs.h>
/* PAD this currently is in nvram.c */
+/* JRL: This is completely broken
extern void deliver_timer_interrupt_to_vmm(uint_t period_us);
+*/
/* JRL Add a cpu frequency measurement */
uint_t cpu_khz_freq;
}
-
+ /* JRL: Broken,
deliver_timer_interrupt_to_vmm(1000000/HZ);
-
+ */
End_IRQ(state);
}
PrintDebug("[v3_lower_irq]\n");
- // if ((info->intr_state.controller) &&
- // (info->intr_state.controller->raise_intr)) {
+ if ((info->intr_state.controller) &&
+ (info->intr_state.controller->raise_intr)) {
info->intr_state.controller->lower_intr(info->intr_state.controller_state, irq);
- //} else {
- // PrintDebug("There is no registered Interrupt Controller... (NULL POINTER)\n");
- // return -1;
- //}
+ } else {
+ PrintDebug("There is no registered Interrupt Controller... (NULL POINTER)\n");
+ return -1;
+ }
+
return 0;
}
PrintDebug("[v3_raise_irq]\n");
- // if ((info->intr_state.controller) &&
- // (info->intr_state.controller->raise_intr)) {
+ if ((info->intr_state.controller) &&
+ (info->intr_state.controller->raise_intr)) {
info->intr_state.controller->raise_intr(info->intr_state.controller_state, irq);
- //} else {
- // PrintDebug("There is no registered Interrupt Controller... (NULL POINTER)\n");
- // return -1;
- //}
+ } else {
+ PrintDebug("There is no registered Interrupt Controller... (NULL POINTER)\n");
+ return -1;
+ }
+
return 0;
}