From d0948b9f2b9abcea46ff67a8ae5d8979870d6ba8 Mon Sep 17 00:00:00 2001 From: karina Date: Sun, 26 Apr 2026 10:57:01 +0400 Subject: [PATCH] feat: checking bootinfo magic at the start of the kernel --- Kernel/Source/KernelMain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Kernel/Source/KernelMain.c b/Kernel/Source/KernelMain.c index 07cb91c..3611ac3 100644 --- a/Kernel/Source/KernelMain.c +++ b/Kernel/Source/KernelMain.c @@ -1,8 +1,13 @@ #include "../Common/bootinfo.h" #include #include +#include void KernelMain(Bootinfo* bootinfo) { OSLog("Kernel started.\n"); + if (bootinfo->magic != BOOTINFO_MAGIC) { + OSPanic("Invalid bootinfo magic"); + } + DTBParse(bootinfo->dtb); } \ No newline at end of file