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

This commit is contained in:
mintsuki 2021-04-30 02:09:00 +02:00
parent 1365d9656b
commit 7750e14c10

View File

@ -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]