From e4fc6902b7ebbfec5e31a70a176f9663f72e6fc6 Mon Sep 17 00:00:00 2001 From: trimill Date: Fri, 26 Jan 2024 23:30:26 -0500 Subject: [PATCH] added amd64 shim --- src/arch/amd64/boot.S | 3 ++- src/arch/amd64/shim.c | 4 ++++ src/kmain.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/arch/amd64/shim.c diff --git a/src/arch/amd64/boot.S b/src/arch/amd64/boot.S index f7c24c4..fc580fb 100644 --- a/src/arch/amd64/boot.S +++ b/src/arch/amd64/boot.S @@ -1,5 +1,6 @@ global start extern kmain +extern amd64_shim bits 32 ; base, limit, access, flags @@ -62,8 +63,8 @@ after_lgdt: mov gs, ax mov esp, stack_end mov ebp, stack_end - sti push ebx + call amd64_shim call kmain cli halt: diff --git a/src/arch/amd64/shim.c b/src/arch/amd64/shim.c new file mode 100644 index 0000000..28ba8a0 --- /dev/null +++ b/src/arch/amd64/shim.c @@ -0,0 +1,4 @@ +// entry point for amd64 +void amd64_shim(void *boot_info) { + +} diff --git a/src/kmain.c b/src/kmain.c index 6d45087..9f4d63d 100644 --- a/src/kmain.c +++ b/src/kmain.c @@ -1,4 +1,4 @@ -void kmain(void *boot_info) { +void kmain() { while(1) { asm("cli; hlt"); }