diff options
Diffstat (limited to 'src/boucane.cc')
| -rw-r--r-- | src/boucane.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/boucane.cc b/src/boucane.cc index 0209281..1e58d65 100644 --- a/src/boucane.cc +++ b/src/boucane.cc @@ -9,18 +9,25 @@ #include "libs/stdio.hpp" #include "core/asm.hpp" +u64 kernel_vma,stack_pma,userspace_pma; -extern u32 MB_INFO; -extern u64 res_binary_res_terminus_psf_start; +extern "C" void boucane(u64 mb_info){ + // Init linker variables + asm volatile ("movq $__kernel_vma, %0":"=m"(kernel_vma)); + asm volatile ("movq $__userspace_pma, %0":"=m"(userspace_pma)); + asm volatile ("movq $__stack_pma, %0":"=m"(stack_pma)); + asm volatile ("call load_gdt"); -extern "C" void boucane(){ // Init data structures - LOAD_GDT(); paging_enable(); idt_enable_interrupt(); + // Looking for framebuffer + vga_t_init(); + vga_t_clear(); FRAMEBUFFER fb_info; - if(mb2_find_framebuffer((u32*)&MB_INFO, &fb_info)){ + + if(mb2_find_framebuffer((u32*)mb_info, &fb_info)){ if(fb_info.bpp>16){ FB_CFG conf; conf.depth=fb_info.bpp; @@ -33,8 +40,8 @@ extern "C" void boucane(){ __putchar=psf_putchar; } } - vga_t_init(); - vga_t_clear(); + + // Booting! printk("Booting Boucane v%d.%d.%d\n",VERSION_MAJOR,VERSION_MINOR, VERSION_PATH); |
