Browse Source

refactor(imx8mn): introduce BL31_SIZE

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
pull/1989/head
Marco Felsch 2 years ago
parent
commit
796a249c2d
  1. 2
      plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
  2. 6
      plat/imx/imx8m/imx8mn/include/platform_def.h

2
plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c

@ -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 \

6
plat/imx/imx8m/imx8mn/include/platform_def.h

@ -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)

Loading…
Cancel
Save