mirror of
https://github.com/tailix/kernel.git
synced 2024-10-30 12:03:52 -04:00
Send an EOI (end of interrupt) signal to the PICs
This commit is contained in:
parent
3eb3c34275
commit
75cb1f9ecc
1 changed files with 11 additions and 0 deletions
11
arch/hwint.c
11
arch/hwint.c
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue