Map kernel in AP, WIP

This commit is contained in:
Jeremy Soller
2016-08-17 15:47:54 -06:00
parent fb6cd07c93
commit babed67df5
+6 -5
View File
@@ -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]