toaruos/kernel/gdt.S
2015-05-20 03:12:20 -04:00

21 lines
268 B
ArmAsm

.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
ljmp $0x08, $.flush
.flush:
ret