feat: checking bootinfo magic at the start of the kernel

This commit is contained in:
karina
2026-04-26 10:57:01 +04:00
parent 32544abb12
commit d0948b9f2b
+5
View File
@@ -1,8 +1,13 @@
#include "../Common/bootinfo.h"
#include <Arch/DTB.h>
#include <OS/Log.h>
#include <OS/Panic.h>
void KernelMain(Bootinfo* bootinfo) {
OSLog("Kernel started.\n");
if (bootinfo->magic != BOOTINFO_MAGIC) {
OSPanic("Invalid bootinfo magic");
}
DTBParse(bootinfo->dtb);
}