feat(imx93): 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: Iec885405efd31a6bf6c0e6c532f8d2f31c023333
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2024-01-18 09:59:59 +01:00
parent 7eae1db027
commit 02d1813e87
3 changed files with 9 additions and 1 deletions

View file

@ -20,6 +20,7 @@
#include <plat/common/platform.h>
#include <imx8_lpuart.h>
#include <plat_common.h>
#include <plat_imx8.h>
#include <platform_def.h>
@ -90,6 +91,9 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
bl33_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR;
bl32_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR;
#endif
imx_bl31_params_parse(arg0, OCRAM_BASE, OCRAM_SIZE,
&bl32_image_ep_info, &bl33_image_ep_info);
}
void bl31_plat_arch_setup(void)

View file

@ -31,6 +31,9 @@
#define BL31_BASE U(0x204E0000)
#define BL31_LIMIT U(0x20520000)
#define OCRAM_BASE U(0x20480000)
#define OCRAM_SIZE U(0xA0000)
/* non-secure uboot base */
/* TODO */
#define PLAT_NS_IMAGE_OFFSET U(0x80200000)

View file

@ -19,7 +19,8 @@ IMX_GIC_SOURCES := ${GICV3_SOURCES} \
plat/common/plat_psci_common.c \
plat/imx/common/plat_imx8_gic.c
BL31_SOURCES += plat/common/aarch64/crash_console_helpers.S \
BL31_SOURCES += common/desc_image_load.c \
plat/common/aarch64/crash_console_helpers.S \
plat/imx/imx93/aarch64/plat_helpers.S \
plat/imx/imx93/plat_topology.c \
plat/imx/common/imx_common.c \