diff options
author | Felix Held <felix.held@amd.corp-partner.google.com> | 2021-10-20 18:21:21 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-10-21 18:23:33 +0000 |
commit | 2461a09b4478d734cc749d059011c429515d59c7 (patch) | |
tree | ee55dd2ada2f20b5717ccd21143eb5d274195747 /src/cpu | |
parent | d04835e1f7561ac2e8483a0e9f51a8d99bc6cd30 (diff) |
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>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/x86/mp_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
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(); } |