FENIX_kernel/arch/i386/gdt_load.S
2021-01-10 14:42:29 -06:00

32 lines
409 B
ArmAsm

.globl set_gdt
.type set_gdt,%function
gdtr:
.word 0
.int 0
set_gdt:
.func set_gdt
cli
xor %eax, %eax
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