mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 00:52:50 +00:00
Initial commit: SUB-OS 64-Bit Production Monolithic Operating System with LazyBox userland suite
This commit is contained in:
commit
cd9c786d14
88 files changed
+7132
No files matched your search
@@ -0,0 +1,29 @@
|
||||
[BITS 64]
|
||||
|
||||
global gdt_flush
|
||||
global tss_flush
|
||||
|
||||
section .text
|
||||
gdt_flush:
|
||||
lgdt [rdi]
|
||||
; Reload data segments
|
||||
mov ax, 0x10
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
mov fs, ax
|
||||
mov gs, ax
|
||||
mov ss, ax
|
||||
|
||||
; Reload CS via far return
|
||||
push 0x08
|
||||
lea rax, [rel .reload_cs]
|
||||
push rax
|
||||
retfq
|
||||
|
||||
.reload_cs:
|
||||
ret
|
||||
|
||||
tss_flush:
|
||||
mov ax, 0x28
|
||||
ltr ax
|
||||
ret
|
||||
Reference in new issue
Block a user