]> git.sur5r.net Git - u-boot/blobdiff - include/tpm-v2.h
tpm: add TPM2_GetCapability command support
[u-boot] / include / tpm-v2.h
index 2b8600a185cadf7d6e6de39d94552f8e641ac8ad..7c2f6e91cdd9538b61e35941b23e214062f9b22f 100644 (file)
@@ -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 */