aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/boot')
-rw-r--r--arch/x86_64/src/boot/boot.s10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index f04ae44..c1b3203 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -271,11 +271,6 @@ enable_paging:
mov $page_map_level_4, %eax
mov %eax, %cr3
- /* Map the P4 table recursively */
- mov $page_map_level_4, %eax
- or 0b11, %eax /* Write present + writable flags into eax register */
- mov %eax, (page_map_level_4 + 511 * 8)
-
/* Enable Physical Address Extension */
mov %cr4, %eax
or $(1 << 5), %eax
@@ -317,6 +312,11 @@ enable_sse:
* page map entries.
*/
prepare_page_maps:
+ /* Map the P4 table recursively */
+ mov $page_map_level_4, %eax
+ or $0b11, %eax /* Write present + writable flags into eax register */
+ mov %eax, (page_map_level_4 + 511 * 8)
+
/* Add an entry to the PML4, pointing to the PML3 */
mov $page_map_level_3, %eax
or $0x3, %eax