mirror of
https://git.stationery.faith/corn/corn.git
synced 2024-11-22 06:32:18 +00:00
Ununfixed kmain, fixed boot.S
This commit is contained in:
parent
59050bbca0
commit
90c70043be
2 changed files with 7 additions and 5 deletions
|
@ -116,7 +116,7 @@ start:
|
||||||
bits 64
|
bits 64
|
||||||
code64:
|
code64:
|
||||||
call amd64_shim
|
call amd64_shim
|
||||||
push rax
|
mov rdi, rax
|
||||||
call kmain
|
call kmain
|
||||||
cli
|
cli
|
||||||
halt:
|
halt:
|
||||||
|
|
10
src/kmain.c
10
src/kmain.c
|
@ -1,7 +1,9 @@
|
||||||
void kmain() {
|
#include <lib.h>
|
||||||
|
#include <serial.h>
|
||||||
|
void kmain(void *info) {
|
||||||
|
char buf[20];
|
||||||
*(char*)0xB8000 = 'c';
|
*(char*)0xB8000 = 'c';
|
||||||
*(char*)(0xB8002 + 0x20'0000) = 'd';
|
*(char*)(0xB8002 + 0x20'0000) = 'd';
|
||||||
while(1) {
|
itoa((long)info, buf, 10);
|
||||||
__asm("cli; hlt");
|
serial_out_str(buf);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue