2022-11-13 12:20:53 +01:00
|
|
|
#include "Init.h"
|
|
|
|
#include "Framebuffer.h"
|
2022-11-13 14:29:15 +01:00
|
|
|
#include "arch/MMU.h"
|
2022-11-13 12:20:53 +01:00
|
|
|
#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();
|
2022-11-13 14:29:15 +01:00
|
|
|
MMU::setup_initial_page_directory();
|
2022-11-13 12:20:53 +01:00
|
|
|
}
|