1 2 3 4 5 6 7 8 9 10 11 12 13 14
.global gdt_flush .type gdt_flush, @function gdt_flush: # prototype: void gdt_flush(uint32) movl 4(%esp), %eax lgdt (%eax) mov $0x10, %ax mov %ax, %ds mov %ax, %es mov %ax, %fs mov %ax, %gs mov %ax, %ss jmp $0x8, $.flush .flush: ret