diff options
author | Felix Held <felix.held@amd.corp-partner.google.com> | 2021-10-20 19:37:15 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-10-21 18:23:23 +0000 |
commit | d04835e1f7561ac2e8483a0e9f51a8d99bc6cd30 (patch) | |
tree | 5b1b5c65f1f3af4dc9f2c71d25435db46517ab5b /src/cpu | |
parent | 3671597b9428e6be2a72197c19b449c463a2f962 (diff) |
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>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/x86/mp_init.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 89030f4575..4e90d9e37a 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -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); } -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) { 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)) { printk(BIOS_ERR, "%s: smm setup failed\n", __func__); - return -1; + return CB_ERR; } adjust_smm_apic_id_map(&smm_params); 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, @@ -833,7 +833,8 @@ static void load_smm_handlers(void) /* Install handlers. */ 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"); smm_disable(); } |