BMOSP/kernel/arch/load_gdt.s
2023-10-12 22:30:54 +03:00

15 lines
278 B
ArmAsm

.global load_gdt
load_gdt:
cli
lgdt (%rdi)
movw $0x30, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
pop %rdi
mov $0x28, %rax
push %rax
push %rdi
retfq