summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Myers <edmyers@tycho.nsa.gov>2021-05-11 08:33:07 -0400
committerStefan Reinauer <stefan.reinauer@coreboot.org>2023-06-10 03:20:56 +0000
commit0f93a91548c254c7759174b333e51edb65a95712 (patch)
tree647efa77c0c0d46d34fb4d6c3258b0693841acbb
parent56ce49f10f085e531022c0cbafa024292ce810d5 (diff)
downloadcoreboot-0f93a91548c254c7759174b333e51edb65a95712.tar.gz
coreboot-0f93a91548c254c7759174b333e51edb65a95712.tar.bz2
coreboot-0f93a91548c254c7759174b333e51edb65a95712.zip
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>
-rw-r--r--src/security/intel/stm/StmPlatformResource.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/security/intel/stm/StmPlatformResource.c b/src/security/intel/stm/StmPlatformResource.c
index 6fef515052f0..7aa432de4059 100644
--- a/src/security/intel/stm/StmPlatformResource.c
+++ b/src/security/intel/stm/StmPlatformResource.c
@@ -179,8 +179,12 @@ static void add_msr_resources(void)
/*
* 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();