From d2fd3b2ec2c265eb9ed3bdcc1db3e4c3feee3846 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Thu, 28 Mar 2013 09:34:23 -0500 Subject: x86: changes to apic, keyboard It is possible that operating system wants to shutdown the lapic timer by writing timer's initial count to 0. This patch adds a check that the timer event is only scheduled if the count is 0. The patch also converts few of the panics related to the keyboard to warnings since we are any way not interested in simulating the keyboard. --- src/arch/x86/interrupts.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/arch/x86') diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc index 9983d7305..ad9d483c7 100644 --- a/src/arch/x86/interrupts.cc +++ b/src/arch/x86/interrupts.cc @@ -597,9 +597,10 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val) curTick() + (newCount + 1) * clockPeriod() - offset, true); } else { - reschedule(apicTimerEvent, - curTick() + newCount * - clockPeriod(), true); + if (newCount) + reschedule(apicTimerEvent, + curTick() + newCount * + clockPeriod(), true); } } break; -- cgit v1.2.3