summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorJohn Ripple <[email protected]>2025-09-09 13:53:22 -0600
committerFabio Estevam <[email protected]>2025-09-20 17:45:39 -0300
commitb717a4090fb0fda4814bbc9d9a91396710294cfb (patch)
tree00f4ffe72d324a2659a6ae44de3f1f337d57b31e /drivers/misc
parent464800d91b036cfd2df26598d8df2ac72d4569dd (diff)
imx8: Add ahab_commit command
The ahab_commit command allows the user to commit into the SECO fuses that control the SRK key revocation information. This is used to Revoke compromised SRK keys. To use ahab_commit, the boot container must be built with an SRK revocation bit mask that is not 0x0. For the SPSDK provided by NXP, this means setting the 'srk_revoke_mask' option in the config file used to sign the boot container. The 'ahab_commit 0x10' can then be used to commit the SRK revocation information into the SECO fuses. Signed-off-by: John Ripple <[email protected]>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/imx8/scu_api.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index 8985ab6584d..d9cc7acb970 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -1286,3 +1286,34 @@ int sc_seco_secvio_dgo_config(sc_ipc_t ipc, u8 id, u8 access, u32 *data)
return ret;
}
+
+int sc_seco_commit(sc_ipc_t ipc, u32 *info)
+{
+ struct udevice *dev = gd->arch.scu_dev;
+ struct sc_rpc_msg_s msg;
+ int size = sizeof(struct sc_rpc_msg_s);
+ int ret;
+
+ /* Fill in header */
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SIZE(&msg) = 2U;
+ RPC_SVC(&msg) = (u8)SC_RPC_SVC_SECO;
+ RPC_FUNC(&msg) = (u8)SECO_FUNC_COMMIT;
+
+ /* Fill in send message */
+ RPC_U32(&msg, 0U) = *info;
+
+ /* Call RPC */
+ ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size);
+ if (ret)
+ return ret;
+
+ /* Copy out result */
+ ret = (int)RPC_R8(&msg);
+
+ /* Copy out receive message */
+ if (!ret)
+ *info = RPC_U32(&msg, 0U);
+
+ return ret;
+}