diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-11-04 19:57:15 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-12-14 23:39:15 -0500 |
commit | 9375c44fdfc07c0fef3052a3f25a13197a528902 (patch) | |
tree | e1bde23c01cc36f6c707af2eda79bfa5f8136762 /hw/tpm/tpm_tis.c | |
parent | abc5cda097f46bdb86833a38ee0961a0e6a47ae1 (diff) |
tpm: tpm_emulator: get and set buffer size of device
Convert the tpm_emulator backend to get the current buffer size
of the external device and set it to the buffer size that the
frontend (TIS) requests.
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_tis.c')
-rw-r--r-- | hw/tpm/tpm_tis.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index bd22e699bb..b8e811b086 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -974,9 +974,9 @@ static const MemoryRegionOps tpm_tis_memory_ops = { }, }; -static int tpm_tis_do_startup_tpm(TPMState *s) +static int tpm_tis_do_startup_tpm(TPMState *s, uint32_t buffersize) { - return tpm_backend_startup_tpm(s->be_driver); + return tpm_backend_startup_tpm(s->be_driver, buffersize); } static void tpm_tis_realloc_buffer(TPMSizedBuffer *sb, @@ -1044,7 +1044,7 @@ static void tpm_tis_reset(DeviceState *dev) tpm_tis_realloc_buffer(&s->loc[c].r_buffer, s->be_buffer_size); } - tpm_tis_do_startup_tpm(s); + tpm_tis_do_startup_tpm(s, 0); } static const VMStateDescription vmstate_tpm_tis = { |