diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index 0182d5294..04f3c43a2 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -114,9 +114,6 @@ boot_pgt: SECTION .ktext align 4 start64: - ; store pointer to the multiboot information - mov [mb_info], QWORD rdx - ; reset registers to kill any stale realmode selectors xor eax, eax mov ds, eax @@ -134,6 +131,9 @@ start64: cmp eax, 0 jne Lno_pml4_init + ; store pointer to the multiboot information + mov [mb_info], QWORD rdx + ; relocate page tables mov rdi, boot_pml4 mov rax, QWORD [rdi]