summaryrefslogtreecommitdiff
path: root/plat/imx/common/imx_sip_svc.c
diff options
context:
space:
mode:
authorFranck LENORMAND <franck.lenormand@nxp.com>2020-08-10 12:07:47 +0200
committerFranck LENORMAND <franck.lenormand@nxp.com>2020-08-13 15:13:56 +0200
commit7ad9e7ab4cc7ede448bffd37ecd6ec69002e17e3 (patch)
tree74eddbb15b627a3e6751ad7fc5f8a9b0bce90e0f /plat/imx/common/imx_sip_svc.c
parentfac431ed6755c1b66511838e350a987b2ddcb9fb (diff)
MLK-24474: Add SIP call to enable FIPS mode
The configuration of the FIPS alter the SoC which is configured and cannot be reverted so the support SHALL NOT be in customer binary as it could lead to DoS of the SECO. We add a SIP service to configure the FIPS mode. It is added to the ATF because it is the only component with the required permissions to successfully perform the call. This service currently only allow to set the FIPS mode with a value but can be extended. IT can be called from other components like uboot or the OS. The support is added only if the bl31 is compiled with FIPS_CONFIG defined which happens when FIPS_CONFIG=on is passed as option to Makefile. Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com> Acked-by: Anson Huang <anson.huang@nxp.com> Acked-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'plat/imx/common/imx_sip_svc.c')
-rw-r--r--plat/imx/common/imx_sip_svc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plat/imx/common/imx_sip_svc.c b/plat/imx/common/imx_sip_svc.c
index 2fad4740..f0b9efd3 100644
--- a/plat/imx/common/imx_sip_svc.c
+++ b/plat/imx/common/imx_sip_svc.c
@@ -71,6 +71,10 @@ static uintptr_t imx_sip_handler(unsigned int smc_fid,
return imx_otp_handler(smc_fid, handle, x1, x2);
case IMX_SIP_MISC_SET_TEMP:
SMC_RET1(handle, imx_misc_set_temp_handler(smc_fid, x1, x2, x3, x4));
+#ifdef FIPS_CONFIG
+ case IMX_SIP_FIPS_CONFIG:
+ SMC_RET1(handle, fips_config_handler(smc_fid, x1, x2, x3, x4));
+#endif
#endif
case IMX_SIP_BUILDINFO:
SMC_RET1(handle, imx_buildinfo_handler(smc_fid, x1, x2, x3, x4));