From 5d2d3328db88846accd179c96d71bab79a150937 Mon Sep 17 00:00:00 2001 From: Marco Felsch Date: Tue, 5 Jul 2022 15:00:44 +0200 Subject: [PATCH] feat(imx8m): make psci common code pie compatible Swap the BL31_BASE define with the BL31_START symbol. This is required for later added PIE support because the symbol location can be relocated whereas the define can't be relocated. In case of disabled PIE support BL31_START equals BL31_BASE and so we don't need a ifdef. Signed-off-by: Marco Felsch Change-Id: Ic1bbf3af5b346898bfcbb207ffc27d9a5bdcaae7 --- plat/imx/imx8m/imx8m_psci_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plat/imx/imx8m/imx8m_psci_common.c b/plat/imx/imx8m/imx8m_psci_common.c index 4df4f8edc..aab849770 100644 --- a/plat/imx/imx8m/imx8m_psci_common.c +++ b/plat/imx/imx8m/imx8m_psci_common.c @@ -40,7 +40,7 @@ int imx_validate_ns_entrypoint(uintptr_t ns_entrypoint) int imx_pwr_domain_on(u_register_t mpidr) { unsigned int core_id; - uint64_t base_addr = BL31_BASE; + uint64_t base_addr = BL31_START; core_id = MPIDR_AFFLVL0_VAL(mpidr); @@ -102,7 +102,7 @@ void imx_cpu_standby(plat_local_state_t cpu_state) void imx_domain_suspend(const psci_power_state_t *target_state) { - uint64_t base_addr = BL31_BASE; + uint64_t base_addr = BL31_START; uint64_t mpidr = read_mpidr_el1(); unsigned int core_id = MPIDR_AFFLVL0_VAL(mpidr); -- 2.39.5