@@ -734,7 +734,17 @@ trampoline_setup:
/* Switch to low-memory stack which lives at the end of trampoline region. */
mov sym_fs(trampoline_phys),%edi
lea TRAMPOLINE_SPACE+TRAMPOLINE_STACK_SPACE(%edi),%esp
+ cmpb $0, sym_fs(skip_realmode)
+ jz 1f
+ /* If no-real-mode, jump straight to trampoline_protmode_entry */
+ lea trampoline_protmode_entry-trampoline_start(%edi),%eax
+ /* EBX == 0 indicates we are the BP (Boot Processor). */
+ xor %ebx,%ebx
+ jmp 2f
+1:
+ /* Go via 16-bit code in trampoline_boot_cpu_entry */
lea trampoline_boot_cpu_entry-trampoline_start(%edi),%eax
+2:
pushl $BOOT_CS32
push %eax
@@ -187,9 +187,6 @@ start64:
.code32
trampoline_boot_cpu_entry:
- cmpb $0,bootsym_rel(skip_realmode,5)
- jnz .Lskip_realmode
-
/* Load pseudo-real-mode segments. */
mov $BOOT_PSEUDORM_DS,%eax
mov %eax,%ds
@@ -269,7 +266,6 @@ trampoline_boot_cpu_entry:
mov %eax,%gs
mov %eax,%ss
-.Lskip_realmode:
/* EBX == 0 indicates we are the BP (Boot Processor). */
xor %ebx,%ebx