1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

Kernel: Make sure we load DS/ES/FS/GS/SS immediately after making the GDT.

This commit is contained in:
Andreas Kling 2019-05-17 18:23:08 +02:00
parent a15857ea28
commit e0ff07bb57

View file

@ -366,6 +366,16 @@ void gdt_init()
write_raw_gdt_entry(0x0020, 0x0000ffff, 0x00cff200);
flush_gdt();
asm volatile(
"mov %%ax, %%ds\n"
"mov %%ax, %%es\n"
"mov %%ax, %%fs\n"
"mov %%ax, %%gs\n"
"mov %%ax, %%ss\n"
:: "a"(0x10)
: "memory"
);
}
static void unimp_trap()