summaryrefslogtreecommitdiff
path: root/lib/efi_loader
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 /lib/efi_loader
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 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_tcg2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index 1832eeb5dce..bdf78897d47 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -430,6 +430,9 @@ static efi_status_t tcg2_hash_pe_image(void *efi, u64 efi_size,
case TPM2_ALG_SHA512:
hash_calculate("sha512", regs->reg, regs->num, hash);
break;
+ case TPM2_ALG_SM3_256:
+ hash_calculate("sm3_256", regs->reg, regs->num, hash);
+ break;
default:
continue;
}