#include "boot/Init.h" #include "Log.h" #include "arch/CPU.h" #include "boot/bootboot.h" #include "memory/MemoryManager.h" #include "video/Framebuffer.h" #include #include extern const BOOTBOOT bootboot; void Init::check_magic() { if (memcmp(bootboot.magic, BOOTBOOT_MAGIC, 4)) { kerrorln("ERROR: Invalid magic value from bootloader"); for (;;) ; } } void Init::early_init() { CPU::disable_interrupts(); Framebuffer::init(); setup_log(log_debug_enabled(), log_serial_enabled(), true); MemoryManager::init(); CPU::platform_init(); MemoryManager::protect_kernel_sections().expect_release_value("We should succeed to protect sections"); }