Ver Fonte

Kernel: Clear segment registers on x86_64

They're supposedly unused but iretq doesn't like ss being non-zero.
Gunnar Beutner há 4 anos atrás
pai
commit
79ab9cce18
1 ficheiros alterados com 7 adições e 0 exclusões
  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
 1:
+    mov $0, %ax
+    mov %ax, %ss
+    mov %ax, %ds
+    mov %ax, %es
+    mov %ax, %fs
+    mov %ax, %gs
+
     call init
     add $4, %rsp