From 21e6fcbe4ad1fcaf340fe28b0e60f30c73fecfad Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sat, 19 May 2018 12:15:38 +0200 Subject: [PATCH] Create 0003-allow-secure-monitor-code-to-be-built-without-PSCI.patch --- ...onitor-code-to-be-built-without-PSCI.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 buildroot-external/board/rpi3/patches/barebox/0003-allow-secure-monitor-code-to-be-built-without-PSCI.patch diff --git a/buildroot-external/board/rpi3/patches/barebox/0003-allow-secure-monitor-code-to-be-built-without-PSCI.patch b/buildroot-external/board/rpi3/patches/barebox/0003-allow-secure-monitor-code-to-be-built-without-PSCI.patch new file mode 100644 index 000000000..0517e64aa --- /dev/null +++ b/buildroot-external/board/rpi3/patches/barebox/0003-allow-secure-monitor-code-to-be-built-without-PSCI.patch @@ -0,0 +1,33 @@ +The hyp mode handling added in the secure monitor code is also useful +when Barebox doesn't have PSCI control. Allow to build without PSCI. + +Signed-off-by: Lucas Stach +--- + arch/arm/cpu/sm_as.S | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S +index 09580e75de5f..0d01e1bf2435 100644 +--- a/arch/arm/cpu/sm_as.S ++++ b/arch/arm/cpu/sm_as.S +@@ -129,7 +129,9 @@ secure_monitor: + sub sp, sp, #4*4 @ allocate result structure on stack + mov r12, sp + push {r4-r6, r12} ++#ifdef CONFIG_ARM_PSCI + bl psci_entry ++#endif + pop {r4-r6, r12} + ldm r12, {r0-r3} + add sp, sp, #4*4 +@@ -163,6 +165,8 @@ ENTRY(psci_cpu_entry) + mcr p15, 0, r0, c1, c0, 1 @ ACTLR + + bl secure_monitor_stack_setup ++#ifdef CONFIG_ARM_PSCI + bl psci_cpu_entry_c ++#endif + + ENDPROC(psci_cpu_entry) +-- +2.15.1