summaryrefslogtreecommitdiff
path: root/kernel/cpu/reload_gdt.s
blob: 3a0119bb19e4609fed267b7a81b96e1bd86fc606 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.section .text
.global load_gdt

load_gdt:
    mov 4(%esp), %eax
    lgdt (%eax)

    mov $0x10, %eax
    mov %eax, %ds
    mov %eax, %es
    mov %eax, %fs
    mov %eax, %gs
    mov %eax, %ss
    jmp $0x8, $.long_jump
.long_jump:
    ret