Stefan Reinauer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55627?usp=email )
Change subject: security/intel/stm: Reset BIOS resource list on every stm_setup call ......................................................................
security/intel/stm: Reset BIOS resource list on every stm_setup call
Some platforms run the smm_relocation function twice during initialization. This results in the BIOS resource list becoming twice as long. Also, testing has shown that elements of the list created in the first interation may have invalid data included in the resource list.
This patch resolves these issues by reseting the list every time stm_setup is involked.
This patch has been tested on the Purism L1UM-1X8C
Change-Id: I874871ff01bdf0d00a3e6b48bc885e7abaa25112 Signed-off-by: Eugene Myers edmyers@tycho.nsa.gov Reviewed-on: https://review.coreboot.org/c/coreboot/+/55627 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M src/security/intel/stm/StmPlatformResource.c 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: Stefan Reinauer: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/security/intel/stm/StmPlatformResource.c b/src/security/intel/stm/StmPlatformResource.c index 6fef515..7aa432d 100644 --- a/src/security/intel/stm/StmPlatformResource.c +++ b/src/security/intel/stm/StmPlatformResource.c @@ -179,8 +179,12 @@ /* * Add resources to BIOS resource database. */ + +extern uint8_t *m_stm_resources_ptr; + void add_resources_cmd(void) { + m_stm_resources_ptr = NULL;
add_simple_resources();