Because the point of flushing segments is to
reload them after the pipeline flow is disrupted.
---
x86_64/boothdr.S | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/x86_64/boothdr.S b/x86_64/boothdr.S
index 7ca26cfc..14de9c07 100644
--- a/x86_64/boothdr.S
+++ b/x86_64/boothdr.S
@@ -163,6 +163,11 @@ switch64:
mov %eax,%cr0
lgdt gdt64pointer
+ ljmp $BOOT_CS,$boot_entry64
+
+ .code64
+
+boot_entry64:
movw $0,%ax
movw %ax,%fs
movw %ax,%gs
@@ -170,11 +175,7 @@ switch64:
movw %ax,%ds
movw %ax,%es
movw %ax,%ss
- ljmp $BOOT_CS,$boot_entry64
-
- .code64
-boot_entry64:
/* Switch to our own interrupt stack. */
movq $solid_intstack+INTSTACK_SIZE-16, %rax
andq $(~15),%rax
--
2.51.0