[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:
@@ -1,15 +1,16 @@
|
|||||||
LOG(apic, info);
|
LOG(apic, info);
|
||||||
LOG(device, debug);
|
|
||||||
LOG(paging, info);
|
|
||||||
LOG(driver, info);
|
|
||||||
LOG(memory, debug);
|
|
||||||
LOG(fs, info);
|
|
||||||
LOG(task, info);
|
|
||||||
LOG(sched, info);
|
|
||||||
LOG(loader, debug);
|
|
||||||
LOG(boot, debug);
|
LOG(boot, debug);
|
||||||
LOG(syscall,info);
|
|
||||||
LOG(vmem, debug);
|
|
||||||
LOG(objs, debug);
|
|
||||||
LOG(timer, debug);
|
|
||||||
LOG(clock, debug);
|
LOG(clock, debug);
|
||||||
|
LOG(device, debug);
|
||||||
|
LOG(driver, info);
|
||||||
|
LOG(fs, info);
|
||||||
|
LOG(irq, info);
|
||||||
|
LOG(loader, debug);
|
||||||
|
LOG(memory, debug);
|
||||||
|
LOG(objs, debug);
|
||||||
|
LOG(paging, info);
|
||||||
|
LOG(sched, info);
|
||||||
|
LOG(syscall,info);
|
||||||
|
LOG(task, debug);
|
||||||
|
LOG(timer, debug);
|
||||||
|
LOG(vmem, debug);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "idt.h"
|
#include "idt.h"
|
||||||
#include "interrupts.h"
|
#include "interrupts.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
#include "log.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "objects/process.h"
|
#include "objects/process.h"
|
||||||
#include "printf/printf.h"
|
#include "printf/printf.h"
|
||||||
@@ -169,10 +170,8 @@ irq_handler(cpu_state *regs)
|
|||||||
{
|
{
|
||||||
uint8_t irq = get_irq(regs->interrupt);
|
uint8_t irq = get_irq(regs->interrupt);
|
||||||
if (! device_manager::get().dispatch_irq(irq)) {
|
if (! device_manager::get().dispatch_irq(irq)) {
|
||||||
char message[100];
|
log::warn(logs::irq, "Unknown IRQ: %d (vec 0x%lx)",
|
||||||
snprintf(message, sizeof(message),
|
irq, regs->interrupt);
|
||||||
"Unknown IRQ: %d (vec 0x%lx)", irq, regs->interrupt);
|
|
||||||
kassert(false, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*reinterpret_cast<uint32_t *>(apic_eoi_addr) = 0;
|
*reinterpret_cast<uint32_t *>(apic_eoi_addr) = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user