summaryrefslogtreecommitdiff
path: root/plat/imx/imx8mm/imx8mm_bl31_setup.c
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-05-15 23:50:21 -0700
committerAbel Vesa <abel.vesa@nxp.com>2018-06-11 10:33:03 +0300
commitd5158f18b0b6e13760eb92afeff0a4129f63de4b (patch)
tree504b7adca7df7f45722028736673d61902a90f0e /plat/imx/imx8mm/imx8mm_bl31_setup.c
parent6aafe1fcd7296eded1163d919b6ce018487e8645 (diff)
imx8mm: add HAB support
Similar to imx8mq, the U-boot calls SIP call for HAB interfaces, and trap to ATF to run the HAB. Since HAB codes locates in ROM, and need to access OCRAM, CAAM RAM and DDR to authenticate image. Add these relevant memory region to MMU. Also extend the stack size of each core to avoid stack overflow, and extend the BL31 limit to OCRAM end 0x940000. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'plat/imx/imx8mm/imx8mm_bl31_setup.c')
-rw-r--r--plat/imx/imx8mm/imx8mm_bl31_setup.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/plat/imx/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8mm/imx8mm_bl31_setup.c
index 310832ff..861d788c 100644
--- a/plat/imx/imx8mm/imx8mm_bl31_setup.c
+++ b/plat/imx/imx8mm/imx8mm_bl31_setup.c
@@ -173,9 +173,18 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
void bl31_plat_arch_setup(void)
{
/* add the mmap */
- mmap_add_region(BL31_BASE, BL31_BASE, 0x10000, MT_MEMORY | MT_RW);
+ mmap_add_region(0x900000, 0x900000, 0x40000,
+ MT_MEMORY | MT_RW);
+ mmap_add_region(0x100000, 0x100000, 0x10000,
+ MT_MEMORY | MT_RW);
+ mmap_add_region(0x40000000, 0x40000000, 0xc0000000,
+ MT_MEMORY | MT_RW | MT_NS);
+
mmap_add_region(BL31_BASE, BL31_BASE, BL31_RO_LIMIT - BL31_RO_BASE,
MT_MEMORY | MT_RO);
+
+ mmap_add_region(IMX_ROM_BASE, IMX_ROM_BASE,
+ 0x40000, MT_MEMORY | MT_RO);
/* Map GPV */
mmap_add_region(IMX_GPV_BASE, IMX_GPV_BASE, IMX_GPV_SIZE, MT_DEVICE | MT_RW);
/* Map AIPS 1~3 */