summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c42
1 files changed, 14 insertions, 28 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index c260e80..f4e440f 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -2,6 +2,9 @@
#include "console.h" // this will allow us to write to screen
#include "x86.h"
+#include "../lib/logger/log.h" // logger facilities
+#define FOOLOS_MODULE_NAME "kernel"
+
// TODO: cleanup . how can i compile it without the includes!??
///////
@@ -22,7 +25,7 @@ void int_test_handler()
{
X86_IRQ_BEGIN
- scr_put_string("inside software interrupt handler 88");
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"inside interrupt handler 88");
sleep(30);
X86_IRQ_END
@@ -50,27 +53,24 @@ void kernel_main()
// is integrated in the kernel image.
//
vesa_init(0x8300,0x8400,0x7200);
- while(1); // never ending loop
- // clear console
-//! scr_clear();
-
- // hello message
-//! scr_put_string_nl(KERNEL_HELLO_MESSAGE);
-//! scr_put_string_nl("");
+ //
+ // Now Fool OS can say hello :)
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,KERNEL_HELLO_MESSAGE);
- //pit config
+ //
+ // PIT config (timer)
timer_init();
- // we know that here the bootloader placed the mamory map!
-//! mem_init(0x7c00+0x400,*((uint16_t *)(0x7c00+0x600)));
- mem_init(0x9000);
-
+ // we know that here, the bootloader placed the mamory map!
+ mem_init(0x7c00+0x400,*((uint16_t *)(0x7c00+0x600)));
+
// paging (Todo)
- vmem_init();
+ //vmem_init();
// init and interrupt decriptor table
int_init(0x08);
+
int_install();
// setup custom interrupts
@@ -95,7 +95,6 @@ void kernel_main()
// now we can enable interrupts back again
int_enable();
-//! scr_put_string_nl("interrupts: Interrupts are up and running");
// pci
pci_init();
@@ -103,22 +102,9 @@ void kernel_main()
// floppy
floppy_init();
-//! scr_put_string_nl("");
-
-
//init shell
shell_init();
- // kernel main loop
-
-// while(1)
- // {
- //}
-
- // put some text on monitor!
-
-
-
while(1); // never ending loop