aboutsummaryrefslogtreecommitdiff
path: root/include/tpm-v2.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-05-15 11:57:16 +0200
committerTom Rini <trini@konsulko.com>2018-05-25 20:12:58 -0400
commit1c4ea8f496b42c5c34634d78524937476539a8bd (patch)
tree19941a966f3e7a1253b8afee1f52351e8723fa8c /include/tpm-v2.h
parent6284be5a904ef808c939c3d926ee720d1b988264 (diff)
downloadu-boot-1c4ea8f496b42c5c34634d78524937476539a8bd.zip
u-boot-1c4ea8f496b42c5c34634d78524937476539a8bd.tar.gz
u-boot-1c4ea8f496b42c5c34634d78524937476539a8bd.tar.bz2
tpm: add TPM2_PCR_Read command support
Add support for the TPM2_PCR_Read command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r--include/tpm-v2.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index 25bb15a..2b8600a 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -164,4 +164,17 @@ u32 tpm2_clear(u32 handle, const char *pw, const ssize_t pw_sz);
*/
u32 tpm2_pcr_extend(u32 index, const uint8_t *digest);
+/**
+ * Issue a TPM2_PCR_Read command.
+ *
+ * @idx Index of the PCR
+ * @idx_min_sz Minimum size in bytes of the pcrSelect array
+ * @data Output buffer for contents of the named PCR
+ * @updates Optional out parameter: number of updates for this PCR
+ *
+ * @return code of the operation
+ */
+u32 tpm2_pcr_read(u32 idx, unsigned int idx_min_sz, void *data,
+ unsigned int *updates);
+
#endif /* __TPM_V2_H */