Prepare our GDT for userspace

This commit is contained in:
apio 2022-09-21 21:04:15 +02:00
parent ee49caa6d3
commit c6c2e286e7

View File

@ -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);
}