diff options
Diffstat (limited to 'src/kernel/panic.c')
-rw-r--r-- | src/kernel/panic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kernel/panic.c b/src/kernel/panic.c index 49d4a27..a463a2a 100644 --- a/src/kernel/panic.c +++ b/src/kernel/panic.c @@ -4,6 +4,7 @@ #include "util.h" void halt() { + vga_printsz("\n\nHalting..."); while (1) asm volatile ("hlt"); } @@ -20,12 +21,12 @@ void panic(uint8_t *message) { vga_printsz("\n\nStack trace:"); uint8_t stb[6]; while (1) { - uint32_t ip = *(uint32_t *)(0x38000 + frame + 4); + uint32_t ip = *((uint32_t *)frame + 1); if (!ip) halt(); vga_printsz("\n 0x"); u16_hex(ip - 0x30000 - 5, stb);//assumes would return to just after a call instruction vga_printsz(stb); - frame = *(uint32_t *)(0x38000 + frame); + frame = *(uint32_t *)frame; } }
\ No newline at end of file |