summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
deleted file mode 100644
index 7382a7d..0000000
--- a/kernel/kernel.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <comus/cpu.h>
-#include <comus/memory.h>
-#include <comus/mboot.h>
-#include <comus/drivers.h>
-#include <comus/fs.h>
-#include <lib.h>
-#include <stdio.h>
-#include <time.h>
-
-struct memory_map mmap;
-
-void main(long magic, volatile void *mboot)
-{
- (void)magic; // TODO: check multiboot magic
-
- // initalize idt and pic
- // WARNING: must be done before anything else
- cpu_init();
-
- // load memory map
- mboot_load_mmap(mboot, &mmap);
-
- // initalize memory
- memory_init(&mmap);
-
- // initalize devices
- drivers_init();
-
- // load file systems
- fs_init();
-
- // print current time
- char date[40];
- set_timezone(TZ_EDT);
- time_t time = get_localtime();
- timetostr(&time, "%a %b %d %Y %H:%M:%S", date, 40);
- printf("The date is: %s\n\n", date);
-
- // halt
- printf("halting...\n");
-}