diff options
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index e7bef1d..e37f76f 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -13,6 +13,7 @@ #include "vmem.h" //-- clean below headers --// +#include "compositor.h" #include "sysfs.h" #include "pci.h" #include "e1000.h" @@ -39,6 +40,12 @@ #include "driver/vesa.h" #include "asm_pit.h" +//ugly? +extern uint32_t kernel_end[]; +extern uint32_t kernel_start[]; + +//TODO: we fear overrun of the initial buffer! +// /* F00L 0S Entry point (called directly from asm/multiboot.asm */ void kernel_main(uint32_t eax,uint32_t ebx) { @@ -54,6 +61,11 @@ void kernel_main(uint32_t eax,uint32_t ebx) klog("Version: git-commit: %s",GIT_REVISION); klog("======================================"); + uint32_t *top_kernel_vmem=VMEM_KERNEL+VMEM_KERNEL_PAGES*4096; + klog("The Kernel was loaded at: 0x%08X - 0x%08X",kernel_start,kernel_end); + klog("0x00000000 - 0x%08X will get identity mapped", VMEM_KERNEL_PAGES*4096); + if(kernel_end>=top_kernel_vmem)kpanic("kernel to big. increase VMEM_KERNEL_PAGES"); + // -- DISABLE LEGACY PIC -- // klog("Remapping & Disabling Programmable Interrupt Controller (PIC) ..."); fixme("io_wait & spurious interrupts"); @@ -122,6 +134,9 @@ void kernel_main(uint32_t eax,uint32_t ebx) uint32_t addr= ext2_inode_blockstart( VMEM_EXT2_RAMIMAGE,inode,0); vesa_init(cfg_multiboot,addr); + klog("Compositor init ..."); + compositor_init(cfg_multiboot->framebuffer_width,cfg_multiboot->framebuffer_height,cfg_multiboot->framebuffer_pitch); + // -- STD STREAMS -- // klog("Standard Streams init ..."); fd_init_std_streams(0,cfg_multiboot->framebuffer_type!=2); |
