summaryrefslogtreecommitdiff
path: root/include/tpm-v2.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-05-15 11:57:17 +0200
committerTom Rini <trini@konsulko.com>2018-05-25 20:12:58 -0400
commit69cd8f0681f44c85365157e87dc6d36d17e3993d (patch)
tree7ded37c544fcd23a590a5c00e13318a2e67871e4 /include/tpm-v2.h
parent1c4ea8f496b42c5c34634d78524937476539a8bd (diff)
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 <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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index 2b8600a185..7c2f6e91cd 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 */