Get the APs into rust code, set stack and page table in trampoline
This commit is contained in:
parent
a8948fb246
commit
27d5996abf
1 changed files with 84 additions and 44 deletions
|
|
@ -1,6 +1,8 @@
|
|||
trampoline:
|
||||
.ready: dq 0
|
||||
.page_table: dq 0
|
||||
.stack: dq 0
|
||||
.code: dq 0
|
||||
|
||||
times 512 - ($ - trampoline) db 0
|
||||
|
||||
|
|
@ -126,10 +128,14 @@ long_mode_ap:
|
|||
mov gs, rax
|
||||
mov ss, rax
|
||||
|
||||
mov rax, [trampoline.page_table]
|
||||
mov cr3, rax
|
||||
|
||||
mov rsp, [trampoline.stack]
|
||||
|
||||
mov qword [trampoline.ready], 1
|
||||
.lp:
|
||||
hlt
|
||||
jmp .lp
|
||||
mov rax, [trampoline.code]
|
||||
jmp rax
|
||||
|
||||
gdtr:
|
||||
dw gdt.end + 1 ; size
|
||||
|
|
|
|||
Loading…
Reference in a new issue