]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(imx8mn): add BL31 PIE support
authorMarco Felsch <m.felsch@pengutronix.de>
Mon, 4 Jul 2022 10:18:34 +0000 (12:18 +0200)
committerMarco Felsch <m.felsch@pengutronix.de>
Thu, 20 Oct 2022 16:21:33 +0000 (18:21 +0200)
Enable PIE support so the BL31 firmware can be loaded from anywhere
within the OCRAM (SRAM). For the PIE support we only need to replace the
BL31_BASE define by the BL31_START symbol which is a relocatable and we
need to enable it by setting ENABLE_PIE := 1.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: I33c8e35c35112d70d2725eebe484a853a8aad9e0

plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
plat/imx/imx8m/imx8mn/platform.mk

index da5c9eecfc660fbfd2bf3608d0483835cd794cc9..c8b2ce746df66d2a72fd0e8df6eb3bdacecba3c7 100644 (file)
@@ -180,7 +180,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
 }
 
 #define MAP_BL31_TOTAL                                                                            \
-       MAP_REGION_FLAT(BL31_BASE, BL31_SIZE, MT_MEMORY | MT_RW | MT_SECURE)
+       MAP_REGION_FLAT(BL31_START, BL31_SIZE, MT_MEMORY | MT_RW | MT_SECURE)
 #define MAP_BL31_RO                                                                               \
        MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE, MT_MEMORY | MT_RO | MT_SECURE)
 #define MAP_COHERENT_MEM                                                                          \
index 0f3ad1a20542bd4507baeec61543a5b0fd9b317b..8b93ed461ca0117b1291ec5f2486c1a129572e2f 100644 (file)
@@ -47,6 +47,7 @@ BL31_SOURCES          +=      plat/imx/common/imx8_helpers.S                  \
                                ${IMX_GIC_SOURCES}                              \
                                ${XLAT_TABLES_LIB_SRCS}
 
+ENABLE_PIE             :=      1
 USE_COHERENT_MEM       :=      1
 RESET_TO_BL31          :=      1
 A53_DISABLE_NON_TEMPORAL_HINT := 0