diff options
author | Franck LENORMAND <franck.lenormand@nxp.com> | 2020-08-10 10:12:42 +0200 |
---|---|---|
committer | Franck LENORMAND <franck.lenormand@nxp.com> | 2020-08-13 15:13:52 +0200 |
commit | fac431ed6755c1b66511838e350a987b2ddcb9fb (patch) | |
tree | 64ae1f3e99554546c6fa04b3835995134db5c83f /plat/imx/common/sci/svc/seco/seco_rpc_clnt.c | |
parent | e39a0c329049cc8e281adda98fa3071b4bdac87a (diff) |
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 <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/sci/svc/seco/seco_rpc_clnt.c')
-rw-r--r-- | plat/imx/common/sci/svc/seco/seco_rpc_clnt.c | 21 |
1 files changed, 21 insertions, 0 deletions
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; +} + /**@}*/ |