summary refs log tree commit diff stats
path: root/hw/tpm/tpm_crb.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-07-26 10:53:20 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-07-26 10:53:20 +0100
commit9246fade39e1191560fcf2f955f044f63a44c7db (patch)
tree6c8e0226999e2438972692e7c919c6c2f7452988 /hw/tpm/tpm_crb.c
parent61c1e6a97deac9d5f9748ac1fa4e31e84e19f55c (diff)
parent7e095e84ba0b7c0a1ac45bc6824dace2fd352e56 (diff)
downloadfocaccia-qemu-9246fade39e1191560fcf2f955f044f63a44c7db.tar.gz
focaccia-qemu-9246fade39e1191560fcf2f955f044f63a44c7db.zip
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2019-07-25-1' into staging
Merge tpm 2019/07/25 v1

# gpg: Signature made Thu 25 Jul 2019 16:40:54 BST
# gpg:                using RSA key 75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211

* remotes/stefanberger/tags/pull-tpm-2019-07-25-1:
  tpm_emulator: Translate TPM error codes to strings
  tpm: Exit in reset when backend indicates failure

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/tpm/tpm_crb.c')
-rw-r--r--hw/tpm/tpm_crb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 5e2db9e0c4..db0e3e7c67 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -273,7 +273,9 @@ static void tpm_crb_reset(void *dev)
     s->be_buffer_size = MIN(tpm_backend_get_buffer_size(s->tpmbe),
                             CRB_CTRL_CMD_SIZE);
 
-    tpm_backend_startup_tpm(s->tpmbe, s->be_buffer_size);
+    if (tpm_backend_startup_tpm(s->tpmbe, s->be_buffer_size) < 0) {
+        exit(1);
+    }
 }
 
 static void tpm_crb_realize(DeviceState *dev, Error **errp)