blob: f1dd8acce90341ef5a4eeef30b5ada59293bd623 [file] [log] [blame]
swissChilid8137922021-02-17 15:34:07 -08001 [bits 32]
2 [global gdt_flush]
3
4gdt_flush:
5 mov eax, [esp + 4]
6 lgdt [eax] ; Load GDT
7
8 mov ax, 0x10 ; Offset of data segment
9 mov ds, ax,
10 mov es, ax
11 mov fs, ax
12 mov gs, ax
13 mov ss, ax
14
15 jmp 0x08:.flush ; Implicitly reloads the code segment
16.flush:
17 ret