Reload cr3 after updating P4
This commit is contained in:
parent
83f81b9a74
commit
b5e0d749b8
@ -43,7 +43,7 @@ _start:
|
|||||||
lgdt [V2P(BootGDTp)]
|
lgdt [V2P(BootGDTp)]
|
||||||
|
|
||||||
//; and update the code selector by a long jump
|
//; and update the code selector by a long jump
|
||||||
jmp 0x8:V2P(long_mode_start)
|
jmp 0x8:V2P(long_mode_start)
|
||||||
|
|
||||||
.code64
|
.code64
|
||||||
long_mode_start:
|
long_mode_start:
|
||||||
@ -68,6 +68,9 @@ _start:
|
|||||||
mov rax, 0
|
mov rax, 0
|
||||||
movabs [BootP4], rax
|
movabs [BootP4], rax
|
||||||
|
|
||||||
|
mov rax, cr3
|
||||||
|
mov cr3, rax
|
||||||
|
|
||||||
//; Jump to kmain()
|
//; Jump to kmain()
|
||||||
.extern kmain
|
.extern kmain
|
||||||
movabs rax, offset kmain
|
movabs rax, offset kmain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user