2019-07-05 18:25:58 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2021-01-02 17:49:15 +01:00
|
|
|
; vulcanOS Kernel ;
|
2019-07-05 18:25:58 +02:00
|
|
|
; Developed by Marco 'icebit' Cetica ;
|
2021-01-02 17:49:15 +01:00
|
|
|
; (c) 2019-2021 ;
|
2019-07-05 18:25:58 +02:00
|
|
|
; Released under GPLv3 ;
|
|
|
|
; https://github.com/ice-bit/iceOS ;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2019-07-04 12:49:53 +02:00
|
|
|
global gdt_flush ; for drivers/gdt.c
|
|
|
|
|
|
|
|
section .text
|
|
|
|
gdt_flush:
|
|
|
|
mov eax, [esp+4] ; get address of gdt_ptr_t
|
|
|
|
lgdt [eax] ; Load GDT
|
|
|
|
mov ax, 0x10 ; offset in the GDT of the data segment
|
|
|
|
mov ds, ax ; Load data segment selectors
|
|
|
|
mov es, ax
|
|
|
|
mov fs, ax
|
|
|
|
mov gs, ax
|
|
|
|
mov ss, ax
|
|
|
|
jmp 0x08:.flush ; offset in the GDT of the code segment
|
|
|
|
.flush:
|
2021-01-02 17:49:15 +01:00
|
|
|
ret
|