summaryrefslogtreecommitdiff
path: root/include/tpm-v2.h
diff options
context:
space:
mode:
authorRuchika Gupta <ruchika.gupta@linaro.org>2021-11-29 13:09:45 +0530
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-11-30 09:23:49 +0100
commit2957a1e22407a84a2cc7c4ea5a8136af1d0278d9 (patch)
tree7f4cc42de253c761e6d94906a6f777e3216b8174 /include/tpm-v2.h
parent34287efdaf6ed186a64445f65227b5407a1dcd63 (diff)
tpm: use more algorithms than sha256 on pcr_read
The current tpm2_pcr_read is hardcoded using SHA256. Make the actual command to TPM configurable to use wider range of algorithms. The current command line is kept as is i.e limited to SHA-256 only. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r--include/tpm-v2.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index ceff7d245e..4e9dd52cb6 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -512,13 +512,16 @@ u32 tpm2_nv_write_value(struct udevice *dev, u32 index, const void *data,
* @dev TPM device
* @idx Index of the PCR
* @idx_min_sz Minimum size in bytes of the pcrSelect array
+ * @algorithm Algorithm used, defined in 'enum tpm2_algorithms'
* @data Output buffer for contents of the named PCR
+ * @digest_len len of the data
* @updates Optional out parameter: number of updates for this PCR
*
* @return code of the operation
*/
u32 tpm2_pcr_read(struct udevice *dev, u32 idx, unsigned int idx_min_sz,
- void *data, unsigned int *updates);
+ u16 algorithm, void *data, u32 digest_len,
+ unsigned int *updates);
/**
* Issue a TPM2_GetCapability command. This implementation is limited