fixing exception logic

This commit is contained in:
Liam Kerr 2026-02-10 13:53:36 +00:00
parent 7e7a7fcd3b
commit 780a059c77

View file

@ -71,7 +71,7 @@ void handle_trap()
// fault address (if applicable)
uintptr_t mtval;
asm volatile("csrr %0, mtval" : "=r"(mtval));
kprintf("Faulting Address (if applicable): %x\n", mtval);
switch (cause)
{
case 0:
@ -99,10 +99,9 @@ void handle_trap()
kpanic("Reason: Store/AMO Access Fault\n");
break;
default:
break;
kpanic("Reason: Unknown Exception Code %d\n", cause);
break;
}
kprintf("Faulting Address (if applicable): %x\n", mtval);
}
}