added amd64 shim

This commit is contained in:
trimill 2024-01-26 23:30:26 -05:00
parent 4aad3cce1d
commit e4fc6902b7
No known key found for this signature in database
GPG key ID: 4F77A16E17E10BCB
3 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,6 @@
global start global start
extern kmain extern kmain
extern amd64_shim
bits 32 bits 32
; base, limit, access, flags ; base, limit, access, flags
@ -62,8 +63,8 @@ after_lgdt:
mov gs, ax mov gs, ax
mov esp, stack_end mov esp, stack_end
mov ebp, stack_end mov ebp, stack_end
sti
push ebx push ebx
call amd64_shim
call kmain call kmain
cli cli
halt: halt:

4
src/arch/amd64/shim.c Normal file
View file

@ -0,0 +1,4 @@
// entry point for amd64
void amd64_shim(void *boot_info) {
}

View file

@ -1,4 +1,4 @@
void kmain(void *boot_info) { void kmain() {
while(1) { while(1) {
asm("cli; hlt"); asm("cli; hlt");
} }