From 69cd8f0681f44c85365157e87dc6d36d17e3993d Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Tue, 15 May 2018 11:57:17 +0200 Subject: tpm: add TPM2_GetCapability command support Add support for the TPM2_GetCapability command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- include/tpm-v2.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2b8600a185c..7c2f6e91cdd 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -177,4 +177,18 @@ u32 tpm2_pcr_extend(u32 index, const uint8_t *digest); u32 tpm2_pcr_read(u32 idx, unsigned int idx_min_sz, void *data, unsigned int *updates); +/** + * Issue a TPM2_GetCapability command. This implementation is limited + * to query property index that is 4-byte wide. + * + * @capability Partition of capabilities + * @property Further definition of capability, limited to be 4 bytes wide + * @buf Output buffer for capability information + * @prop_count Size of output buffer + * + * @return code of the operation + */ +u32 tpm2_get_capability(u32 capability, u32 property, void *buf, + size_t prop_count); + #endif /* __TPM_V2_H */ -- cgit v1.3.1