summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 224f98b..486ec19 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -4,6 +4,7 @@
#error "Watchout! this is not Linux but FoolOS. Use a cross-compiler"
#endif
+
#include "kernel.h"
#include <stdint.h>
@@ -17,6 +18,7 @@
#include "interrupts.h"
#include "multiboot.h"
+
#include "console.h"
#include <stddef.h>
@@ -32,25 +34,21 @@ void kernel_main(uint32_t eax,uint32_t ebx)
//
// Init Console
//
-
- uint32_t physbase=console_init(0,0);
+ console_init();
//
// PR
//
-
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%s - compiled on %s at %s",KERNEL_VERSION,__DATE__,__TIME__);
//
// Configuring the PIT timer.
//
-
timer_init();
//
// Process Multiboot Header
//
-
multiboot_information *info=get_multiboot(eax, ebx);
//
@@ -59,32 +57,12 @@ void kernel_main(uint32_t eax,uint32_t ebx)
// after this is set up we will be able to allocate and deallocate
// blocks of physical memory :)
//
- // we know that here, the bootloader placed the memory map and
- // its length
- //
- mem_init(info); //info->mmap_addr,info->mmap_length);
-
- //
- // Video TODO
- //
-
- /*
- log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"VBE Info: 0x%04X (0x%08X 0x%08X)",info->vbe_mode,info->vbe_control_info, info->vbe_mode_info);
- vbeinfo *vbe=info->vbe_mode_info;
- //log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%c%c",'X',vbe->VbeSignature[0]);
- uint16_t VbeVersion; // == 0x0300 for VBE 3.0
- uint16_t OemStringPtr[2]; // isa vbeFarPtr
- uint8_t Capabilities[4];
- uint16_t VideoModePtr[2]; // isa vbeFarPtr
- uint16_t TotalMemory; // as # of 64KB blocks
- */
-
+ mem_init(info);
//
// Activate Virtual Memory (paging)
//
- pdirectory *dir=vmem_init(physbase);
-
+ pdirectory *dir=vmem_init(0);
//
@@ -93,8 +71,6 @@ void kernel_main(uint32_t eax,uint32_t ebx)
int_init(0x08);
- while(1);
-
//
// Scan the PCI Bus