Luna/kernel/src/boot/Init.cpp
apio 59765aa334
All checks were successful
continuous-integration/drone/push Build is passing
Rename String.h -> CString.h
Let's not confuse String.h with a managed string class, it's in fact the equivalent of the C stdlib's <string.h>
2022-12-16 20:40:04 +01:00

35 lines
740 B
C++

#include "boot/Init.h"
#include "Log.h"
#include "arch/CPU.h"
#include "boot/bootboot.h"
#include "memory/MemoryManager.h"
#include "video/Framebuffer.h"
#include <luna/CString.h>
#include <luna/Result.h>
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");
}