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>
This commit is contained in:
Stefan Berger 2017-11-03 22:49:23 -04:00
parent 56388eee01
commit abc5cda097
4 changed files with 137 additions and 1 deletions

View file

@ -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 */