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>
This commit is contained in:
Eugene Myers 2021-05-11 08:33:07 -04:00 committed by Stefan Reinauer
parent 56ce49f10f
commit 0f93a91548
1 changed files with 4 additions and 0 deletions

View File

@ -179,8 +179,12 @@ static void add_msr_resources(void)
/* /*
* Add resources to BIOS resource database. * Add resources to BIOS resource database.
*/ */
extern uint8_t *m_stm_resources_ptr;
void add_resources_cmd(void) void add_resources_cmd(void)
{ {
m_stm_resources_ptr = NULL;
add_simple_resources(); add_simple_resources();