From fac431ed6755c1b66511838e350a987b2ddcb9fb Mon Sep 17 00:00:00 2001 From: Franck LENORMAND Date: Mon, 10 Aug 2020 10:12:42 +0200 Subject: MLK-24474: Add SECO API sc_seco_set_fips_mode The SCFW API sc_seco_set_fips_mode allow to configure the mode of the FIPS feature on SoC. This configuration is performed on fuses and cannot be reverted. Signed-off-by: Franck LENORMAND Acked-by: Anson Huang Acked-by: Ye Li --- plat/imx/common/sci/svc/seco/seco_rpc_clnt.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'plat/imx/common/sci/svc/seco/seco_rpc_clnt.c') diff --git a/plat/imx/common/sci/svc/seco/seco_rpc_clnt.c b/plat/imx/common/sci/svc/seco/seco_rpc_clnt.c index 5b98ebd2..03923a69 100644 --- a/plat/imx/common/sci/svc/seco/seco_rpc_clnt.c +++ b/plat/imx/common/sci/svc/seco/seco_rpc_clnt.c @@ -626,4 +626,25 @@ sc_err_t sc_seco_secvio_dgo_config(sc_ipc_t ipc, uint8_t id, uint8_t access, return err; } +sc_err_t sc_seco_set_fips_mode(sc_ipc_t ipc, uint8_t mode, uint32_t *status) +{ + sc_rpc_msg_t msg; + sc_err_t err; + + RPC_VER(&msg) = SC_RPC_VERSION; + RPC_SIZE(&msg) = 2U; + RPC_SVC(&msg) = U8(SC_RPC_SVC_SECO); + RPC_FUNC(&msg) = U8(SECO_FUNC_SET_FIPS_MODE); + + RPC_U8(&msg, 0U) = mode; + + sc_call_rpc(ipc, &msg, SC_FALSE); + + if (status) + *status = (uint32_t)RPC_U32(&msg, 0U); + + err = RPC_R8(&msg); + return (sc_err_t)err; +} + /**@}*/ -- cgit v1.2.3