summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Schocher <[email protected]>2025-11-18 05:30:41 +0100
committerTom Rini <[email protected]>2025-12-04 09:38:58 -0600
commit7c3f05ad51e4bc23dd4f411f28968f1d8f43099c (patch)
tree5368efdf970d4f807e2d032152b4bf38deda568f /include
parent213601a600f1e8894cea76b0bfc131f038882407 (diff)
tpm2: add sm3 256 hash support
add sm3 256 hash support, so TPM2 chips which report 5 pcrs with sm3 hash do not fail with: u-boot=> tpm2 autostart tpm2_get_pcr_info: too many pcrs: 5 Error: -90 Signed-off-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/tpm-v2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index f3eb2ef5643..a776d24d71f 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -345,6 +345,18 @@ static const struct digest_info hash_algo_list[] = {
false,
#endif
},
+ {
+ "sm3_256",
+ TPM2_ALG_SM3_256,
+ TCG2_BOOT_HASH_ALG_SM3_256,
+ TPM2_SM3_256_DIGEST_SIZE,
+#if IS_ENABLED(CONFIG_SM3)
+ true,
+#else
+ false,
+#endif
+ },
+
};
/* NV index attributes */