os/gdt_flush.s

18 lines
269 B
ArmAsm
Raw Normal View History

2024-05-23 20:59:18 +03:00
.section .text
.align 4
2024-05-21 18:41:16 +03:00
2024-05-23 20:59:18 +03:00
.global gdt_flush
.type gdt_flush, @function
2024-05-21 18:41:16 +03:00
gdt_flush:
2024-05-23 20:59:18 +03:00
lgdt gdt_ptr
jmp $0x08, $reload_cs
2024-05-21 18:41:16 +03:00
2024-05-23 20:59:18 +03:00
reload_cs:
movw $0x10, %ax
movw %ax, %ds
movw %ax, %es
movw %ax, %fs
movw %ax, %gs
movw %ax, %ss
ret