[U-Boot] [PATCH 8/8] ARMv8: PSCI: Enable SMC

Arnab Basu
2014-08-27T20:30:01Z

Enable the SMC instruction so that the kernel can use the psci code

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/include/asm/macro.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/macro.h b/arch/arm/include/asm/macro.h
index 0009c28..94a1e68 100644
--- a/arch/arm/include/asm/macro.h
+++ b/arch/arm/include/asm/macro.h
@@ -106,7 +106,11 @@ lr .req x30
.endm

.macro armv8_switch_to_el2_m, xreg1
+#ifdef CONFIG_ARMV8_PSCI
+ mov \xreg1, #0x531 /* Non-secure EL0/EL1 | HVC | 64bit EL2 */
+#else
mov \xreg1, #0x5b1 /* Non-secure EL0/EL1 | HVC | 64bit EL2 */
+#endif
msr scr_el3, \xreg1
msr cptr_el3, xzr /* Disable coprocessor traps to EL3 */
mov \xreg1, #0x33ff
--
1.7.7.4