Browse Source

feat(imx8m): enable the coram_s tz by default on imx8mn/mp

Enable the OCRAM_S TZ for secure protection by default on
i.MX8MN/i.MX8MP. And lock the ocram secure access configure
on i.MX8MM/i.MX8MP.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I2e24f4b823ee5f804415218d5c2e371f4e4c6fe1
pull/1985/head
Jacky Bai 4 years ago
parent
commit
d5ede92d78
  1. 5
      plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
  2. 5
      plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c

5
plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c

@ -117,6 +117,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3)
{
static console_t console;
unsigned int val;
int i;
/* Enable CSU NS access permission */
@ -131,7 +132,9 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
imx_csu_init(csu_cfg);
/* config the ocram memory range for secure access */
mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, 0xc1);
mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, 0x4c1);
val = mmio_read_32(IMX_IOMUX_GPR_BASE + 0x2c);
mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
imx8m_caam_init();

5
plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c

@ -113,6 +113,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3)
{
static console_t console;
unsigned int val;
unsigned int i;
/* Enable CSU NS access permission */
@ -127,7 +128,9 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
imx_csu_init(csu_cfg);
/* config the ocram memory range for secure access */
mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, 0xc1);
mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, 0x4E1);
val = mmio_read_32(IMX_IOMUX_GPR_BASE + 0x2c);
mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
imx8m_caam_init();

Loading…
Cancel
Save