cpu/x86/mp_init: use cb_err as install_relocation_handler return type
Using cb_err as return type clarifies the meaning of the different return values. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I95f36ba628c7f3ce960a8f3bda730d1c720253cc Reviewed-on: https://review.coreboot.org/c/coreboot/+/58485 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
3671597b94
commit
d04835e1f7
|
@ -761,7 +761,7 @@ static void adjust_smm_apic_id_map(struct smm_loader_params *smm_params)
|
||||||
stub_params->apic_id_to_cpu[i] = cpu_get_apic_id(i);
|
stub_params->apic_id_to_cpu[i] = cpu_get_apic_id(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int install_relocation_handler(int num_cpus, size_t real_save_state_size,
|
static enum cb_err install_relocation_handler(int num_cpus, size_t real_save_state_size,
|
||||||
size_t save_state_size, uintptr_t perm_smbase)
|
size_t save_state_size, uintptr_t perm_smbase)
|
||||||
{
|
{
|
||||||
struct smm_loader_params smm_params = {
|
struct smm_loader_params smm_params = {
|
||||||
|
@ -779,13 +779,13 @@ static int install_relocation_handler(int num_cpus, size_t real_save_state_size,
|
||||||
|
|
||||||
if (smm_setup_relocation_handler((void *)perm_smbase, &smm_params)) {
|
if (smm_setup_relocation_handler((void *)perm_smbase, &smm_params)) {
|
||||||
printk(BIOS_ERR, "%s: smm setup failed\n", __func__);
|
printk(BIOS_ERR, "%s: smm setup failed\n", __func__);
|
||||||
return -1;
|
return CB_ERR;
|
||||||
}
|
}
|
||||||
adjust_smm_apic_id_map(&smm_params);
|
adjust_smm_apic_id_map(&smm_params);
|
||||||
|
|
||||||
mp_state.reloc_start32_offset = smm_params.stub_params->start32_offset;
|
mp_state.reloc_start32_offset = smm_params.stub_params->start32_offset;
|
||||||
|
|
||||||
return 0;
|
return CB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int install_permanent_handler(int num_cpus, uintptr_t smbase,
|
static int install_permanent_handler(int num_cpus, uintptr_t smbase,
|
||||||
|
@ -833,7 +833,8 @@ static void load_smm_handlers(void)
|
||||||
|
|
||||||
/* Install handlers. */
|
/* Install handlers. */
|
||||||
if (install_relocation_handler(mp_state.cpu_count, real_save_state_size,
|
if (install_relocation_handler(mp_state.cpu_count, real_save_state_size,
|
||||||
smm_save_state_size, mp_state.perm_smbase) < 0) {
|
smm_save_state_size, mp_state.perm_smbase) !=
|
||||||
|
CB_SUCCESS) {
|
||||||
printk(BIOS_ERR, "Unable to install SMM relocation handler.\n");
|
printk(BIOS_ERR, "Unable to install SMM relocation handler.\n");
|
||||||
smm_disable();
|
smm_disable();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue