1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-20 11:16:10 -05:00

Send an EOI (end of interrupt) signal to the PICs

This commit is contained in:
Braiden Vasco 2017-11-03 03:25:01 +00:00
parent 3eb3c34275
commit 75cb1f9ecc

View file

@ -1,4 +1,5 @@
#include "config.h"
#include "asm.h"
#include "logger.h"
struct IsrRegisters {
@ -36,6 +37,16 @@ void hwint_handler(struct IsrRegisters regs)
return;
}
// Send an EOI (end of interrupt) signal to the PICs
if (regs.int_no >= 40) { // TODO: hardcoded
// Send reset signal to slave
outb(0xA0, 0x20);
}
// Send reset signal to master
outb(0x20, 0x20);
const unsigned char hwint_no = regs.int_no - INT_HWINT_FIRST;
logger_warn(messages[hwint_no]);