From: Marco Felsch <m.felsch@xxxxxxxxxxxxxx> The HAB code needs an special [Unlock] instruction to keep the SRK_REVOKE fuse bank unlocked. This is required if a key needs to be revoked. Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx> Signed-off-by: Stefan Kerkmann <s.kerkmann@xxxxxxxxxxxxxx> --- arch/arm/mach-imx/Kconfig | 8 ++++++++ include/mach/imx/habv4-imx8-gencsf.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index d1f8dc795b578fafd2bd2b4c1e59b85430668af7..c8a439b8a0b11fa168419ce77d7ee83fa86f2298 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -830,6 +830,14 @@ config HABV4_QSPI help Enable this option to build signed QSPI/FlexSPI images. +config HABV4_CSF_SRK_REVOKE_UNLOCK + depends on HABV4 + bool "Unlock SRK revocation" + help + Enable this option to instruct the HAB code to not lock + the SRK_REVOKE_LOCK sticky bit. This is required for key + revocation. Don't enable this if you are unsure. + config HAB_CERTS_ENV depends on HAB bool "Specify certificates in environment" diff --git a/include/mach/imx/habv4-imx8-gencsf.h b/include/mach/imx/habv4-imx8-gencsf.h index 5f92ceceab00bcb740fc288c050be23e1ed307c2..b3d29f5896881ba2abeaa6d4b297a031240fac99 100644 --- a/include/mach/imx/habv4-imx8-gencsf.h +++ b/include/mach/imx/habv4-imx8-gencsf.h @@ -36,6 +36,12 @@ hab [Unlock] hab Engine = CAAM hab Features = RNG, MID +#if defined(CONFIG_HABV4_CSF_SRK_REVOKE_UNLOCK) +hab [Unlock] +hab Engine = OCOTP +hab Features = SRK REVOKE +#endif + hab [Install Key] /* verification key index in key store (0, 2...4) */ hab Verification index = 0 -- 2.39.5