mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
feat(imx8mm): optionally take params from BL2
Optionally take params from BL2 to offer more flexibility to BL2 on where and if a BL32 image is expected. This uses imx_bl31_params_parse() to check if arg0 can safely be accessed as a pointer and actually contains a bl_params_t structure. If not, the hardcoded parameter values are used as before. Change-Id: I06b3012c67e43ea1e42946d863226bd93ccd4638 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
02d1813e87
commit
11d32b33ea
3 changed files with 13 additions and 2 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <imx8m_ccm.h>
|
||||
#include <imx8m_csu.h>
|
||||
#include <imx8m_snvs.h>
|
||||
#include <plat_common.h>
|
||||
#include <plat_imx8.h>
|
||||
|
||||
#define TRUSTY_PARAMS_LEN_BYTES (4096*2)
|
||||
|
@ -154,7 +155,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|||
{
|
||||
unsigned int console_base = IMX_BOOT_UART_BASE;
|
||||
static console_t console;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
/* Enable CSU NS access permission */
|
||||
for (i = 0; i < 64; i++) {
|
||||
|
@ -207,6 +208,13 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|||
bl32_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR;
|
||||
#endif
|
||||
#endif
|
||||
ret = imx_bl31_params_parse(arg0, IMX_NS_OCRAM_SIZE, IMX_NS_OCRAM_BASE,
|
||||
&bl32_image_ep_info, &bl33_image_ep_info);
|
||||
if (ret != 0) {
|
||||
ret = imx_bl31_params_parse(arg0, IMX_TCM_BASE, IMX_TCM_SIZE,
|
||||
&bl32_image_ep_info,
|
||||
&bl33_image_ep_info);
|
||||
}
|
||||
|
||||
#if !defined(SPD_opteed) && !defined(SPD_trusty)
|
||||
enable_snvs_privileged_access();
|
||||
|
|
|
@ -118,6 +118,8 @@
|
|||
#define IMX_ROM_SIZE U(0x40000)
|
||||
#define IMX_NS_OCRAM_BASE U(0x900000)
|
||||
#define IMX_NS_OCRAM_SIZE U(0x20000)
|
||||
#define IMX_TCM_BASE U(0x7E0000)
|
||||
#define IMX_TCM_SIZE U(0x40000)
|
||||
#define IMX_CAAM_RAM_BASE U(0x100000)
|
||||
#define IMX_CAAM_RAM_SIZE U(0x10000)
|
||||
#define IMX_DRAM_BASE U(0x40000000)
|
||||
|
|
|
@ -30,7 +30,8 @@ IMX_GIC_SOURCES := ${GICV3_SOURCES} \
|
|||
plat/common/plat_psci_common.c \
|
||||
plat/imx/common/plat_imx8_gic.c
|
||||
|
||||
BL31_SOURCES += plat/imx/common/imx8_helpers.S \
|
||||
BL31_SOURCES += common/desc_image_load.c \
|
||||
plat/imx/common/imx8_helpers.S \
|
||||
plat/imx/imx8m/gpc_common.c \
|
||||
plat/imx/imx8m/imx_hab.c \
|
||||
plat/imx/imx8m/imx_aipstz.c \
|
||||
|
|
Loading…
Add table
Reference in a new issue