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>
This commit is contained in:
parent
41b078f8ae
commit
9036bd7cb1
|
@ -730,16 +730,16 @@ static void asmlinkage smm_do_relocation(void *arg)
|
||||||
* the location of the new SMBASE. If using SMM modules then this
|
* the location of the new SMBASE. If using SMM modules then this
|
||||||
* calculation needs to match that of the module loader.
|
* calculation needs to match that of the module loader.
|
||||||
*/
|
*/
|
||||||
#if CONFIG(X86_SMM_LOADER_VERSION2)
|
if (CONFIG(X86_SMM_LOADER_VERSION2)) {
|
||||||
perm_smbase = smm_get_cpu_smbase(cpu);
|
perm_smbase = smm_get_cpu_smbase(cpu);
|
||||||
if (!perm_smbase) {
|
if (!perm_smbase) {
|
||||||
printk(BIOS_ERR, "%s: bad SMBASE for CPU %d\n", __func__, cpu);
|
printk(BIOS_ERR, "%s: bad SMBASE for CPU %d\n", __func__, cpu);
|
||||||
return;
|
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. */
|
/* Setup code checks this callback for validity. */
|
||||||
printk(BIOS_INFO, "%s : curr_smbase 0x%x perm_smbase 0x%x, cpu = %d\n",
|
printk(BIOS_INFO, "%s : curr_smbase 0x%x perm_smbase 0x%x, cpu = %d\n",
|
||||||
|
|
|
@ -151,9 +151,7 @@ struct smm_loader_params {
|
||||||
int smm_setup_relocation_handler(struct smm_loader_params *params);
|
int smm_setup_relocation_handler(struct smm_loader_params *params);
|
||||||
int smm_load_module(void *smram, size_t size, struct smm_loader_params *params);
|
int smm_load_module(void *smram, size_t size, struct smm_loader_params *params);
|
||||||
|
|
||||||
#if CONFIG(X86_SMM_LOADER_VERSION2)
|
|
||||||
u32 smm_get_cpu_smbase(unsigned int cpu_num);
|
u32 smm_get_cpu_smbase(unsigned int cpu_num);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Backup and restore default SMM region. */
|
/* Backup and restore default SMM region. */
|
||||||
void *backup_default_smm_area(void);
|
void *backup_default_smm_area(void);
|
||||||
|
|
Loading…
Reference in New Issue