Send EOI to PIC when we're done with a hardware interrupt
This commit is contained in:
parent
5e2c89e588
commit
2424ecaa30
2 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -57,6 +57,8 @@ struct InterruptHandler
|
|||
|
||||
void postInterrupt(uint8_t interrupt);
|
||||
|
||||
void finishHardwareInterrupt(uint8_t irq);
|
||||
|
||||
private:
|
||||
PIC mPIC;
|
||||
IDT mIDT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue