diff options
author | Felix Held <felix.held@amd.corp-partner.google.com> | 2021-10-20 20:18:12 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-10-21 20:51:43 +0000 |
commit | d27ef5bf6f5e444141dca6a89c46e667bca64652 (patch) | |
tree | 5625401e34f2a4f08175023de22172e4fa95589e /src/cpu/intel/haswell/haswell_init.c | |
parent | e0e49c858bc603ac8216cd3d87c6a4a9996a8083 (diff) |
cpu/x86/mp_init: use cb_err as mp_init_with_smm return type
Using cb_err as return type clarifies the meaning of the different
return values. This patch also adds the types.h include that provides
the definition of the cb_err enum and checks the return value of
mp_init_with_smm against the enum values instead of either checking if
it's non-zero or less than zero to handle the error case.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibcd4a9a63cc87fe176ba885ced0f00832587d492
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58491
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/cpu/intel/haswell/haswell_init.c')
-rw-r--r-- | src/cpu/intel/haswell/haswell_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c index 90db95b8df..40f5ce0013 100644 --- a/src/cpu/intel/haswell/haswell_init.c +++ b/src/cpu/intel/haswell/haswell_init.c @@ -17,6 +17,7 @@ #include <northbridge/intel/haswell/haswell.h> #include <southbridge/intel/lynxpoint/pch.h> #include <cpu/intel/common/common.h> +#include <types.h> #include "haswell.h" #include "chip.h" @@ -641,7 +642,7 @@ static const struct mp_ops mp_ops = { void mp_init_cpus(struct bus *cpu_bus) { - if (mp_init_with_smm(cpu_bus, &mp_ops)) + if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS) printk(BIOS_ERR, "MP initialization failure.\n"); } |