FENIX_kernel/arch/i386/gdt_load.S
2020-12-18 12:38:32 -06:00

30 lines
386 B
ArmAsm

.globl set_gdt
.type set_gdt,%function
gdtr:
.word 0
.int 0
set_gdt:
.func set_gdt
mov 4(%esp), %eax
mov %eax, gdtr+2
mov 8(%esp), %ax
mov %ax, gdtr
lgdt gdtr
ret
.endfunc
.globl reload_segments
.type reload_segments,%function
reload_segments:
.func reload_segments
mov 0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
ret
.endfunc