summaryrefslogtreecommitdiff
path: root/Kernel/Arch/x86
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-06-26 11:43:36 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-27 15:46:42 +0200
commit324f72d02b1d1978e7a404ae2721223bf9b27ca9 (patch)
tree3683fad128e95697358d7db887ebf10747e5e4ea /Kernel/Arch/x86
parentfd72597999b61843a176d1e8a8b0d15a68d69e1e (diff)
downloadserenity-324f72d02b1d1978e7a404ae2721223bf9b27ca9.zip
Kernel: Fix incorrect flags for the GDT entries
The Sz (protected mode) bit should not be set for 64-bit GDT entries.
Diffstat (limited to 'Kernel/Arch/x86')
-rw-r--r--Kernel/Arch/x86/common/Processor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp
index 46757a6125..4d46b56f70 100644
--- a/Kernel/Arch/x86/common/Processor.cpp
+++ b/Kernel/Arch/x86/common/Processor.cpp
@@ -1067,8 +1067,8 @@ UNMAP_AFTER_INIT void Processor::gdt_init()
write_raw_gdt_entry(GDT_SELECTOR_CODE3, 0x0000ffff, 0x00cffa00); // code3
write_raw_gdt_entry(GDT_SELECTOR_DATA3, 0x0000ffff, 0x00cff200); // data3
#else
- write_raw_gdt_entry(GDT_SELECTOR_CODE0, 0x0000ffff, 0x00ef9a00); // code0
- write_raw_gdt_entry(GDT_SELECTOR_CODE3, 0x0000ffff, 0x00effa00); // code3
+ write_raw_gdt_entry(GDT_SELECTOR_CODE0, 0x0000ffff, 0x00af9a00); // code0
+ write_raw_gdt_entry(GDT_SELECTOR_CODE3, 0x0000ffff, 0x00affa00); // code3
#endif
#if ARCH(I386)