29 lines
554 B
C++
29 lines
554 B
C++
#include "Init.h"
|
|
#include "Framebuffer.h"
|
|
#include "MemoryManager.h"
|
|
#include "arch/CPU.h"
|
|
#include "arch/Serial.h"
|
|
#include "bootboot.h"
|
|
#include <String.h>
|
|
|
|
extern BOOTBOOT bootboot;
|
|
|
|
void Init::check_magic()
|
|
{
|
|
if (memcmp(bootboot.magic, BOOTBOOT_MAGIC, 4))
|
|
{
|
|
Serial::println("ERROR: Invalid magic value from bootloader");
|
|
for (;;)
|
|
;
|
|
}
|
|
}
|
|
|
|
void Init::early_init()
|
|
{
|
|
Framebuffer::init();
|
|
MemoryManager::init();
|
|
|
|
CPU::platform_init();
|
|
|
|
check(MemoryManager::protect_kernel_sections().has_value());
|
|
} |