Kernel: Start the call stack with a null RBP on x86_64

This commit is contained in:
apio 2022-11-19 18:38:32 +01:00
parent db3e34b2ba
commit 424b069d55
3 changed files with 8 additions and 1 deletions

View File

@ -21,6 +21,7 @@ add_executable(moon ${SOURCES})
if("${ARCH}" MATCHES "x86_64")
set(ASM_SOURCES
src/arch/x86_64/CPU.asm
src/arch/x86_64/Entry.asm
)
add_library(moon-asm STATIC ${ASM_SOURCES})
target_link_libraries(moon moon-asm)

View File

@ -1,4 +1,4 @@
ENTRY(_start)
ENTRY(_main)
OUTPUT_FORMAT(elf64-x86-64)
mmio = 0xfffffffff8000000; /* these are configurable for level 2 loaders */

View File

@ -0,0 +1,6 @@
global _main
extern _start
_main:
xor rbp, rbp
call _start