aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm/tpm_int.h
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2017-11-03 22:49:23 -0400
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:15 -0500
commitabc5cda097f46bdb86833a38ee0961a0e6a47ae1 (patch)
treed3d32ae6b6d96a7b9cd3a6e6b8cb831384efb57f /hw/tpm/tpm_int.h
parent56388eee01144d59d5c94a34431a29c75073ba53 (diff)
downloadqemu-abc5cda097f46bdb86833a38ee0961a0e6a47ae1.zip
qemu-abc5cda097f46bdb86833a38ee0961a0e6a47ae1.tar.gz
qemu-abc5cda097f46bdb86833a38ee0961a0e6a47ae1.tar.bz2
tpm: tpm_passthrough: Read the buffer size from the host device
Rather than hard coding the buffer size in the tpm_passthrough backend read the TPM I/O buffer size from the host device. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw/tpm/tpm_int.h')
-rw-r--r--hw/tpm/tpm_int.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
index 1df5883..abbca51 100644
--- a/hw/tpm/tpm_int.h
+++ b/hw/tpm/tpm_int.h
@@ -45,11 +45,20 @@ struct tpm_resp_hdr {
#define TPM_ORD_ContinueSelfTest 0x53
#define TPM_ORD_GetTicks 0xf1
+#define TPM_ORD_GetCapability 0x65
+#define TPM_CAP_PROPERTY 0x05
+
+#define TPM_CAP_PROP_INPUT_BUFFER 0x124
/* TPM2 defines */
#define TPM2_ST_NO_SESSIONS 0x8001
#define TPM2_CC_ReadClock 0x00000181
+#define TPM2_CC_GetCapability 0x0000017a
+
+#define TPM2_CAP_TPM_PROPERTIES 0x6
+
+#define TPM2_PT_MAX_COMMAND_SIZE 0x11e
#endif /* TPM_TPM_INT_H */