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:
@ -163,7 +163,7 @@ static void fc_lock_configure(void *unused)
|
|||||||
|
|
||||||
static void post_mp_init(void)
|
static void post_mp_init(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
bool failure = false;
|
||||||
|
|
||||||
/* Set Max Ratio */
|
/* Set Max Ratio */
|
||||||
cpu_set_max_ratio();
|
cpu_set_max_ratio();
|
||||||
@ -178,14 +178,17 @@ static void post_mp_init(void)
|
|||||||
if (CONFIG(HAVE_SMI_HANDLER))
|
if (CONFIG(HAVE_SMI_HANDLER))
|
||||||
smm_lock();
|
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))
|
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");
|
printk(BIOS_CRIT, "CRITICAL ERROR: MP post init failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user