summaryrefslogtreecommitdiffstats
path: root/hw/tpm/tpm_int.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-06-12 10:54:41 +0200
committerStefan Berger2020-06-19 13:25:35 +0200
commiteccc0b0f022e2b19efee5daa1ae448f762cf748f (patch)
tree6925dd88f769256dc318f68c770de86fef8257fc /hw/tpm/tpm_int.h
parenthw/tpm: Make TRACE_TPM_UTIL_SHOW_BUFFER check local to tpm_util.c (diff)
downloadqemu-eccc0b0f022e2b19efee5daa1ae448f762cf748f.tar.gz
qemu-eccc0b0f022e2b19efee5daa1ae448f762cf748f.tar.xz
qemu-eccc0b0f022e2b19efee5daa1ae448f762cf748f.zip
hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h'
We are going to make "tpm_util.h" publicly accessible by moving it to the include/ directory in a pair of commits. Keep declarations internals to hw/tpm/ in "tpm_int.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-id: 20200612085444.8362-10-philmd@redhat.com Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'hw/tpm/tpm_int.h')
-rw-r--r--hw/tpm/tpm_int.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
index fd5ebc6489..9f72879d89 100644
--- a/hw/tpm/tpm_int.h
+++ b/hw/tpm/tpm_int.h
@@ -13,6 +13,7 @@
#define TPM_TPM_INT_H
#include "qemu/option.h"
+#include "sysemu/tpm.h"
#define TPM_STANDARD_CMDLINE_OPTS \
{ \
@@ -74,4 +75,14 @@ struct tpm_resp_hdr {
#define TPM_RC_FAILURE 0x101
#define TPM_RC_LOCALITY 0x907
+int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version,
+ size_t *buffersize);
+
+typedef struct TPMSizedBuffer {
+ uint32_t size;
+ uint8_t *buffer;
+} TPMSizedBuffer;
+
+void tpm_sized_buffer_reset(TPMSizedBuffer *tsb);
+
#endif /* TPM_TPM_INT_H */