summaryrefslogtreecommitdiff
path: root/plat/imx/common
diff options
context:
space:
mode:
authorJacky Bai <ping.bai@nxp.com>2020-01-14 16:05:59 +0800
committerJacky Bai <ping.bai@nxp.com>2020-02-09 20:58:49 +0800
commit563016d45a91a9f1501aa43b22e7db9705605346 (patch)
tree30dbdd5cadb3722c2a0f9036de3fb0174fe3abef /plat/imx/common
parent085ba00ae5f1e302fc76a1d146bcbe7d743384bb (diff)
plat: imx8m: Add hab suport on imx8m SoC family
Add the HAB secure boot support for the i.MX8M SoC family. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Diffstat (limited to 'plat/imx/common')
-rw-r--r--plat/imx/common/imx_sip_svc.c6
-rw-r--r--plat/imx/common/include/imx_sip_svc.h15
2 files changed, 21 insertions, 0 deletions
diff --git a/plat/imx/common/imx_sip_svc.c b/plat/imx/common/imx_sip_svc.c
index cf4590ff..6a595571 100644
--- a/plat/imx/common/imx_sip_svc.c
+++ b/plat/imx/common/imx_sip_svc.c
@@ -35,6 +35,9 @@ static uintptr_t imx_sip_handler(unsigned int smc_fid,
break;
case IMX_SIP_DDR_DVFS:
return dram_dvfs_handler(smc_fid, handle, x1, x2, x3);
+ case IMX_SIP_HAB:
+ SMC_RET1(handle, imx_hab_handler(smc_fid, x1, x2, x3, x4));
+ break;
#endif
#if defined(PLAT_imx8mm) || defined(PLAT_imx8mn)
case IMX_SIP_DDR_DVFS:
@@ -42,6 +45,9 @@ static uintptr_t imx_sip_handler(unsigned int smc_fid,
case IMX_SIP_GPC:
SMC_RET1(handle, imx_gpc_handler(smc_fid, x1, x2, x3));
break;
+ case IMX_SIP_HAB:
+ SMC_RET1(handle, imx_hab_handler(smc_fid, x1, x2, x3, x4));
+ break;
#endif
#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx))
case IMX_SIP_SRTC:
diff --git a/plat/imx/common/include/imx_sip_svc.h b/plat/imx/common/include/imx_sip_svc.h
index e6a4dd5a..0deb6ae8 100644
--- a/plat/imx/common/include/imx_sip_svc.h
+++ b/plat/imx/common/include/imx_sip_svc.h
@@ -28,6 +28,15 @@
#define IMX_SIP_GET_SOC_INFO 0xC2000006
+#define IMX_SIP_HAB 0xc2000007
+#define IMX_SIP_HAB_AUTHENTICATE 0x00
+#define IMX_SIP_HAB_ENTRY 0x01
+#define IMX_SIP_HAB_EXIT 0x02
+#define IMX_SIP_HAB_REPORT_EVENT 0x03
+#define IMX_SIP_HAB_REPORT_STATUS 0x04
+#define IMX_SIP_HAB_FAILSAFE 0x05
+#define IMX_SIP_HAB_CHECK_TARGET 0x06
+
#define IMX_SIP_WAKEUP_SRC 0xC2000009
#define IMX_SIP_WAKEUP_SRC_SCU 0x1
#define IMX_SIP_WAKEUP_SRC_IRQSTEER 0x2
@@ -45,6 +54,9 @@ int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
u_register_t x2, u_register_t x3);
int dram_dvfs_handler(uint32_t smc_fid, void *handle,
u_register_t x1, u_register_t x2, u_register_t x3);
+
+int imx_hab_handler(uint32_t smc_fid, u_register_t x1,
+ u_register_t x2, u_register_t x3, u_register_t x4);
#endif
#if defined(PLAT_imx8mm) || defined(PLAT_imx8mn)
int dram_dvfs_handler(uint32_t smc_fid, void *handle,
@@ -52,6 +64,9 @@ int dram_dvfs_handler(uint32_t smc_fid, void *handle,
int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
u_register_t x2, u_register_t x3);
+
+int imx_hab_handler(uint32_t smc_fid, u_register_t x1,
+ u_register_t x2, u_register_t x3, u_register_t x4);
#endif
#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx))