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

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
parent 64b0b81b2a
commit a182ea8c60

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()