Преглед изворни кода

Kernel: Clear segment registers on x86_64

They're supposedly unused but iretq doesn't like ss being non-zero.
Gunnar Beutner пре 4 година
родитељ
комит
79ab9cce18
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      Kernel/Arch/x86/x86_64/Boot/boot.S

+ 7 - 0
Kernel/Arch/x86/x86_64/Boot/boot.S

@@ -265,6 +265,13 @@ start:
 
 
 .code64
 .code64
 1:
 1:
+    mov $0, %ax
+    mov %ax, %ss
+    mov %ax, %ds
+    mov %ax, %es
+    mov %ax, %fs
+    mov %ax, %gs
+
     call init
     call init
     add $4, %rsp
     add $4, %rsp