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:
parent
64b0b81b2a
commit
a182ea8c60
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue