From 162d024a53e1e31e00ff0b6f47dd4590edebc551 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 9 Aug 2020 16:51:01 +0200 Subject: Heavy restructuring of libc, kernel and apps --- kernel/main.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 kernel/main.c (limited to 'kernel/main.c') diff --git a/kernel/main.c b/kernel/main.c new file mode 100644 index 0000000..17d6267 --- /dev/null +++ b/kernel/main.c @@ -0,0 +1,50 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +u32 HEAP = 0x00200000; +u32 HEAP_START; + +void kernel_main(struct vid_info *vid_info) +{ + HEAP_START = HEAP; // For malloc function + + // Initialize VESA video + vesa_init(vid_info->info); + u32 terminal_background[3] = { 0, 0, 0 }; + vesa_fill(terminal_background); + + // Serial connection + serial_install(); + serial_print("\nConnected.\n"); + + // Install drivers + interrupts_install(); + timer_install(); + keyboard_install(); + + // Enable drivers + sti(); + + ls_root(); + gui_init(FONT_PATH); + + gui_term_write("Wake up, " USERNAME "...\n"); + + syscall_init(); + proc_init(); + + idle(); +} -- cgit v1.2.3