diff options
author | Tom Rini <trini@konsulko.com> | 2022-09-03 14:55:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-03 14:55:37 -0400 |
commit | 427aa3c9b72b6672f714389a6f71b6cc2841d559 (patch) | |
tree | 476ad96614cfa09e11674b4f36d74c6e001b3753 /lib/tpm_api.c | |
parent | bc5d11316be3cdf09c6d854070c67ec0952528ee (diff) | |
parent | 5208ed187cb6314dc64657802e8e5bb5a5e3a7fb (diff) |
Merge tag 'tpm-03092022' of https://source.denx.de/u-boot/custodians/u-boot-tpm
TPM fixes and state reporting
Diffstat (limited to 'lib/tpm_api.c')
-rw-r--r-- | lib/tpm_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/tpm_api.c b/lib/tpm_api.c index 032f383ca04..7e8df8795ef 100644 --- a/lib/tpm_api.c +++ b/lib/tpm_api.c @@ -140,15 +140,17 @@ u32 tpm_write_lock(struct udevice *dev, u32 index) } u32 tpm_pcr_extend(struct udevice *dev, u32 index, const void *in_digest, - void *out_digest) + uint size, void *out_digest, const char *name) { - if (tpm_is_v1(dev)) + if (tpm_is_v1(dev)) { return tpm1_extend(dev, index, in_digest, out_digest); - else if (tpm_is_v2(dev)) + } else if (tpm_is_v2(dev)) { return tpm2_pcr_extend(dev, index, TPM2_ALG_SHA256, in_digest, TPM2_DIGEST_LEN); - else + /* @name is ignored as we do not support the TPM log here */ + } else { return -ENOSYS; + } } u32 tpm_pcr_read(struct udevice *dev, u32 index, void *data, size_t count) |