From 2461a09b4478d734cc749d059011c429515d59c7 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 20 Oct 2021 18:21:21 +0200 Subject: 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 Change-Id: Ifb64b5908b938bb162153433e5f744ab0b95c525 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58486 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/cpu/x86/mp_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cpu/x86') diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 4e90d9e37a..eb6f1a27d1 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -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(); } -- cgit v1.2.3