]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
refactor(imx8mn): introduce BL31_SIZE
authorMarco Felsch <m.felsch@pengutronix.de>
Mon, 4 Jul 2022 10:14:54 +0000 (12:14 +0200)
committerMarco Felsch <m.felsch@pengutronix.de>
Thu, 20 Oct 2022 16:21:33 +0000 (18:21 +0200)
Introduce BL31_SIZE define and calculate the limit based on the
BL31_BASE and the BL31_SIZE define. Also make use of SZ_128K to make it
easier to read. This is required for later BL31 PIE support since it
drops the calculation based on the BL31_LIMIT and BL31_BASE.

While on it remove the duplicated <lib/utils_def.h> include.

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

plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
plat/imx/imx8m/imx8mn/include/platform_def.h

index 34ee5bcac12f973207aacf276f902eb0e8fd1699..da5c9eecfc660fbfd2bf3608d0483835cd794cc9 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_LIMIT - BL31_BASE, MT_MEMORY | MT_RW | MT_SECURE)
+       MAP_REGION_FLAT(BL31_BASE, 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 dbb44165c62e5adbdf222d0fa7e669d73902e1fe..e6c4bafa6a5d8d5f1d87d9b1e079b8db4361e32e 100644 (file)
@@ -8,8 +8,7 @@
 
 #include <lib/utils_def.h>
 #include <lib/xlat_tables/xlat_tables_v2.h>
-
-#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
 
 #define PLATFORM_LINKER_FORMAT         "elf64-littleaarch64"
 #define PLATFORM_LINKER_ARCH           aarch64
@@ -42,7 +41,8 @@
 #define PLAT_SDEI_SGI_PRIVATE          U(9)
 
 #define BL31_BASE                      U(0x960000)
-#define BL31_LIMIT                     U(0x980000)
+#define BL31_SIZE                      SZ_128K
+#define BL31_LIMIT                     (BL31_BASE + BL31_SIZE)
 
 /* non-secure uboot base */
 #define PLAT_NS_IMAGE_OFFSET           U(0x40200000)