Better interrupt messages
This commit is contained in:
parent
44bbfd99ce
commit
121858ee31
@ -57,9 +57,26 @@ registers *int_handler(registers *r)
|
|||||||
{
|
{
|
||||||
if(int_handlers[r->int_no])
|
if(int_handlers[r->int_no])
|
||||||
return int_handlers[r->int_no](r);
|
return int_handlers[r->int_no](r);
|
||||||
debug_error("Unhandled interrupt occurred\n");
|
if(r->int_no < IRQ_BASE)
|
||||||
debug_error("Interrupt number: %d, Error code: %d\n", r->int_no, r->err_code);
|
{
|
||||||
PANIC("Unhandled interrupt");
|
debug_error("UNHANDLED EXCEPTION\n");
|
||||||
//for(;;);
|
switch(r->int_no) {
|
||||||
|
case 14:
|
||||||
|
debug_error("Page fault\n");
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
debug_error("Invalid opcode\n");
|
||||||
|
}
|
||||||
|
debug_error("Interrupt number: %d, Error code: %d\n", r->int_no, r->err_code);
|
||||||
|
PANIC("Unhandled interrupt\n");
|
||||||
|
} else if(r->int_no < IRQ_BASE + MAX_IRQS) {
|
||||||
|
debug_error("UNHANDLED IRQ\n");
|
||||||
|
debug_error("IRQ: %d", r->int_no - IRQ_BASE);
|
||||||
|
PANIC("Unhandled IRQ\n");
|
||||||
|
} else {
|
||||||
|
debug_error("UNKNOWN INTERRUPT\n");
|
||||||
|
debug_error("Interrupt number: %d\n", r->int_no);
|
||||||
|
PANIC("Unknown interrupt\n");
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user