Working kernel written on C and userspace-ready #1
@@ -1,6 +1,10 @@
|
|||||||
.section .text.boot, "ax"
|
.section .text.boot, "ax"
|
||||||
.global _start
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
|
sub sp, sp, #16
|
||||||
|
str x0, [sp]
|
||||||
bl ExceptionsVectorsInit
|
bl ExceptionsVectorsInit
|
||||||
|
ldr x0, [sp]
|
||||||
|
add sp, sp, #16
|
||||||
bl KernelMain
|
bl KernelMain
|
||||||
b .
|
b .
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
#include <OS/Log.h>
|
#include <OS/Log.h>
|
||||||
|
#include "../Common/bootinfo.h"
|
||||||
|
|
||||||
void KernelMain(void) {
|
void KernelMain(Bootinfo* bootinfo) {
|
||||||
OSLog("Hi meow! ;3\n");
|
OSLog("DTB located at 0x%x\n", bootinfo->dtb);
|
||||||
|
OSLog("Kernel located at 0x%x\n", bootinfo->kernelInfo.kernelAddress);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user