]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
stm32mp1: check stronger the secondary CPU entry point
authorEtienne Carriere <etienne.carriere@st.com>
Mon, 8 Jun 2020 18:25:08 +0000 (20:25 +0200)
committerEtienne Carriere <etienne.carriere@st.com>
Tue, 23 Jun 2020 07:21:56 +0000 (09:21 +0200)
When using SP_min as monitor, only sp_min_warm_entrypoint() is a valid
secure entry point.

Change-Id: I440cec798e901b11a34dd482c33b2e378a8328ab
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
plat/st/stm32mp1/stm32mp1_pm.c

index cf9fa8e696c810d75171657692b22b82604ae679..31a9ae7f13956dfd3ea12e4bb268f33d226872e1 100644 (file)
@@ -10,6 +10,7 @@
 #include <platform_def.h>
 
 #include <arch_helpers.h>
+#include <bl32/sp_min/platform_sp_min.h>
 #include <common/debug.h>
 #include <drivers/arm/gic_common.h>
 #include <drivers/arm/gicv2.h>
@@ -68,9 +69,8 @@ static int stm32_pwr_domain_on(u_register_t mpidr)
                return PSCI_E_INVALID_PARAMS;
        }
 
-       if ((stm32_sec_entrypoint < STM32MP_SYSRAM_BASE) ||
-           (stm32_sec_entrypoint > (STM32MP_SYSRAM_BASE +
-                                    (STM32MP_SYSRAM_SIZE - 1)))) {
+       /* Only one valid entry point */
+       if (stm32_sec_entrypoint != (uintptr_t)&sp_min_warm_entrypoint) {
                return PSCI_E_INVALID_ADDRESS;
        }