summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv8/transition.S
diff options
context:
space:
mode:
authorAlison Wang <b18965@freescale.com>2017-01-17 09:39:17 +0800
committerYork Sun <york.sun@nxp.com>2017-01-18 09:29:33 -0800
commit7c5e1feb1d780cc857632c246e78ac7a8e6cf2d7 (patch)
tree74e3a73c1be3c56594f7e19267838c5a4c4fe81f /arch/arm/cpu/armv8/transition.S
parent2ca84bf7b2d7930b424b19f5027d3c06ec7cb696 (diff)
armv8: aarch64: Fix the warning about x1-x3 nonzero issue
For 64-bit kernel, there is a warning about x1-x3 nonzero in violation of boot protocol. To fix this issue, input argument 4 is added for armv8_switch_to_el2 and armv8_switch_to_el1. The input argument 4 will be set to the right value, such as zero. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Alexander Graf <agraf@suse.de> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/arm/cpu/armv8/transition.S')
-rw-r--r--arch/arm/cpu/armv8/transition.S22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/cpu/armv8/transition.S b/arch/arm/cpu/armv8/transition.S
index adb9f3566b..ca07465376 100644
--- a/arch/arm/cpu/armv8/transition.S
+++ b/arch/arm/cpu/armv8/transition.S
@@ -11,9 +11,9 @@
#include <asm/macro.h>
ENTRY(armv8_switch_to_el2)
- switch_el x5, 1f, 0f, 0f
+ switch_el x6, 1f, 0f, 0f
0:
- cmp x4, #ES_TO_AARCH64
+ cmp x5, #ES_TO_AARCH64
b.eq 2f
/*
* When loading 32-bit kernel, it will jump
@@ -22,23 +22,23 @@ ENTRY(armv8_switch_to_el2)
bl armv8_el2_to_aarch32
2:
/*
- * x3 is kernel entry point or switch_to_el1
+ * x4 is kernel entry point or switch_to_el1
* if CONFIG_ARMV8_SWITCH_TO_EL1 is defined.
* When running in EL2 now, jump to the
- * address saved in x3.
+ * address saved in x4.
*/
- br x3
-1: armv8_switch_to_el2_m x3, x4, x5
+ br x4
+1: armv8_switch_to_el2_m x4, x5, x6
ENDPROC(armv8_switch_to_el2)
ENTRY(armv8_switch_to_el1)
- switch_el x5, 0f, 1f, 0f
+ switch_el x6, 0f, 1f, 0f
0:
- /* x3 is kernel entry point. When running in EL1
- * now, jump to the address saved in x3.
+ /* x4 is kernel entry point. When running in EL1
+ * now, jump to the address saved in x4.
*/
- br x3
-1: armv8_switch_to_el1_m x3, x4, x5
+ br x4
+1: armv8_switch_to_el1_m x4, x5, x6
ENDPROC(armv8_switch_to_el1)
WEAK(armv8_el2_to_aarch32)