Working kernel written on C and userspace-ready #1
@@ -1,8 +1,13 @@
|
|||||||
#include "../Common/bootinfo.h"
|
#include "../Common/bootinfo.h"
|
||||||
#include <Arch/DTB.h>
|
#include <Arch/DTB.h>
|
||||||
#include <OS/Log.h>
|
#include <OS/Log.h>
|
||||||
|
#include <OS/Panic.h>
|
||||||
|
|
||||||
void KernelMain(Bootinfo* bootinfo) {
|
void KernelMain(Bootinfo* bootinfo) {
|
||||||
OSLog("Kernel started.\n");
|
OSLog("Kernel started.\n");
|
||||||
|
if (bootinfo->magic != BOOTINFO_MAGIC) {
|
||||||
|
OSPanic("Invalid bootinfo magic");
|
||||||
|
}
|
||||||
|
|
||||||
DTBParse(bootinfo->dtb);
|
DTBParse(bootinfo->dtb);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user