summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix.held@amd.corp-partner.google.com>2021-10-20 20:42:03 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-10-21 20:51:54 +0000
commit30f703148839663a7d41ff72a22be3a9b49110d7 (patch)
tree33f594220dfb89cd7f282ca62ec7f1cebd1afa51 /src/soc
parentd27ef5bf6f5e444141dca6a89c46e667bca64652 (diff)
soc/intel/skylake/cpu: rework failure handling in post_mp_init
Use a boolean type to store the information if any mp_run_on_all_cpus call failed. This is a preparation to change the return type of mp_run_on_all_cpus from int to enum cb_err which will be done in a follow-up patch. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ic04ad3e4a781a00ee6edcd7dbd24bc7601be1384 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58492 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/skylake/cpu.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index 80bf251cc0..d88dd36ad6 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -163,7 +163,7 @@ static void fc_lock_configure(void *unused)
static void post_mp_init(void)
{
- int ret = 0;
+ bool failure = false;
/* Set Max Ratio */
cpu_set_max_ratio();
@@ -178,14 +178,17 @@ static void post_mp_init(void)
if (CONFIG(HAVE_SMI_HANDLER))
smm_lock();
- ret |= mp_run_on_all_cpus(vmx_configure, NULL);
+ if (mp_run_on_all_cpus(vmx_configure, NULL))
+ failure = true;
if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE))
- ret |= mp_run_on_all_cpus(sgx_configure, NULL);
+ if (mp_run_on_all_cpus(sgx_configure, NULL))
+ failure = true;
- ret |= mp_run_on_all_cpus(fc_lock_configure, NULL);
+ if (mp_run_on_all_cpus(fc_lock_configure, NULL))
+ failure = true;
- if (ret)
+ if (failure)
printk(BIOS_CRIT, "CRITICAL ERROR: MP post init failed\n");
}