From 1b970bd2251a75b43e08fb2a8813b927866d0cc9 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 7 Apr 2022 21:16:12 +0200 Subject: cpu/x86/smm: Drop 'entry' struct element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a duplicate of code_start. Change-Id: I38e8905e3ed940fb34280c939d6f2f1fce8480a7 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/63476 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Felix Held Reviewed-by: Lean Sheng Tan --- src/cpu/x86/smm/smm_module_loader.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/cpu/x86') diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index 00c6cf9b47..5b87a9fe1a 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -42,7 +42,6 @@ extern unsigned char _binary_smmstub_start[]; 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; @@ -124,10 +123,9 @@ static int smm_create_map(const uintptr_t smbase, const unsigned int num_cpus, const size_t segment_number = i / cpus_per_segment; cpus[i].smbase = smbase - SMM_CODE_SEGMENT_SIZE * segment_number - needed_ss_size * (i % cpus_per_segment); - cpus[i].entry = cpus[i].smbase + SMM_ENTRY_OFFSET; + cpus[i].code_start = cpus[i].smbase + SMM_ENTRY_OFFSET; + cpus[i].code_end = cpus[i].code_start + stub_size; cpus[i].ss_start = cpus[i].smbase + SMM_CODE_SEGMENT_SIZE - needed_ss_size; - cpus[i].code_start = cpus[i].entry; - cpus[i].code_end = cpus[i].entry + 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", -- cgit v1.2.3