toaruos/kernel/gdt.S

22 lines
285 B
ArmAsm
Raw Normal View History

2018-03-16 15:56:19 +03:00
.section .text
.align 4
.global gdt_flush
.type gdt_flush, @function
gdt_flush:
/* Load GDT */
mov 4(%esp), %eax
lgdt (%eax)
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %ss
2018-07-11 10:09:25 +03:00
mov %ax, %gs
2018-03-16 15:56:19 +03:00
ljmp $0x08, $.flush
.flush:
ret