aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-18 11:44:15 +0000
committerFelix Morgner <felix.morgner@ost.ch>2025-07-18 11:44:15 +0000
commit3a67a3e1088508148002e7c20befa571fb0b72c0 (patch)
tree9b2c013ba0f38ffa278dd47ce3ccb40d6bfcdd1a /arch/x86_64/src/boot
parentfd6282947bb13af4cfff8cf2209c442b568275f3 (diff)
downloadteachos-3a67a3e1088508148002e7c20befa571fb0b72c0.tar.xz
teachos-3a67a3e1088508148002e7c20befa571fb0b72c0.zip
x86_64: set GDT entries as accessed.
Diffstat (limited to 'arch/x86_64/src/boot')
-rw-r--r--arch/x86_64/src/boot/boot.s5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index 2decf26..f3d9585 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -60,6 +60,7 @@ stack_top:
/**
* A valid Global Descriptor Table is still required in long mode.
*
+ * Bit 41: "A" in the access byte => mark the segment as accessed.
* Bit 41: "RW" in the access byte => mark the segment as readable (code) or writable (data).
* Bit 43: "E" in the access byte => mark the segment as executable.
* Bit 44: "S" in the access byte => mark the segment as code or data.
@@ -71,9 +72,9 @@ global_descriptor_table:
global_descriptor_table_null = . - global_descriptor_table
.quad 0
global_descriptor_table_code = . - global_descriptor_table
-.quad (1<<41) | (1<<43) | (1<<44) | (1<<47) | (1<<53)
+.quad (1<<40) | (1<<41) | (1<<43) | (1<<44) | (1<<47) | (1<<53)
global_descriptor_table_data = . - global_descriptor_table
-.quad (1<<41) | (1<<44) | (1<<47)
+.quad (1<<40) | (1<<41) | (1<<44) | (1<<47)
global_descriptor_table_end:
/**