diff --git a/kernel/src/init/Init.cpp b/kernel/src/init/Init.cpp index 09cebe09..2ad47635 100644 --- a/kernel/src/init/Init.cpp +++ b/kernel/src/init/Init.cpp @@ -20,12 +20,13 @@ extern BOOTBOOT bootboot; extern "C" char environment[4096]; +extern uintptr_t fb; uintptr_t __stack_chk_guard = 0xfeff34; void Init::check_magic() { - ASSERT(strncmp((char*)bootboot.magic, BOOTBOOT_MAGIC, 4) == 0); + if (strncmp((char*)bootboot.magic, BOOTBOOT_MAGIC, 4) != 0) hang(); } void Init::disable_smp() @@ -43,8 +44,7 @@ void Init::early_init() asm_enable_sse(); - framebuffer0.init((void*)bootboot.fb_ptr, bootboot.fb_type, bootboot.fb_scanline, bootboot.fb_width, - bootboot.fb_height); + framebuffer0.init((void*)&fb, bootboot.fb_type, bootboot.fb_scanline, bootboot.fb_width, bootboot.fb_height); MemoryManager::init(); diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index b51e5127..ab5c3751 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -23,8 +23,8 @@ extern "C" void _start() { - Init::check_magic(); Init::disable_smp(); // Put all other cores except the bootstrap one in an infinite loop + Init::check_magic(); Init::early_init(); kinfoln("Starting Moon %s", moon_version());