]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
refactor(imx8mq): introduce BL31_SIZE
authorLucas Stach <l.stach@pengutronix.de>
Thu, 8 Dec 2022 15:37:44 +0000 (16:37 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 13 Dec 2022 10:08:42 +0000 (11:08 +0100)
No functional change.

Introduce BL31_SIZE define and calculate the limits based on the
BL31_BASE and the BL31_SIZE define. Also make use of SZ_64K 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.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Change-Id: I517074b866b5bf11841b51777f87c926b304488d

plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
plat/imx/imx8m/imx8mq/include/platform_def.h

index 195db02d0c54b23c9f6c2384def0fd7fd8a2d626..61c92a2473be426207aa016f17b6374873f9be73 100644 (file)
@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
 void bl31_plat_arch_setup(void)
 {
        const mmap_region_t bl_regions[] = {
-               MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
+               MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
                                MT_MEMORY | MT_RW | MT_SECURE),
                MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE,
                                MT_MEMORY | MT_RO | MT_SECURE),
index 103f2e4087e20bc78a05ece2671729f0dfe3010c..bb570748f5730b8f014d705546a6084ae9e0402f 100644 (file)
@@ -4,6 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
+#include <plat/common/common_def.h>
+
 #define PLATFORM_LINKER_FORMAT         "elf64-littleaarch64"
 #define PLATFORM_LINKER_ARCH           aarch64
 
@@ -31,7 +33,8 @@
 #define PLAT_STOP_OFF_STATE            U(3)
 
 #define BL31_BASE                      U(0x910000)
-#define BL31_LIMIT                     U(0x920000)
+#define BL31_SIZE                      SZ_64K
+#define BL31_LIMIT                     (BL31_BASE + BL31_SIZE)
 
 /* non-secure uboot base */
 #define PLAT_NS_IMAGE_OFFSET           U(0x40200000)