X86: Mask the PIC at startup to avoid a glitch which causes an NMI.
This commit is contained in:
parent
25e223c30f
commit
e174239bd8
2 changed files with 19 additions and 2 deletions
|
@ -39,8 +39,6 @@
|
||||||
namespace X86ISA
|
namespace X86ISA
|
||||||
{
|
{
|
||||||
|
|
||||||
class I82094AA;
|
|
||||||
|
|
||||||
class I8259 : public BasicPioDevice, public IntDev
|
class I8259 : public BasicPioDevice, public IntDev
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
@ -94,6 +92,18 @@ class I8259 : public BasicPioDevice, public IntDev
|
||||||
Tick read(PacketPtr pkt);
|
Tick read(PacketPtr pkt);
|
||||||
Tick write(PacketPtr pkt);
|
Tick write(PacketPtr pkt);
|
||||||
|
|
||||||
|
void
|
||||||
|
maskAll()
|
||||||
|
{
|
||||||
|
IMR = 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unmaskAll()
|
||||||
|
{
|
||||||
|
IMR = 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
void signalInterrupt(int line);
|
void signalInterrupt(int line);
|
||||||
void raiseInterruptPin(int number);
|
void raiseInterruptPin(int number);
|
||||||
void lowerInterruptPin(int number);
|
void lowerInterruptPin(int number);
|
||||||
|
|
|
@ -107,6 +107,13 @@ Pc::init()
|
||||||
entry.vector = 0x30;
|
entry.vector = 0x30;
|
||||||
ioApic.writeReg(0x30, entry.bottomDW);
|
ioApic.writeReg(0x30, entry.bottomDW);
|
||||||
ioApic.writeReg(0x31, entry.topDW);
|
ioApic.writeReg(0x31, entry.topDW);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mask the PICs. I'm presuming the BIOS/bootloader would have cleared
|
||||||
|
* these out and masked them before passing control to the OS.
|
||||||
|
*/
|
||||||
|
southBridge->pic1->maskAll();
|
||||||
|
southBridge->pic2->maskAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
Tick
|
Tick
|
||||||
|
|
Loading…
Reference in a new issue