diff options
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index cf9fef9..6f04454 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -12,6 +12,7 @@ #include "vmem.h" //-- clean below headers --// +#include "ext2.h" #include "apic.h" #include "kernel/scheduler.h" @@ -33,7 +34,6 @@ #include "driver/vesa.h" #include "asm_pit.h" - /* F00L 0S Entry point (called directly from asm/multiboot.asm */ void kernel_main(uint32_t eax,uint32_t ebx) { @@ -91,6 +91,10 @@ void kernel_main(uint32_t eax,uint32_t ebx) x86_set_page_directory(dir); x86_paging_enable(); + // -- EXT2 RAM IMAGE -- // + klog("Check ext2 ram image ... "); + ext2_dump_info(VMEM_EXT2_RAMIMAGE); + // -- APIC -- // klog("Advanced Programmable Interrupt Controller (APIC) config ..."); apic_init(&cfg_acpi); @@ -99,8 +103,11 @@ void kernel_main(uint32_t eax,uint32_t ebx) // -- VESA -- // fixme("tell terminal syscall somehow if we are vga or textmode"); klog("Video Electronics Standards Association (VESA) init ... "); // TODO check if text or fb? - uint32_t addr=kballoc(1); - fs_content("/binfont.bin",addr,0x100); // copy font (0x100 bytes) to memory. + + // binfont has to fit in ONE ext2 block // + fixme("support binfonts spanning multiple blocks?"); + uint32_t inode= ext2_filename_to_inode(VMEM_EXT2_RAMIMAGE,"/binfont.bin"); + uint32_t addr= ext2_inode_blockstart( VMEM_EXT2_RAMIMAGE,inode,0); vesa_init(cfg_multiboot->vbe_control_info,cfg_multiboot->vbe_mode_info,addr); // -- STDIN/STDOUT -- // |
