Files
my-kern/kernel/cpu/gdt.S
Rick Rongen 20ab9e1d6e feat: gdt, attributes move, reorder
Added late gdt setup with initial tss
Moved attributes to include root
Reordered some imports
2021-03-21 17:34:38 +01:00

19 lines
285 B
ArmAsm

.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