Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63476 )
Change subject: cpu/x86/smm: Drop 'entry' struct element ......................................................................
cpu/x86/smm: Drop 'entry' struct element
This is a duplicate of code_start.
Change-Id: I38e8905e3ed940fb34280c939d6f2f1fce8480a7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/smm/smm_module_loader.c 1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/63476/1
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index b24149a..00dc589 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -41,7 +41,6 @@ struct cpu_smm_info { uint8_t active; uintptr_t smbase; - uintptr_t entry; uintptr_t ss_start; uintptr_t code_start; uintptr_t code_end; @@ -117,13 +116,13 @@ printk(BIOS_DEBUG, "CPU 0x%x\n", i); /* We copy the same stub for each CPU so they all need the same 'smbase'. */ const size_t segment_number = i / cpus_per_segment; - cpus[i].entry = smbase - SMM_CODE_SEGMENT_SIZE * segment_number - - needed_ss_size * (i % cpus_per_segment) + SMM_ENTRY_OFFSET; - cpus[i].smbase = cpus[i].entry - SMM_ENTRY_OFFSET; + cpus[i].code_start = smbase - SMM_CODE_SEGMENT_SIZE * segment_number + - needed_ss_size * (i % cpus_per_segment) + + SMM_ENTRY_OFFSET; + cpus[i].smbase = cpus[i].code_start - SMM_ENTRY_OFFSET; cpus[i].ss_start = - cpus[i].entry + (SMM_ENTRY_OFFSET - needed_ss_size); - cpus[i].code_start = cpus[i].entry; - cpus[i].code_end = cpus[i].entry + stub_size; + cpus[i].code_start + (SMM_ENTRY_OFFSET - needed_ss_size); + cpus[i].code_end = cpus[i].code_start + stub_size; printk(BIOS_DEBUG, " Stub [0x%lx-0x%lx[\n", cpus[i].code_start, cpus[i].code_end); printk(BIOS_DEBUG, " Save state [0x%lx-0x%lx[\n", cpus[i].ss_start + needed_ss_size - params->real_cpu_save_state_size,