2022-11-13 11:20:53 +00:00
|
|
|
#include "Init.h"
|
|
|
|
#include "Framebuffer.h"
|
2022-11-13 13:29:59 +00:00
|
|
|
#include "MemoryManager.h"
|
2022-11-15 18:10:32 +00:00
|
|
|
#include "arch/CPU.h"
|
2022-11-13 11:20:53 +00: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 13:29:59 +00:00
|
|
|
MemoryManager::init();
|
2022-11-15 18:10:32 +00:00
|
|
|
|
|
|
|
CPU::platform_init();
|
2022-11-13 11:20:53 +00:00
|
|
|
}
|