gdt.S 285 B

123456789101112131415161718192021
  1. .section .text
  2. .align 4
  3. .global gdt_flush
  4. .type gdt_flush, @function
  5. gdt_flush:
  6. /* Load GDT */
  7. mov 4(%esp), %eax
  8. lgdt (%eax)
  9. mov $0x10, %ax
  10. mov %ax, %ds
  11. mov %ax, %es
  12. mov %ax, %fs
  13. mov %ax, %ss
  14. mov %ax, %gs
  15. ljmp $0x08, $.flush
  16. .flush:
  17. ret