Send EOI to PIC when we're done with a hardware interrupt

This commit is contained in:
Eryn Wells 2016-03-13 15:55:40 -04:00
parent 5e2c89e588
commit 2424ecaa30
2 changed files with 12 additions and 0 deletions

View file

@ -89,6 +89,13 @@ InterruptHandler::postInterrupt(uint8_t interrupt)
asm("int %0": : "a"(interrupt));
}
void
InterruptHandler::finishHardwareInterrupt(uint8_t irq)
{
mPIC.endOfInterrupt(irq);
}
} /* namespace x86 */
@ -143,4 +150,7 @@ handleKeyboardInterrupt()
{
auto& console = kernel::Console::systemConsole();
console.printString("Key!\n");
auto& interruptHandler = x86::InterruptHandler::systemInterruptHandler();
interruptHandler.finishHardwareInterrupt(1);
}

View file

@ -57,6 +57,8 @@ struct InterruptHandler
void postInterrupt(uint8_t interrupt);
void finishHardwareInterrupt(uint8_t irq);
private:
PIC mPIC;
IDT mIDT;