summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rmobile
diff options
context:
space:
mode:
authorAlison Wang <b18965@freescale.com>2016-11-10 02:49:03 (GMT)
committerYork Sun <york.sun@nxp.com>2016-11-22 19:40:24 (GMT)
commitec6617c39741adc6c54952564579e32c3c09c66f (patch)
tree2c65fb7ab999e39eb6acc0be8890eced30c950a1 /arch/arm/mach-rmobile
parent95e74a3df75bf01eaf69f5c28f9aa2db6568e901 (diff)
downloadu-boot-ec6617c39741adc6c54952564579e32c3c09c66f.tar.xz
armv8: Support loading 32-bit OS in AArch32 execution state
To support loading a 32-bit OS, the execution state will change from AArch64 to AArch32 when jumping to kernel. The architecture information will be got through checking FIT image, then U-Boot will load 32-bit OS or 64-bit OS automatically. Signed-off-by: Ebony Zhu <ebony.zhu@nxp.com> Signed-off-by: Alison Wang <alison.wang@nxp.com> Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/arm/mach-rmobile')
-rw-r--r--arch/arm/mach-rmobile/lowlevel_init_gen3.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-rmobile/lowlevel_init_gen3.S b/arch/arm/mach-rmobile/lowlevel_init_gen3.S
index 88ff56e..11acce0 100644
--- a/arch/arm/mach-rmobile/lowlevel_init_gen3.S
+++ b/arch/arm/mach-rmobile/lowlevel_init_gen3.S
@@ -61,11 +61,18 @@ ENTRY(lowlevel_init)
/*
* All slaves will enter EL2 and optionally EL1.
*/
+ adr x3, lowlevel_in_el2
+ ldr x4, =ES_TO_AARCH64
bl armv8_switch_to_el2
+
+lowlevel_in_el2:
#ifdef CONFIG_ARMV8_SWITCH_TO_EL1
+ adr x3, lowlevel_in_el1
+ ldr x4, =ES_TO_AARCH64
bl armv8_switch_to_el1
-#endif
+lowlevel_in_el1:
+#endif
#endif /* CONFIG_ARMV8_MULTIENTRY */
bl s_init