summaryrefslogtreecommitdiff
path: root/stage3/main.c
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2023-12-19 09:19:43 +0100
committerLizzy Fleckenstein <lizzy@vlhl.dev>2023-12-19 09:24:31 +0100
commit3102878c86c810c0bf877d72aceefeb28a44271d (patch)
treeb6232392ff6dc2903567a79828b4a713ababc76f /stage3/main.c
parenta6b460d3b1b0909e0c7b388f1a55365bf24c6b7b (diff)
downloadcuddles-3102878c86c810c0bf877d72aceefeb28a44271d.tar.xz
improve debugging
Diffstat (limited to 'stage3/main.c')
-rw-r--r--stage3/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/stage3/main.c b/stage3/main.c
index 10fde84..c2ae4c8 100644
--- a/stage3/main.c
+++ b/stage3/main.c
@@ -12,6 +12,8 @@
#include "ps2.h"
#include "thread.h"
#include "shell.h"
+#include "fs.h"
+#include "gfx.h"
char keymap[256] = { '\0' };
@@ -53,6 +55,9 @@ void keyboard_handler()
}
}
+str dbg_map = NILS;
+str dbg_disas = NILS;
+
void kmain()
{
heap_init();
@@ -97,6 +102,12 @@ void kmain()
print(S("\n"));
}
+ print(S("gfx framebuffer at "));
+ print_hex(gfx_info->framebuffer);
+ print(S("-"));
+ print_hex((u64) gfx_info->framebuffer + gfx_info->pitch * gfx_info->height);
+ print(S("\n"));
+
interrupts_init();
pic_init();
thread_init();
@@ -104,6 +115,9 @@ void kmain()
ata_init();
ps2_init();
+ dbg_map = fs_read(S("dbg/kernel.map"));
+ dbg_disas = fs_read(S("dbg/kernel.dis.asm"));
+
shell_run_cmd(S("run init"));
thread *keyboard_thread = thread_create(S("keyboard"), &keyboard_handler);