aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/gdt/gdt.asm
blob: 51ce444b4905b05066842b3a7ca9c541ca916929 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; GDT flush function
global gdt_flush
extern gp
gdt_flush:
    lgdt [gp]
    mov ax, 0x10 ; Data segment offset of GDT
    mov ds, ax
    mov es, ax
    mov fs, ax
    mov gs, ax
    mov ss, ax
    jmp 0x08:flush ; Code segment offset
flush:
    ret ; Returns to C code