x86_64: fix broken multiboot pointer boot arg

This commit is contained in:
2023-02-05 10:26:47 +00:00
parent 1abc7a4f6c
commit 2b2c5a24da
2 changed files with 6 additions and 6 deletions

View File

@@ -254,11 +254,11 @@ long_mode_switch:
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
ljmpl $0x08, $start_64
cli
1: cli
hlt
jmp 1b
.global _start
.type _start, @function
@@ -266,8 +266,8 @@ long_mode_switch:
_start:
mov $bootstrap_stack_top, %esp
push %ebx # store the pointer to the multiboot info block as a 64-bit value.
push $0x00 # store the pointer to the multiboot info block as a 64-bit value.
pushl $0x00 # store the pointer to the multiboot info block as a 64-bit value.
pushl %ebx # store the pointer to the multiboot info block as a 64-bit value.
# check if long mode is supported
movl $0x80000000, %eax # Extended-function 80000000h.
@@ -284,7 +284,7 @@ _start:
btl $3, %edx
call init_page_tables
call long_mode_switch # calls start_64, does not return
jmp long_mode_switch # calls start_64, does not return
cli
hlt

View File

@@ -7,7 +7,7 @@
.global start_64
.type start_64, @function
start_64:
pop %rax
pop %rdi
call kernel_init
cli