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>
This commit is contained in:
Felix Held
2021-10-20 20:42:03 +02:00
committed by Felix Held
parent d27ef5bf6f
commit 30f7031488

View File

@ -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");
}