aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-12-01 09:46:37 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-12-01 09:46:37 +0000
commitc1e7edabc1dfbe387546297720fc495837d38d33 (patch)
treee8f21a61721eda982e195d2ca663838a2800d854 /arch/x86_64/src/boot
parente8bbb1ad850a362dfa25ba1ea7bdd838a379def8 (diff)
downloadteachos-c1e7edabc1dfbe387546297720fc495837d38d33.tar.xz
teachos-c1e7edabc1dfbe387546297720fc495837d38d33.zip
Fix guard page and ensure it crashes even if guard page is skipped altogether
Diffstat (limited to 'arch/x86_64/src/boot')
-rw-r--r--arch/x86_64/src/boot/boot.s16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index c1b3203..8d27ea1 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -7,6 +7,16 @@
* Uninitialized data for the bootstrapping process.
*/
.section .boot_bss, "aw", @nobits
+
+/**
+ * Reserve some space for the Multiboot 2 information pointer.
+ */
+.global multiboot_information_pointer
+multiboot_information_pointer: .skip 4
+
+/**
+ * Align page maps to 4 KiB or the assembler code, will cause crashes when attempting to enable paging.
+ */
.align 4096
/**
@@ -31,12 +41,6 @@ page_map_level_3: .skip 512 * 8
page_map_level_2: .skip 512 * 8
/**
- * Reserve some space for the Multiboot 2 information pointer.
- */
-.global multiboot_information_pointer
-multiboot_information_pointer: .skip 4
-
-/**
* Stack space for the bootstrapping process.
*
* Note: We are going to reserve 1 MiB for now. If/when the kernel requires