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:
18
kernel/cpu/gdt.S
Normal file
18
kernel/cpu/gdt.S
Normal 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user