cpu/x86/mp_init: use cb_err as install_permanent_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: Ifb64b5908b938bb162153433e5f744ab0b95c525
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Felix Held 2021-10-20 18:21:21 +02:00 committed by Felix Held
parent d04835e1f7
commit 2461a09b44
1 changed files with 4 additions and 4 deletions

View File

@ -788,7 +788,7 @@ static enum cb_err install_relocation_handler(int num_cpus, size_t real_save_sta
return CB_SUCCESS;
}
static int install_permanent_handler(int num_cpus, uintptr_t smbase,
static enum cb_err install_permanent_handler(int num_cpus, uintptr_t smbase,
size_t smsize, size_t real_save_state_size,
size_t save_state_size)
{
@ -814,11 +814,11 @@ static int install_permanent_handler(int num_cpus, uintptr_t smbase,
printk(BIOS_DEBUG, "Installing permanent SMM handler to 0x%08lx\n", smbase);
if (smm_load_module((void *)smbase, smsize, &smm_params))
return -1;
return CB_ERR;
adjust_smm_apic_id_map(&smm_params);
return 0;
return CB_SUCCESS;
}
/* Load SMM handlers as part of MP flight record. */
@ -841,7 +841,7 @@ static void load_smm_handlers(void)
if (install_permanent_handler(mp_state.cpu_count, mp_state.perm_smbase,
mp_state.perm_smsize, real_save_state_size,
smm_save_state_size) < 0) {
smm_save_state_size) != CB_SUCCESS) {
printk(BIOS_ERR, "Unable to install SMM permanent handler.\n");
smm_disable();
}