From 6b516eda69f92cbc9f06b33cdf2c34cf1114ca16 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 20 Oct 2017 10:30:02 -0700 Subject: tpm2: add nvmem data to the right segment Modules in board/cr50/tpm2 are part of the TPM task, and their .bss segment needs to be wiped out along with other TPM modules' when TPM is reset. The only module from this directory which has static variables is NVMem.c. This patch groups the variables into a structure, and makes sure that the structure is stored in the part of .bss which is zeroed when TPM is reset. BRANCH=none BUG=none TEST=verified that TPM wipeout happening during RMA reset is successful. Change-Id: I5f80dc5e4f5f7cdce2d1a1ed59e0fbac354c5bf6 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/733814 Reviewed-by: Randall Spangler Reviewed-by: Scott Collyer --- core/cortex-m/ec.lds.S | 1 + 1 file changed, 1 insertion(+) (limited to 'core/cortex-m') diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 80b2072834..62f3b6f992 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -257,6 +257,7 @@ SECTIONS Tpm2_*(.bss) /* TPM registers should be cleared at the same time */ STRINGIFY(OUTDIR/common/tpm_registers.o*)(.bss) + *(Tpm2_common.bss) __bss_libtpm2_end = .; *(.bss) -- cgit v1.2.1