All checks were successful
continuous-integration/drone/push Build is passing
Let's not confuse String.h with a managed string class, it's in fact the equivalent of the C stdlib's <string.h>
35 lines
740 B
C++
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");
|
|
} |