diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-05-24 08:46:09 +0200 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-04-06 15:19:00 +0000 |
commit | 71bc9f0eba4fce8ffa2b0b90e388f3596ffb6a5d (patch) | |
tree | 55a6762b4b59e78f88a365cc2203a62749293965 /src/cpu/x86/smm | |
parent | 21ca7753bf619f1de8dca79fd1113a9c22335f11 (diff) |
cpu/x86/mp_init.c: Generate a C header to get start32 offset
In the current design the relocatable parameters are used to know the
offset of the 32bit startpoint. This requires back and forward
interaction between the stub, the loader and the mp init code. This
makes the code hard to read.
This is static information known at buildtime, so a better way to deal
with this is to generate a header that contains this offset.
Change-Id: Ic01badd2af11a6e1dbc27c8e928916fedf104b5b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64625
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/x86/smm')
-rw-r--r-- | src/cpu/x86/smm/smm_module_loader.c | 2 | ||||
-rw-r--r-- | src/cpu/x86/smm/smm_stub.S | 3 |
2 files changed, 0 insertions, 5 deletions
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index 6452707f75..6cd9956dd6 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -277,8 +277,6 @@ static int smm_module_setup_stub(const uintptr_t smbase, const size_t smm_size, printk(BIOS_DEBUG, "%s: stack_top = 0x%x\n", __func__, stub_params->stack_top); printk(BIOS_DEBUG, "%s: per cpu stack_size = 0x%x\n", __func__, stub_params->stack_size); - printk(BIOS_DEBUG, "%s: runtime.start32_offset = 0x%x\n", __func__, - stub_params->start32_offset); printk(BIOS_DEBUG, "%s: runtime.smm_size = 0x%zx\n", __func__, smm_size); smm_stub_place_staggered_entry_points(params); diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S index 02532a4d9f..19e9c501ab 100644 --- a/src/cpu/x86/smm/smm_stub.S +++ b/src/cpu/x86/smm/smm_stub.S @@ -31,9 +31,6 @@ fxsave_area_size: * into the table. */ apic_to_cpu_num: .fill CONFIG_MAX_CPUS,2,0xffff -/* allows the STM to bring up SMM in 32-bit mode */ -start32_offset: -.long smm_trampoline32 - _start .data /* Provide fallback stack to use when a valid CPU number cannot be found. */ |