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>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <device/device.h>
|
||||
#include <soc/cpu.h>
|
||||
#include <soc/iomap.h>
|
||||
#include <types.h>
|
||||
|
||||
_Static_assert(CONFIG_MAX_CPUS == 16, "Do not override MAX_CPUS. To reduce the number of "
|
||||
"available cores, use the downcore_mode and disable_smt devicetree settings instead.");
|
||||
@@ -51,7 +52,7 @@ static const struct mp_ops mp_ops = {
|
||||
void mp_init_cpus(struct bus *cpu_bus)
|
||||
{
|
||||
/* Clear for take-off */
|
||||
if (mp_init_with_smm(cpu_bus, &mp_ops) < 0)
|
||||
if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
|
||||
printk(BIOS_ERR, "MP initialization failure.\n");
|
||||
|
||||
/* pre_mp_init made the flash not cacheable. Reset to WP for performance. */
|
||||
|
Reference in New Issue
Block a user