x86_64: fix broken multiboot pointer boot arg
This commit is contained in:
@@ -254,11 +254,11 @@ long_mode_switch:
|
|||||||
mov %ax, %es
|
mov %ax, %es
|
||||||
mov %ax, %fs
|
mov %ax, %fs
|
||||||
mov %ax, %gs
|
mov %ax, %gs
|
||||||
|
|
||||||
ljmpl $0x08, $start_64
|
ljmpl $0x08, $start_64
|
||||||
|
|
||||||
cli
|
1: cli
|
||||||
hlt
|
hlt
|
||||||
|
jmp 1b
|
||||||
|
|
||||||
.global _start
|
.global _start
|
||||||
.type _start, @function
|
.type _start, @function
|
||||||
@@ -266,8 +266,8 @@ long_mode_switch:
|
|||||||
_start:
|
_start:
|
||||||
mov $bootstrap_stack_top, %esp
|
mov $bootstrap_stack_top, %esp
|
||||||
|
|
||||||
push %ebx # 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.
|
||||||
push $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
|
# check if long mode is supported
|
||||||
movl $0x80000000, %eax # Extended-function 80000000h.
|
movl $0x80000000, %eax # Extended-function 80000000h.
|
||||||
@@ -284,7 +284,7 @@ _start:
|
|||||||
btl $3, %edx
|
btl $3, %edx
|
||||||
|
|
||||||
call init_page_tables
|
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
|
cli
|
||||||
hlt
|
hlt
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
.global start_64
|
.global start_64
|
||||||
.type start_64, @function
|
.type start_64, @function
|
||||||
start_64:
|
start_64:
|
||||||
pop %rax
|
pop %rdi
|
||||||
call kernel_init
|
call kernel_init
|
||||||
|
|
||||||
cli
|
cli
|
||||||
|
|||||||
Reference in New Issue
Block a user