aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.c
diff options
context:
space:
mode:
authorMarvin Borner2021-03-02 23:34:39 +0100
committerMarvin Borner2021-03-02 23:34:39 +0100
commitd47e627d0006e038dcd1c34b9015c3370f7b4b0c (patch)
tree5091e41c0d14f06ee345e7fd965044b2028b4dbb /kernel/main.c
parent557cb0919118624eacbe4bb95de7bd6b4decab91 (diff)
Getting closer!
Diffstat (limited to 'kernel/main.c')
-rw-r--r--kernel/main.c5
1 files changed, 5 insertions, 0 deletions
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 <interrupts.h>
#include <keyboard.h>
#include <load.h>
+#include <mem.h>
#include <mm.h>
#include <mouse.h>
#include <net.h>
@@ -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");