Viewing: gdt_flush.S
📄 gdt_flush.S (Read Only) ⬅ To go back
.section .text
.global gdt_flush
gdt_flush:
    mov 4(%esp), %eax
    lgdt (%eax)

    mov $0x10, %ax
    mov %ax, %ds
    mov %ax, %es
    mov %ax, %fs
    mov %ax, %gs
    mov %ax, %ss

    ljmp $0x08, $flush_cs
flush_cs:
    ret

 .section .note.GNU-stack,"",@progbits