mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Early-out earlier for ignored interrupts
I was seeing more ignored interrupts when debugging, trying to shorten their path more. Adding a separate ISR for ignored interrupts was the shortest path, but that caused some strange instability that I'm not in the mood to track down.
This commit is contained in:
@@ -241,7 +241,6 @@ ISR (0xe0, 0, isrTimer)
|
|||||||
ISR (0xe1, 0, isrLINT0)
|
ISR (0xe1, 0, isrLINT0)
|
||||||
ISR (0xe2, 0, isrLINT1)
|
ISR (0xe2, 0, isrLINT1)
|
||||||
ISR (0xe3, 0, isrAPICError)
|
ISR (0xe3, 0, isrAPICError)
|
||||||
ISR (0xe4, 0, isrAssert)
|
|
||||||
|
|
||||||
ISR (0xef, 0, isrSpurious)
|
ISR (0xef, 0, isrSpurious)
|
||||||
|
|
||||||
|
|||||||
@@ -83,8 +83,11 @@ disable_legacy_pic()
|
|||||||
void
|
void
|
||||||
isr_handler(cpu_state *regs)
|
isr_handler(cpu_state *regs)
|
||||||
{
|
{
|
||||||
console *cons = console::get();
|
|
||||||
uint8_t vector = regs->interrupt & 0xff;
|
uint8_t vector = regs->interrupt & 0xff;
|
||||||
|
if ((vector & 0xf0) == 0xf0) {
|
||||||
|
*reinterpret_cast<uint32_t *>(apic_eoi_addr) = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Clear out the IST for this vector so we just keep using
|
// Clear out the IST for this vector so we just keep using
|
||||||
// this stack
|
// this stack
|
||||||
@@ -169,31 +172,6 @@ isr_handler(cpu_state *regs)
|
|||||||
// No EOI for the spurious interrupt
|
// No EOI for the spurious interrupt
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case isr::isrIgnore0:
|
|
||||||
case isr::isrIgnore1:
|
|
||||||
case isr::isrIgnore2:
|
|
||||||
case isr::isrIgnore3:
|
|
||||||
case isr::isrIgnore4:
|
|
||||||
case isr::isrIgnore5:
|
|
||||||
case isr::isrIgnore6:
|
|
||||||
case isr::isrIgnore7:
|
|
||||||
//cons->printf("\nIGNORED: %02x\n", regs->interrupt);
|
|
||||||
outb(PIC1, 0x20);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case isr::isrIgnore8:
|
|
||||||
case isr::isrIgnore9:
|
|
||||||
case isr::isrIgnoreA:
|
|
||||||
case isr::isrIgnoreB:
|
|
||||||
case isr::isrIgnoreC:
|
|
||||||
case isr::isrIgnoreD:
|
|
||||||
case isr::isrIgnoreE:
|
|
||||||
case isr::isrIgnoreF:
|
|
||||||
//cons->printf("\nIGNORED: %02x\n", regs->interrupt);
|
|
||||||
outb(PIC1, 0x20);
|
|
||||||
outb(PIC2, 0x20);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
snprintf(message, sizeof(message), "Unknown interrupt 0x%x", regs->interrupt);
|
snprintf(message, sizeof(message), "Unknown interrupt 0x%x", regs->interrupt);
|
||||||
kassert(false, message);
|
kassert(false, message);
|
||||||
|
|||||||
Reference in New Issue
Block a user