diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-03-20 12:31:45 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-03-21 08:00:50 -0400 |
commit | e1880ed80a4718ae0df49d115b6079183a01a716 (patch) | |
tree | 88c30a07440c05582beb5b3c6103969655c25e9e /hw | |
parent | be052a3b3d3d8cfbe2d5bc588106b3403f4206af (diff) |
tpm: CRB: set registers to 0 by default
Initialize all registers of the CRB device to 0. This clears a few
flags upon a reset.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/tpm/tpm_crb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 114b66ebe1..4bd76b5430 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -208,6 +208,8 @@ static void tpm_crb_reset(void *dev) tpm_backend_reset(s->tpmbe); + memset(s->regs, 0, sizeof(s->regs)); + ARRAY_FIELD_DP32(s->regs, CRB_LOC_STATE, tpmRegValidSts, 1); ARRAY_FIELD_DP32(s->regs, CRB_INTF_ID, |