From d47e627d0006e038dcd1c34b9015c3370f7b4b0c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 2 Mar 2021 23:34:39 +0100 Subject: Getting closer! --- kernel/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kernel/main.c') diff --git a/kernel/main.c b/kernel/main.c index b46db0d..2e2e030 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,10 @@ struct vid_info *boot_passed; void kernel_main(struct mem_info *mem_info, struct vid_info *vid_info); // Decl void kernel_main(struct mem_info *mem_info, struct vid_info *vid_info) { + // Clear stack + for (u32 i = 0; i < STACK_SIZE; i++) + ((u8 *)STACK_START)[-i] = 0; + // Serial connection serial_install(); serial_print("\nKernel was compiled at " __TIME__ " on " __DATE__ "\n"); -- cgit v1.2.3