summaryrefslogtreecommitdiff
path: root/src/kernel/panic.c
diff options
context:
space:
mode:
authorBenji Dial <benji3.141@gmail.com>2020-05-24 21:55:12 -0400
committerBenji Dial <benji3.141@gmail.com>2020-05-24 21:55:12 -0400
commit021ea9b271f2144f7b16ae41a9236292dea7897d (patch)
tree77bae3af854f9ff1fb0298ae1f71b1395a392cc1 /src/kernel/panic.c
parent02f14113cbf14c6f842fb43ecbc68d0c851ef3b0 (diff)
downloadportland-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.c5
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