Kernel: Start the call stack with a null RBP on x86_64
This commit is contained in:
parent
db3e34b2ba
commit
424b069d55
@ -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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
ENTRY(_start)
|
||||
ENTRY(_main)
|
||||
OUTPUT_FORMAT(elf64-x86-64)
|
||||
|
||||
mmio = 0xfffffffff8000000; /* these are configurable for level 2 loaders */
|
||||
|
6
kernel/src/arch/x86_64/Entry.asm
Normal file
6
kernel/src/arch/x86_64/Entry.asm
Normal file
@ -0,0 +1,6 @@
|
||||
global _main
|
||||
extern _start
|
||||
|
||||
_main:
|
||||
xor rbp, rbp
|
||||
call _start
|
Loading…
Reference in New Issue
Block a user