[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/4] tpm: CRB: set registers to 0 by default
From: |
Stefan Berger |
Subject: |
[Qemu-devel] [PATCH v2 2/4] tpm: CRB: set registers to 0 by default |
Date: |
Tue, 20 Mar 2018 16:52:49 -0400 |
Initialize all registers of the CRB device to 0. This clears a few
flags upon a reset.
Signed-off-by: Stefan Berger <address@hidden>
---
hw/tpm/tpm_crb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 114b66e..4bd76b5 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,
--
2.5.5