Kernel: After creating our GDT, make sure CS refers to the right descriptor.

This will allow us to boot from e.g GRUB which will have a different looking
GDT in effect before we start moving things around.
This commit is contained in:
Andreas Kling 2019-05-17 18:52:29 +02:00
commit a182ea8c60
Notes: sideshowbarker 2024-07-19 14:03:16 +09:00

View file

@ -374,6 +374,12 @@ void gdt_init()
:: "a"(0x10)
: "memory"
);
// Make sure CS points to the kernel code descriptor.
asm volatile(
"ljmpl $0x8, $sanity\n"
"sanity:\n"
);
}
static void unimp_trap()