diff options
author | Peng Fan <peng.fan@nxp.com> | 2017-10-18 15:55:06 +0800 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2018-06-11 10:08:40 +0300 |
commit | f5062a6d91f7ddadb519793e3f1432d7a1a70abd (patch) | |
tree | bff71fb61c28e5e614ccb057bdcd1c00200c662d /plat | |
parent | 6fb035381ce6857444af4860a095a1552764abb0 (diff) |
imx8mq: add TEE support
TEE entry is defined as 0xFE000000. When there is SPD passed to makefile
, TEE_IMX8 will be defined.
Compiling OP-TEE support using "make PLAT=imx8mq bl31 SPD=opteed"
Note:
Since TEE image is located at DRAM 0xFE000000, so need to reserve
this space in UBoot and Kernel, by using gd->dram_size =
PHYS_SDRAM_SIZE - SZ_32M or else.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'plat')
-rw-r--r-- | plat/imx/imx8mq/imx8m_bl31_setup.c | 7 | ||||
-rw-r--r-- | plat/imx/imx8mq/include/platform_def.h | 1 | ||||
-rw-r--r-- | plat/imx/imx8mq/platform.mk | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/plat/imx/imx8mq/imx8m_bl31_setup.c b/plat/imx/imx8mq/imx8m_bl31_setup.c index 96b67b19..dc81fb4c 100644 --- a/plat/imx/imx8mq/imx8m_bl31_setup.c +++ b/plat/imx/imx8mq/imx8m_bl31_setup.c @@ -184,6 +184,13 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, bl33_image_ep_info.spsr = get_spsr_for_bl33_entry(); SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE); +#ifdef TEE_IMX8 + /* 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; +#endif bl31_tzc380_setup(); } diff --git a/plat/imx/imx8mq/include/platform_def.h b/plat/imx/imx8mq/include/platform_def.h index 13a4641f..3b370507 100644 --- a/plat/imx/imx8mq/include/platform_def.h +++ b/plat/imx/imx8mq/include/platform_def.h @@ -21,6 +21,7 @@ #define BL31_BASE 0x910000 #define BL31_LIMIT 0x920000 +#define BL32_BASE 0xfe000000 /* non-secure uboot base */ #define PLAT_NS_IMAGE_OFFSET 0x40200000 diff --git a/plat/imx/imx8mq/platform.mk b/plat/imx/imx8mq/platform.mk index 1327ab0c..743dd514 100644 --- a/plat/imx/imx8mq/platform.mk +++ b/plat/imx/imx8mq/platform.mk @@ -28,4 +28,7 @@ MULTI_CONSOLE_API := 1 RESET_TO_BL31 := 1 ERROR_DEPRECATED := 1 XLAT_TABLE_IN_OCRAM_S := 1 +ifneq (${SPD},none) +$(eval $(call add_define,TEE_IMX8)) +endif $(eval $(call add_define,XLAT_TABLE_IN_OCRAM_S)) |