diff options
author | Benji Dial <benji3.141@gmail.com> | 2020-05-24 21:55:12 -0400 |
---|---|---|
committer | Benji Dial <benji3.141@gmail.com> | 2020-05-24 21:55:12 -0400 |
commit | 021ea9b271f2144f7b16ae41a9236292dea7897d (patch) | |
tree | 77bae3af854f9ff1fb0298ae1f71b1395a392cc1 /src/kernel/panic.c | |
parent | 02f14113cbf14c6f842fb43ecbc68d0c851ef3b0 (diff) | |
download | portland-os-021ea9b271f2144f7b16ae41a9236292dea7897d.tar.gz |
basic fs type stuff, fat16, removing stack segment and using data segment
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 |