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.
This commit is contained in:
parent
433cab9d95
commit
d2fd3b2ec2
2 changed files with 9 additions and 6 deletions
|
@ -597,9 +597,10 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val)
|
||||||
curTick() + (newCount + 1) *
|
curTick() + (newCount + 1) *
|
||||||
clockPeriod() - offset, true);
|
clockPeriod() - offset, true);
|
||||||
} else {
|
} else {
|
||||||
reschedule(apicTimerEvent,
|
if (newCount)
|
||||||
curTick() + newCount *
|
reschedule(apicTimerEvent,
|
||||||
clockPeriod(), true);
|
curTick() + newCount *
|
||||||
|
clockPeriod(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -411,10 +411,12 @@ X86ISA::I8042::write(PacketPtr pkt)
|
||||||
case ReadOutputPort:
|
case ReadOutputPort:
|
||||||
panic("i8042 \"Read output port\" command not implemented.\n");
|
panic("i8042 \"Read output port\" command not implemented.\n");
|
||||||
case WriteOutputPort:
|
case WriteOutputPort:
|
||||||
panic("i8042 \"Write output port\" command not implemented.\n");
|
warn("i8042 \"Write output port\" command not implemented.\n");
|
||||||
|
lastCommand = WriteOutputPort;
|
||||||
case WriteKeyboardOutputBuff:
|
case WriteKeyboardOutputBuff:
|
||||||
panic("i8042 \"Write keyboard output buffer\" "
|
warn("i8042 \"Write keyboard output buffer\" "
|
||||||
"command not implemented.\n");
|
"command not implemented.\n");
|
||||||
|
lastCommand = WriteKeyboardOutputBuff;
|
||||||
case WriteMouseOutputBuff:
|
case WriteMouseOutputBuff:
|
||||||
DPRINTF(I8042, "Got command to write to mouse output buffer.\n");
|
DPRINTF(I8042, "Got command to write to mouse output buffer.\n");
|
||||||
lastCommand = WriteMouseOutputBuff;
|
lastCommand = WriteMouseOutputBuff;
|
||||||
|
@ -432,7 +434,7 @@ X86ISA::I8042::write(PacketPtr pkt)
|
||||||
case SystemReset:
|
case SystemReset:
|
||||||
panic("i8042 \"System reset\" command not implemented.\n");
|
panic("i8042 \"System reset\" command not implemented.\n");
|
||||||
default:
|
default:
|
||||||
panic("Write to unknown i8042 "
|
warn("Write to unknown i8042 "
|
||||||
"(keyboard controller) command port.\n");
|
"(keyboard controller) command port.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue