Commit 552e0c8d authored by Will Deacon's avatar Will Deacon Committed by Russell King

ARM: 7065/1: kexec: ensure new kernel is entered in ARM state

Commit 540b5738 ("ARM: 6999/1: head, zImage: Always Enter the kernel in
ARM state") mandates that the kernel should be entered in ARM state.

If a Thumb-2 kernel kexecs a new kernel image, we need to ensure that
we change state when branching to the new code. This patch replaces a
mov pc, lr with a bx lr on Thumb-2 kernels so that we transition to ARM
state if need be.
Reviewed-by: default avatarDave Martin <dave.martin@linaro.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0ebb962e
...@@ -57,7 +57,8 @@ relocate_new_kernel: ...@@ -57,7 +57,8 @@ relocate_new_kernel:
mov r0,#0 mov r0,#0
ldr r1,kexec_mach_type ldr r1,kexec_mach_type
ldr r2,kexec_boot_atags ldr r2,kexec_boot_atags
mov pc,lr ARM( mov pc, lr )
THUMB( bx lr )
.align .align
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment