feat: load GDT

This commit is contained in:
2026-10-02 11:59:14 +02:00
parent b463527025
commit fb71af6d41
7 changed files with 142 additions and 11 deletions
+19
View File
@@ -0,0 +1,19 @@
.section .text
.code64
.global reload_segments
.type reload_segments, @function
reload_segments:
pushq %rdi
leaq .reload_cs(%rip), %rax
pushq %rax
lretq
.reload_cs:
movw %si, %ax
movw %ax, %ds
movw %ax, %es
movw %ax, %fs
movw %ax, %gs
movw %ax, %ss
ret