diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-07-18 11:44:15 +0000 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-07-18 11:44:15 +0000 |
| commit | 3a67a3e1088508148002e7c20befa571fb0b72c0 (patch) | |
| tree | 9b2c013ba0f38ffa278dd47ce3ccb40d6bfcdd1a | |
| parent | fd6282947bb13af4cfff8cf2209c442b568275f3 (diff) | |
| download | teachos-3a67a3e1088508148002e7c20befa571fb0b72c0.tar.xz teachos-3a67a3e1088508148002e7c20befa571fb0b72c0.zip | |
x86_64: set GDT entries as accessed.
| -rw-r--r-- | arch/x86_64/src/boot/boot.s | 5 |
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: /** |
