Map kernel in AP, WIP
This commit is contained in:
parent
27d5996abf
commit
ebf9766ef5
10 changed files with 89 additions and 50 deletions
|
@ -1,7 +1,7 @@
|
|||
trampoline:
|
||||
.ready: dq 0
|
||||
.page_table: dq 0
|
||||
.stack: dq 0
|
||||
.stack_start: dq 0
|
||||
.stack_end: dq 0
|
||||
.code: dq 0
|
||||
|
||||
times 512 - ($ - trampoline) db 0
|
||||
|
@ -128,10 +128,11 @@ long_mode_ap:
|
|||
mov gs, rax
|
||||
mov ss, rax
|
||||
|
||||
mov rax, [trampoline.page_table]
|
||||
mov cr3, rax
|
||||
|
||||
mov rsp, [trampoline.stack]
|
||||
mov rdi, [trampoline.stack_start]
|
||||
mov rsi, [trampoline.stack_end]
|
||||
|
||||
lea rsp, [rsi - 16]
|
||||
|
||||
mov qword [trampoline.ready], 1
|
||||
mov rax, [trampoline.code]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue