diff --git a/arch/i386/interrupt.c b/arch/i386/interrupt.c index 800c18c..98ce0e0 100644 --- a/arch/i386/interrupt.c +++ b/arch/i386/interrupt.c @@ -222,6 +222,8 @@ void irq6_handler(void) { /* LPT1 (Parallel Port)/Primary PIC Spurious Interrupts */ void irq7_handler(void) { + outb(0x20, 0x0b); + if(inb(0x20) & 0x80) { return; } /* Spurious interrupt */ outb(0x20, 0x20); /* Don't send this for spurious interrupts */ } @@ -269,6 +271,10 @@ void irq14_handler(void) { /* Secondary ATA Hard Drive/Secondary PIC Spurious Interrupt */ void irq15_handler(void) { - outb(0xA0, 0x20); + outb(0xA0, 0x0b); + if(!(inb(0xA0) & 0x80)) { + /* Not spurious. Do stuff here! */ + outb(0xA0, 0x20); + } outb(0x20, 0x20); }