summaryrefslogtreecommitdiffstats
path: root/src/cpu
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-03-02 15:59:02 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-03-19 11:33:51 +0000
commit9036bd7cb1b4939797372a4e517914a45e29155b (patch)
tree4ad113d1b75f357cc8182b34f7e3d8b73df4b3f6 /src/cpu
parent41b078f8aecd9d01b83ac8ceb646645b8d1c4722 (diff)
downloadcoreboot-9036bd7cb1b4939797372a4e517914a45e29155b.tar.gz
coreboot-9036bd7cb1b4939797372a4e517914a45e29155b.tar.bz2
coreboot-9036bd7cb1b4939797372a4e517914a45e29155b.zip
cpu/x86/mp_init.c: Drop unnecessary preprocessor usage
Change-Id: If67bcbf0c8ffbd041e2e4cab8496f4634de26552 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51185 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/mp_init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index a545d6753781..94a8fd8d8b67 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -730,16 +730,16 @@ static void asmlinkage smm_do_relocation(void *arg)
* the location of the new SMBASE. If using SMM modules then this
* calculation needs to match that of the module loader.
*/
-#if CONFIG(X86_SMM_LOADER_VERSION2)
- perm_smbase = smm_get_cpu_smbase(cpu);
- if (!perm_smbase) {
- printk(BIOS_ERR, "%s: bad SMBASE for CPU %d\n", __func__, cpu);
- return;
+ if (CONFIG(X86_SMM_LOADER_VERSION2)) {
+ perm_smbase = smm_get_cpu_smbase(cpu);
+ if (!perm_smbase) {
+ printk(BIOS_ERR, "%s: bad SMBASE for CPU %d\n", __func__, cpu);
+ return;
+ }
+ } else {
+ perm_smbase = mp_state.perm_smbase;
+ perm_smbase -= cpu * mp_state.smm_save_state_size;
}
-#else
- perm_smbase = mp_state.perm_smbase;
- perm_smbase -= cpu * mp_state.smm_save_state_size;
-#endif
/* Setup code checks this callback for validity. */
printk(BIOS_INFO, "%s : curr_smbase 0x%x perm_smbase 0x%x, cpu = %d\n",