Ununfixed kmain, fixed boot.S

This commit is contained in:
Simon 2024-01-27 03:37:48 -05:00
parent 59050bbca0
commit 90c70043be
2 changed files with 7 additions and 5 deletions

View file

@ -116,7 +116,7 @@ start:
bits 64
code64:
call amd64_shim
push rax
mov rdi, rax
call kmain
cli
halt:

View file

@ -1,7 +1,9 @@
void kmain() {
#include <lib.h>
#include <serial.h>
void kmain(void *info) {
char buf[20];
*(char*)0xB8000 = 'c';
*(char*)(0xB8002 + 0x20'0000) = 'd';
while(1) {
__asm("cli; hlt");
}
itoa((long)info, buf, 10);
serial_out_str(buf);
}