Load our own GDT.

Replace the GDT from limine with our own.
This commit is contained in:
Drew Galbraith 2023-05-17 21:41:08 -07:00
parent 872e6f3392
commit 03fe4d8c2e
6 changed files with 119 additions and 10 deletions

15
zion/common/load_gdt.s Normal file
View file

@ -0,0 +1,15 @@
.global ReloadSegments
ReloadSegments:
push $0x08
lea ._reload_cs, %rax
push %rax
retfq
._reload_cs:
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
ret