Browse Source

feat(imx93): add OPTEE support

Add OPTEE support for imx93 platform.
Add support for the device tree overlay.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I99c7819665f8f746b0dd7941fb83dbec9d8651de
pull/1999/head
Clement Faure 2 years ago
committed by Jacky Bai
parent
commit
27a0be77a0
  1. 17
      plat/imx/imx93/imx93_bl31_setup.c
  2. 1
      plat/imx/imx93/include/platform_def.h
  3. 5
      plat/imx/imx93/platform.mk

17
plat/imx/imx93/imx93_bl31_setup.c

@ -73,6 +73,23 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
bl33_image_ep_info.pc = PLAT_NS_IMAGE_OFFSET;
bl33_image_ep_info.spsr = get_spsr_for_bl33_entry();
SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE);
#if defined(SPD_opteed)
/* Populate entry point information for BL32 */
SET_PARAM_HEAD(&bl32_image_ep_info, PARAM_EP, VERSION_1, 0);
SET_SECURITY_STATE(bl32_image_ep_info.h.attr, SECURE);
bl32_image_ep_info.pc = BL32_BASE;
bl32_image_ep_info.spsr = 0;
/* Pass TEE base and size to bl33 */
bl33_image_ep_info.args.arg1 = BL32_BASE;
bl33_image_ep_info.args.arg2 = BL32_SIZE;
/* Make sure memory is clean */
mmio_write_32(BL32_FDT_OVERLAY_ADDR, 0);
bl33_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR;
bl32_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR;
#endif
}
void bl31_plat_arch_setup(void)

1
plat/imx/imx93/include/platform_def.h

@ -34,6 +34,7 @@
/* non-secure uboot base */
/* TODO */
#define PLAT_NS_IMAGE_OFFSET U(0x80200000)
#define BL32_FDT_OVERLAY_ADDR (PLAT_NS_IMAGE_OFFSET + 0x3000000)
/* GICv4 base address */
#define PLAT_GICD_BASE U(0x48000000)

5
plat/imx/imx93/platform.mk

@ -39,3 +39,8 @@ HW_ASSISTED_COHERENCY := 1
USE_COHERENT_MEM := 0
PROGRAMMABLE_RESET_ADDRESS := 1
COLD_BOOT_SINGLE_CPU := 1
BL32_BASE ?= 0x96000000
BL32_SIZE ?= 0x02000000
$(eval $(call add_define,BL32_BASE))
$(eval $(call add_define,BL32_SIZE))

Loading…
Cancel
Save