From: Jack Lange Date: Thu, 2 Oct 2008 21:59:57 +0000 (-0500) Subject: trying to deal with nvram bug, disabled for now X-Git-Tag: 1.0~3^2~17^2~1 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=963271f089c8da043d1c0f5d1549f13f794a4c6b trying to deal with nvram bug, disabled for now --- diff --git a/palacios/src/devices/nvram.c b/palacios/src/devices/nvram.c index da76b67..6c2b9ec 100644 --- a/palacios/src/devices/nvram.c +++ b/palacios/src/devices/nvram.c @@ -117,12 +117,14 @@ struct rtc_statd { 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; @@ -406,9 +408,9 @@ static void update_time(struct vm_device *dev, uint_t period_us) } } +*/ - - +/* JRL: This is completely broken... void deliver_timer_interrupt_to_vmm(uint_t period_us) { struct vm_device * dev = demultiplex_timer_interrupt(period_us); @@ -418,7 +420,7 @@ void deliver_timer_interrupt_to_vmm(uint_t period_us) } } - +*/ static int set_nvram_defaults(struct vm_device * dev) { diff --git a/palacios/src/geekos/timer.c b/palacios/src/geekos/timer.c index 9a54ff2..e287b6e 100644 --- a/palacios/src/geekos/timer.c +++ b/palacios/src/geekos/timer.c @@ -23,7 +23,9 @@ #include /* 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; @@ -217,9 +219,9 @@ static void Timer_Interrupt_Handler(struct Interrupt_State* state) } - + /* JRL: Broken, deliver_timer_interrupt_to_vmm(1000000/HZ); - + */ End_IRQ(state); } diff --git a/palacios/src/palacios/vmm_intr.c b/palacios/src/palacios/vmm_intr.c index 242d63b..431b58c 100644 --- a/palacios/src/palacios/vmm_intr.c +++ b/palacios/src/palacios/vmm_intr.c @@ -149,13 +149,14 @@ int v3_lower_irq(struct guest_info * info, int irq) { 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; } @@ -167,13 +168,14 @@ int v3_raise_irq(struct guest_info * info, int irq) { 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; }