From 8fcea7951b724f5316b84421dc6b8bdfa6beb391 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 13 Apr 2017 18:35:00 +0200 Subject: [PATCH] Recursive map the P4 table --- src/arch/x86_64/boot.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index 6a9cb31..c82b6df 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -85,6 +85,11 @@ check_long_mode: jmp error set_up_page_tables: + ; map P4 table recursively + mov eax, p4_table + or eax, 0b11 ; present + writable + mov [p4_table + 511 * 8], eax + ; map first P4 entry to P3 table mov eax, p3_table or eax, 0b11 ; present + writable