feat: gdt, attributes move, reorder

Added late gdt setup with initial tss
Moved attributes to include root
Reordered some imports
This commit is contained in:
2021-03-21 17:34:38 +01:00
parent 513693189e
commit 20ab9e1d6e
28 changed files with 351 additions and 121 deletions

18
kernel/cpu/gdt.S Normal file
View File

@@ -0,0 +1,18 @@
.code32
.extern gdt_ptr
.global _gdt_switch
_gdt_switch:
lgdt gdt_ptr
movw $0x10,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
ljmp $0x8, $_gdt_switch_continue
_gdt_switch_continue:
movw $0x2a, %ax // 0x28 + 0x03 = 0x2a
ltr %ax
ret