aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/kernel/head.S11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 4a3326ce709c..1e6f80870679 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -185,12 +185,15 @@ startup_64:
185 185
186 /* Finally jump to run C code and to be on real kernel address 186 /* Finally jump to run C code and to be on real kernel address
187 * Since we are running on identity-mapped space we have to jump 187 * Since we are running on identity-mapped space we have to jump
188 * to the full 64bit address , this is only possible as indirect 188 * to the full 64bit address, this is only possible as indirect
189 * jump 189 * jump. In addition we need to ensure %cs is set so we make this
190 * a far return.
190 */ 191 */
191 movq initial_code(%rip),%rax 192 movq initial_code(%rip),%rax
192 pushq $0 # fake return address 193 pushq $0 # fake return address to stop unwinder
193 jmp *%rax 194 pushq $__KERNEL_CS # set correct cs
195 pushq %rax # target address in negative space
196 lretq
194 197
195 /* SMP bootup changes these two */ 198 /* SMP bootup changes these two */
196 .align 8 199 .align 8