.section .text
.global gdt_flush
gdt_flush:
    push %eax
    mov %esp, %eax
    add $4, %eax
    lgdt (%eax)
    pop %eax
    movw $0x10, %ax
    movw %ax, %ds
    movw %ax, %es
    movw %ax, %fs
    movw %ax, %gs
    movw %ax, %ss
    ljmp $0x08, $flush2
flush2:
    ret
