:: commit 7750e14c10bc61325d27e858853700ae3c49453e

mintsuki <mintsuki@protonmail.com> — 2021-04-30 00:09

parents: 1365d9656b

stivale2: Preserve state of FS and GS segment registers across terminal print calls

diff --git a/stage23/protos/stivale2_rt.asm b/stage23/protos/stivale2_rt.asm
index 6cc8be2d..08e48945 100644
--- a/stage23/protos/stivale2_rt.asm
+++ b/stage23/protos/stivale2_rt.asm
@@ -6,8 +6,6 @@ user_stack:
 user_cs: resq 1
 user_ds: resq 1
 user_es: resq 1
-user_fs: resq 1
-user_gs: resq 1
 user_ss: resq 1
 
 term_buf:
@@ -33,8 +31,6 @@ stivale2_term_write_entry:
     mov word [user_cs], cs
     mov word [user_ds], ds
     mov word [user_es], es
-    mov word [user_fs], fs
-    mov word [user_gs], gs
     mov word [user_ss], ss
 
     push rsi
@@ -52,8 +48,6 @@ bits 32
     mov eax, 0x20
     mov ds, ax
     mov es, ax
-    mov fs, ax
-    mov gs, ax
     mov ss, ax
     push esi
     push term_buf
@@ -66,8 +60,6 @@ bits 64
   .mode64:
     mov ds, word [user_ds]
     mov es, word [user_es]
-    mov fs, word [user_fs]
-    mov gs, word [user_gs]
     mov ss, word [user_ss]
     mov rsp, [user_stack]
 
tab: 248 wrap: offon