Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34587 )
Change subject: soc/mp_init: Fix timeout ......................................................................
soc/mp_init: Fix timeout
We ususally don't know how long specific code runs as serial console and it's spinlock might slow down APs.
Increase the timeout of most mp_run_on_all_cpus calls to 1 second, to prevent possible crashing of secondary APs still processing the old job.
Change-Id: I456be647b159f7a2ea7d94986a24424e56dcc8c4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/cpu/x86/mp_init.c M src/soc/amd/picasso/finalize.c M src/soc/amd/stoneyridge/finalize.c M src/soc/intel/apollolake/chip.c M src/soc/intel/apollolake/cpu.c M src/soc/intel/common/block/cpu/mp_init.c M src/soc/intel/skylake/cpu.c 7 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/34587/1
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index d9f20e7..dcd657a 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -993,7 +993,7 @@ stopwatch_init(&sw);
ret = mp_run_on_aps(park_this_cpu, NULL, MP_RUN_ON_ALL_CPUS, - 250 * USECS_PER_MSEC); + 1000 * USECS_PER_MSEC);
duration_msecs = stopwatch_duration_msecs(&sw);
diff --git a/src/soc/amd/picasso/finalize.c b/src/soc/amd/picasso/finalize.c index 5a4627a..f94856c 100644 --- a/src/soc/amd/picasso/finalize.c +++ b/src/soc/amd/picasso/finalize.c @@ -44,7 +44,7 @@ int r; printk(BIOS_SPEW, "Lock SMM configuration\n");
- r = mp_run_on_all_cpus(per_core_finalize, NULL, 10 * USECS_PER_MSEC); + r = mp_run_on_all_cpus(per_core_finalize, NULL, 1000 * USECS_PER_MSEC); if (r) printk(BIOS_WARNING, "Failed to finalize all cores\n"); } diff --git a/src/soc/amd/stoneyridge/finalize.c b/src/soc/amd/stoneyridge/finalize.c index 5a4627a..f94856c 100644 --- a/src/soc/amd/stoneyridge/finalize.c +++ b/src/soc/amd/stoneyridge/finalize.c @@ -44,7 +44,7 @@ int r; printk(BIOS_SPEW, "Lock SMM configuration\n");
- r = mp_run_on_all_cpus(per_core_finalize, NULL, 10 * USECS_PER_MSEC); + r = mp_run_on_all_cpus(per_core_finalize, NULL, 1000 * USECS_PER_MSEC); if (r) printk(BIOS_WARNING, "Failed to finalize all cores\n"); } diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index 361e6a4..da72d49 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -764,7 +764,7 @@ static void drop_privilege_all(void) { /* Drop privilege level on all the CPUs */ - if (mp_run_on_all_cpus(&cpu_enable_untrusted_mode, NULL, 1000) < 0) + if (mp_run_on_all_cpus(&cpu_enable_untrusted_mode, NULL, 1000 * USECS_PER_MSEC) < 0) printk(BIOS_ERR, "failed to enable untrusted mode\n"); }
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c index 625d956..5677497 100644 --- a/src/soc/intel/apollolake/cpu.c +++ b/src/soc/intel/apollolake/cpu.c @@ -255,7 +255,7 @@ smm_southbridge_enable(PWRBTN_EN | GBL_EN);
if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX)) - mp_run_on_all_cpus(sgx_configure, NULL, 2000); + mp_run_on_all_cpus(sgx_configure, NULL, 100 * USECS_PER_MSEC); }
static const struct mp_ops mp_ops = { diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 1241709..c95131e 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -158,7 +158,7 @@ if (CONFIG(USE_INTEL_FSP_MP_INIT)) return;
- if (mp_run_on_all_cpus(&wrapper_x86_setup_mtrrs, NULL, 1000) < 0) + if (mp_run_on_all_cpus(&wrapper_x86_setup_mtrrs, NULL, 1000 * USECS_PER_MSEC) < 0) printk(BIOS_ERR, "MTRR programming failure\n");
x86_mtrr_check(); diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c index a558447..b50d0d4 100644 --- a/src/soc/intel/skylake/cpu.c +++ b/src/soc/intel/skylake/cpu.c @@ -491,11 +491,11 @@ if (CONFIG(HAVE_SMI_HANDLER)) smm_lock();
- ret |= mp_run_on_all_cpus(vmx_configure, NULL, 2 * USECS_PER_MSEC); + ret |= mp_run_on_all_cpus(vmx_configure, NULL, 100 * USECS_PER_MSEC);
- ret |= mp_run_on_all_cpus(sgx_configure, NULL, 14 * USECS_PER_MSEC); + ret |= mp_run_on_all_cpus(sgx_configure, NULL, 1000 * USECS_PER_MSEC);
- ret |= mp_run_on_all_cpus(fc_lock_configure, NULL, 2 * USECS_PER_MSEC); + ret |= mp_run_on_all_cpus(fc_lock_configure, NULL, 1000 * USECS_PER_MSEC);
if (ret) printk(BIOS_CRIT, "CRITICAL ERROR: MP post init failed\n");