mirror of
https://github.com/tailix/kernel.git
synced 2024-11-27 11:24:34 -05:00
23 lines
328 B
NASM
23 lines
328 B
NASM
#include "config.h"
|
|
|
|
[GLOBAL gdt_flush]
|
|
[GLOBAL idt_flush]
|
|
|
|
gdt_flush:
|
|
mov eax, [esp+4]
|
|
lgdt [eax]
|
|
|
|
mov ax, GDT_KERNEL_DS_SELECTOR
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov fs, ax
|
|
mov gs, ax
|
|
mov ss, ax
|
|
jmp GDT_KERNEL_CS_SELECTOR:.flush
|
|
.flush:
|
|
ret
|
|
|
|
idt_flush:
|
|
mov eax, [esp+4]
|
|
lidt [eax]
|
|
ret
|