aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot/boot.s
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-10-27 14:16:35 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-10-27 14:16:35 +0000
commit38e87d52891429d56d20a54ce205d1e421068f36 (patch)
tree59d0fd1b06fe78800ae1cb712e8de9550ab86b58 /arch/x86_64/src/boot/boot.s
parentd0f47ef0cd8cb2f5079808a261dd724b3eb1a3a1 (diff)
downloadteachos-38e87d52891429d56d20a54ce205d1e421068f36.tar.xz
teachos-38e87d52891429d56d20a54ce205d1e421068f36.zip
update gas
Diffstat (limited to 'arch/x86_64/src/boot/boot.s')
-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