mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
Kernel: Ignore IRQ 15 for now
Sometimes QEMU hits us with an IRQ 15 and I don't know what it is. Just ignore it for now instead of crashing the system.
This commit is contained in:
parent
8b2280c374
commit
7d0583a33f
1 changed files with 9 additions and 7 deletions
|
@ -437,15 +437,16 @@ void flush_idt()
|
||||||
asm("lidt %0" ::"m"(s_idtr));
|
asm("lidt %0" ::"m"(s_idtr));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If an 8259 gets cranky, it'll generate a spurious IRQ7.
|
|
||||||
* ATM I don't have a clear grasp on when/why this happens,
|
|
||||||
* so I ignore them and assume it makes no difference.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern "C" void irq7_handler();
|
extern "C" void irq7_handler();
|
||||||
asm(
|
asm(
|
||||||
".globl irq7_handler \n"
|
".globl irq7_handler\n"
|
||||||
"irq7_handler: \n"
|
"irq7_handler:\n"
|
||||||
|
" iret\n");
|
||||||
|
|
||||||
|
extern "C" void irq15_handler();
|
||||||
|
asm(
|
||||||
|
".globl irq15_handler\n"
|
||||||
|
"irq15_handler:\n"
|
||||||
" iret\n");
|
" iret\n");
|
||||||
|
|
||||||
void idt_init()
|
void idt_init()
|
||||||
|
@ -475,6 +476,7 @@ void idt_init()
|
||||||
register_interrupt_handler(0x10, _exception16);
|
register_interrupt_handler(0x10, _exception16);
|
||||||
|
|
||||||
register_interrupt_handler(0x57, irq7_handler);
|
register_interrupt_handler(0x57, irq7_handler);
|
||||||
|
register_interrupt_handler(0x5f, irq15_handler);
|
||||||
|
|
||||||
for (u8 i = 0; i < 16; ++i) {
|
for (u8 i = 0; i < 16; ++i) {
|
||||||
s_irq_handler[i] = nullptr;
|
s_irq_handler[i] = nullptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue