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.s24
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index 7b4e193..0c21c66 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -17,8 +17,8 @@
*
* We need:
* - A single PML 4 (since we will only use 4-level paging)
- * - 2 PML 3s (since we need to map high (-2GiB) and low (1+MiB) memory)
- * - 2 PML 2s (since we need to map high (-2GiB) and low (1+MiB) memory)
+ * - 2 PML 3s (since we need to map low (1+MiB) memory)
+ * - 2 PML 2s (since we need to map low (1+MiB) memory)
*/
.global page_map_level_4
@@ -26,13 +26,9 @@ page_map_level_4: .skip 512 * 8
.global page_map_level_3_low
page_map_level_3_low: .skip 512 * 8
-.global page_map_level_3_high
-page_map_level_3_high: .skip 512 * 8
.global page_map_level_2_low
page_map_level_2_low: .skip 512 * 8
-.global page_map_level_2_high
-page_map_level_2_high: .skip 512 * 8
/**
* Reserve some space for the Multiboot 2 information pointer.
@@ -306,10 +302,7 @@ enable_sse:
*
* We map all physical memory we were loaded in plus one additional page. The
* mapping is done in terms of huge pages (2 MiB per page) to save on required
- * page map entries. Note that we also map memory both in the low and high
- * virtual address ranges, giving us two ways of accessing it. We need to do
- * this, because the bootstrapping code lives in low memory, while the rest of
- * the kernel will reside on the high end.
+ * page map entries.
*/
prepare_page_maps:
/* Add an entry to the PML4, pointing to the low PML3 */
@@ -317,21 +310,11 @@ prepare_page_maps:
or $0x3, %eax
mov %eax, (page_map_level_4 + ((0x0000000000100000 >> 39) & 0x1ff) * 8)
- /* Add an entry to the PML4, pointing to the high PML3 */
- mov $page_map_level_3_high, %eax
- or $0x3, %eax
- mov %eax, (page_map_level_4 + ((0xffffffff80100000 >> 39) & 0x1ff) * 8)
-
/* Add an entry to the low PML3, pointing to the low PML2 */
mov $page_map_level_2_low, %eax
or $0x3, %eax
mov %eax, (page_map_level_3_low + ((0x0000000000100000 >> 30) & 0x1ff) * 8)
- /* Add an entry to the high PML3, pointing to the high PML2 */
- mov $page_map_level_2_high, %eax
- or $0x3, %eax
- mov %eax, (page_map_level_3_high + ((0xffffffff80100000 >> 30) & 0x1ff) * 8)
-
xor %ecx, %ecx
mov $_end_linear, %esi
@@ -343,7 +326,6 @@ prepare_page_maps:
mul %ecx
or $((1 << 0) | (1 << 1) | (1 << 7)), %eax
mov %eax, page_map_level_2_low(,%ecx,8)
- mov %eax, page_map_level_2_high(,%ecx,8)
inc %ecx
cmp %esi, %ecx