diff options
Diffstat (limited to 'src/security/intel/stm')
-rw-r--r-- | src/security/intel/stm/StmPlatformResource.c | 5 | ||||
-rw-r--r-- | src/security/intel/stm/StmPlatformSmm.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/security/intel/stm/StmPlatformResource.c b/src/security/intel/stm/StmPlatformResource.c index 75d52a26cf..4e56e2e574 100644 --- a/src/security/intel/stm/StmPlatformResource.c +++ b/src/security/intel/stm/StmPlatformResource.c @@ -167,9 +167,14 @@ 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(); add_msr_resources(); diff --git a/src/security/intel/stm/StmPlatformSmm.c b/src/security/intel/stm/StmPlatformSmm.c index ef02ae3971..bcf935cb11 100644 --- a/src/security/intel/stm/StmPlatformSmm.c +++ b/src/security/intel/stm/StmPlatformSmm.c @@ -155,12 +155,15 @@ void stm_setup(uintptr_t mseg, int cpu, uintptr_t smbase, return; } + // This code moved here because paralled SMM set can cause + // some processor to receive a bad value + // calculate the location in SMRAM + addr_calc = mseg - CONFIG_BIOS_RESOURCE_LIST_SIZE; + stm_resource_heap = (uint8_t *) addr_calc; + if (cpu == 0) { // need to create the BIOS resource list once - // first calculate the location in SMRAM - addr_calc = mseg - CONFIG_BIOS_RESOURCE_LIST_SIZE; - stm_resource_heap = (uint8_t *) addr_calc; printk(BIOS_DEBUG, "STM: stm_resource_heap located at %p\n", stm_resource_heap); //setup the list |