summaryrefslogtreecommitdiff
path: root/src/cpu/x86/smm
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-04-07 21:16:12 +0200
committerMartin L Roth <gaumless@tutanota.com>2022-05-28 04:57:44 +0000
commit1b970bd2251a75b43e08fb2a8813b927866d0cc9 (patch)
tree52bd0c3320852d5918eae2c08fa490af34fc7592 /src/cpu/x86/smm
parent0ab98d5ed378bec644bc7b8e9df36a1f883488eb (diff)
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63476 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/cpu/x86/smm')
-rw-r--r--src/cpu/x86/smm/smm_module_loader.c6
1 files changed, 2 insertions, 4 deletions
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",