From c6c2e286e7b5b3014807c9da053518a5f3ced848 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 21 Sep 2022 21:04:15 +0200 Subject: [PATCH] Prepare our GDT for userspace --- kernel/src/gdt/GDT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/gdt/GDT.cpp b/kernel/src/gdt/GDT.cpp index 2b2116f0..3b7447d8 100644 --- a/kernel/src/gdt/GDT.cpp +++ b/kernel/src/gdt/GDT.cpp @@ -56,7 +56,7 @@ __attribute__((aligned(0x1000))) static InternalGDT internal_gdt = {{0x0000, 0x0 {0xffff, 0x0000, 0x00, 0x92, 0xcf, 0x00}, {0xffff, 0x0000, 0x00, 0xfa, 0xaf, 0x00}, {0xffff, 0x0000, 0x00, 0xf2, 0xcf, 0x00}, - {0x0000, 0x0000, 0x00, 0xe9, 0xcf, 0x00}, + {0x0000, 0x0000, 0x00, 0x89, 0x0f, 0x00}, {0x00000000, 0x00000000}}; static TSS main_tss; @@ -92,5 +92,5 @@ void GDT::load() kdbgln("Loading GDT at offset %lx, size %d", gdtr.offset, gdtr.size); load_gdt(&gdtr); kdbgln("Loading TR (GDT entry 0x28)"); - load_tr(0x28); + load_tr(0x28 | 3); } \ No newline at end of file