2022-12-13 22:22:04 +00:00
|
|
|
.code64
|
|
|
|
|
|
2022-12-14 21:45:24 +00:00
|
|
|
.extern kernel_init # defined in core/main.c
|
|
|
|
|
|
2023-02-06 10:39:36 +00:00
|
|
|
.section .boot.text, "ax", @progbits
|
2022-12-13 22:22:04 +00:00
|
|
|
|
2022-12-13 20:21:28 +00:00
|
|
|
.global start_64
|
|
|
|
|
.type start_64, @function
|
|
|
|
|
start_64:
|
2023-02-06 20:45:31 +00:00
|
|
|
/* convert %rsp to a higher-half pointer */
|
|
|
|
|
add $0xFFFFFFFF80000000, %rsp
|
|
|
|
|
|
2023-02-05 10:26:47 +00:00
|
|
|
pop %rdi
|
2022-12-14 21:45:24 +00:00
|
|
|
call kernel_init
|
|
|
|
|
|
2022-12-13 22:22:04 +00:00
|
|
|
cli
|
|
|
|
|
hlt
|