diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-11-03 22:49:23 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-12-14 23:39:15 -0500 |
commit | abc5cda097f46bdb86833a38ee0961a0e6a47ae1 (patch) | |
tree | d3d32ae6b6d96a7b9cd3a6e6b8cb831384efb57f /hw/tpm/tpm_util.h | |
parent | 56388eee01144d59d5c94a34431a29c75073ba53 (diff) |
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_util.h')
-rw-r--r-- | hw/tpm/tpm_util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h index aca10c97bf..1c17e3913b 100644 --- a/hw/tpm/tpm_util.h +++ b/hw/tpm/tpm_util.h @@ -36,4 +36,7 @@ static inline uint32_t tpm_cmd_get_size(const void *b) return be32_to_cpu(*(const uint32_t *)(b + 2)); } +int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version, + size_t *buffersize); + #endif /* TPM_TPM_UTIL_H */ |