[kernel] Make unknown IRQs a warning, not a panic

There's not a good reason for them to panic the kernel, not even the
traceback in the panic will be useful.
This commit is contained in:
Justin C. Miller
2022-01-08 01:13:55 -08:00
parent 5083d3d13e
commit 6877944d17
2 changed files with 16 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
#include "idt.h"
#include "interrupts.h"
#include "io.h"
#include "log.h"
#include "memory.h"
#include "objects/process.h"
#include "printf/printf.h"
@@ -169,10 +170,8 @@ irq_handler(cpu_state *regs)
{
uint8_t irq = get_irq(regs->interrupt);
if (! device_manager::get().dispatch_irq(irq)) {
char message[100];
snprintf(message, sizeof(message),
"Unknown IRQ: %d (vec 0x%lx)", irq, regs->interrupt);
kassert(false, message);
log::warn(logs::irq, "Unknown IRQ: %d (vec 0x%lx)",
irq, regs->interrupt);
}
*reinterpret_cast<uint32_t *>(apic_eoi_addr) = 0;