aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2018-03-19 12:13:14 -0400
committerStefan Berger <stefanb@linux.vnet.ibm.com>2018-03-21 08:00:31 -0400
commitbe052a3b3d3d8cfbe2d5bc588106b3403f4206af (patch)
treecf3ae6b2727d0774bebee5ae2151a8fe04d53111 /hw/tpm
parentf1a63fcfcd92c88be8942b5ae71aef9749a4f135 (diff)
downloadqemu-be052a3b3d3d8cfbe2d5bc588106b3403f4206af.zip
qemu-be052a3b3d3d8cfbe2d5bc588106b3403f4206af.tar.gz
qemu-be052a3b3d3d8cfbe2d5bc588106b3403f4206af.tar.bz2
tpm: CRB: Set tpmRegValidSts flag to '1' in device reset
Fix the initialization of the tpmRegValidSts flag and set it to '1' during device reset without expecting a write to another register. This seems to also be the default behavior of real hardware. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw/tpm')
-rw-r--r--hw/tpm/tpm_crb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index d8917cb..114b66e 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -145,8 +145,6 @@ static void tpm_crb_mmio_write(void *opaque, hwaddr addr,
beenSeized, 0);
ARRAY_FIELD_DP32(s->regs, CRB_LOC_STATE,
locAssigned, 1);
- ARRAY_FIELD_DP32(s->regs, CRB_LOC_STATE,
- tpmRegValidSts, 1);
break;
}
break;
@@ -210,6 +208,8 @@ static void tpm_crb_reset(void *dev)
tpm_backend_reset(s->tpmbe);
+ ARRAY_FIELD_DP32(s->regs, CRB_LOC_STATE,
+ tpmRegValidSts, 1);
ARRAY_FIELD_DP32(s->regs, CRB_INTF_ID,
InterfaceType, CRB_INTF_TYPE_CRB_ACTIVE);
ARRAY_FIELD_DP32(s->regs, CRB_INTF_ID,