Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/25422
Change subject: x86: Increase time out for parking APs to 250ms
......................................................................
x86: Increase time out for parking APs to 250ms
Change f43adf0 (intel/common/block/cpu: Change post_cpus_init after
BS_DEV RESOURCES) moved post_cpus_init to BS_OS_RESUME for S3
path. This results in BSP timing out waiting for APs to be
parked. This change increases the time out value for APs to be parked
to 250ms. This value was chosen after running suspend-resume stress
test and capturing the maximum time taken for APs to be parked for
100 iterations. Typical values observed were ~150ms. Maximum value
observed was 152ms.
BUG=b:76442753
TEST=Verified for 100 iterations that suspend-resume does not run into
any AP park time out.
Change-Id: Id3e59db4fe7a5a2fb60357b05565bba89be1e00e
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
M src/arch/x86/cpu.c
M src/cpu/x86/mp_init.c
2 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/25422/1
diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c
index cfcfdbd..142f2b1 100644
--- a/src/arch/x86/cpu.c
+++ b/src/arch/x86/cpu.c
@@ -309,6 +309,5 @@
return;
/* APs are waiting for work. Last thing to do is park them. */
- if (mp_park_aps())
- printk(BIOS_ERR, "Parking APs failed.\n");
+ mp_park_aps();
}
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 409caa5..f99abaf 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -962,7 +962,24 @@
int mp_park_aps(void)
{
- return mp_run_on_aps(park_this_cpu, 10 * USECS_PER_MSEC);
+ struct stopwatch sw;
+ int ret;
+ long duration_msecs;
+
+ stopwatch_init(&sw);
+
+ ret = mp_run_on_aps(park_this_cpu, 250 * USECS_PER_MSEC);
+
+ duration_msecs = stopwatch_duration_msecs(&sw);
+
+ if (!ret)
+ printk(BIOS_DEBUG, "%s done after %ld msecs.\n", __func__,
+ duration_msecs);
+ else
+ printk(BIOS_ERR, "%s failed after %ld msecs.\n", __func__,
+ duration_msecs);
+
+ return ret;
}
static struct mp_flight_record mp_steps[] = {
--
To view, visit https://review.coreboot.org/25422
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3e59db4fe7a5a2fb60357b05565bba89be1e00e
Gerrit-Change-Number: 25422
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Martin Roth has posted comments on this change. ( https://review.coreboot.org/25419 )
Change subject: soc/amd/common/block/pi/amd_late_init.c: Fix coverity issue CID 1387031
......................................................................
Patch Set 1:
Do you need to update the size of dimm->module_part_number for 19 bytes from the SPD and 1 byte of termination?
--
To view, visit https://review.coreboot.org/25419
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18fa5e9c73401575441b6810f1db80d11666368c
Gerrit-Change-Number: 25419
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel(a)silverbackltd.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin Roth <martinroth(a)google.com>
Gerrit-Comment-Date: Thu, 29 Mar 2018 06:46:27 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Martin Roth has posted comments on this change. ( https://review.coreboot.org/25419 )
Change subject: soc/amd/common/block/pi/amd_late_init.c: Fix coverity issue CID 1387031
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/25419/1/src/soc/amd/common/block/pi/amd_lat…
File src/soc/amd/common/block/pi/amd_late_init.c:
https://review.coreboot.org/#/c/25419/1/src/soc/amd/common/block/pi/amd_lat…
PS1, Line 53: sizeof(dimm->module_part_number) - 1)
Is this the correct solution here? Isn't this going to truncate the last byte of the spd's part number? Maybe use memcpy and manually terminate the string instead?
--
To view, visit https://review.coreboot.org/25419
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18fa5e9c73401575441b6810f1db80d11666368c
Gerrit-Change-Number: 25419
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel(a)silverbackltd.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin Roth <martinroth(a)google.com>
Gerrit-Comment-Date: Thu, 29 Mar 2018 06:43:30 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Srinidhi N Kaushik has uploaded this change for review. ( https://review.coreboot.org/25420
Change subject: soc/intel: Change in timeout value for mp_init
......................................................................
soc/intel: Change in timeout value for mp_init
This patch chnages the timeout for all the mp_run_on_all_cpus calls
to fix the Parking AP error.
BUG=76442753
BRANCH=none
TEST=Build and boot, perform Suspend and during resume should not see
"Parking APs failed" error.
Change-Id: I7f09c1407ccbcc3bae90fb3806f1c754b1d9ac09
Signed-off-by: Srinidhi N Kaushik <srinidhi.n.kaushik(a)intel.com>
---
M src/soc/intel/apollolake/chip.c
M src/soc/intel/apollolake/cpu.c
M src/soc/intel/common/block/cpu/mp_init.c
3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/25420/1
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 1dd6daf..242ce37 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -604,7 +604,7 @@
static void drop_privilege_all(void)
{
/* Drop privilege level on all the CPUs */
- if (mp_run_on_all_cpus(&cpu_enable_untrusted_mode, 1000) < 0)
+ if (mp_run_on_all_cpus(&cpu_enable_untrusted_mode, 3000) < 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 d093acc..cadf50a 100644
--- a/src/soc/intel/apollolake/cpu.c
+++ b/src/soc/intel/apollolake/cpu.c
@@ -241,7 +241,7 @@
smm_southbridge_enable(PWRBTN_EN | GBL_EN);
if (IS_ENABLED(CONFIG_SOC_INTEL_COMMON_BLOCK_SGX))
- mp_run_on_all_cpus(sgx_configure, 2000);
+ mp_run_on_all_cpus(sgx_configure, 3000);
}
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 085a340..462c01a 100644
--- a/src/soc/intel/common/block/cpu/mp_init.c
+++ b/src/soc/intel/common/block/cpu/mp_init.c
@@ -132,7 +132,7 @@
/* Ensure to re-program all MTRRs based on DRAM resource settings */
static void post_cpus_init(void *unused)
{
- if (mp_run_on_all_cpus(&x86_setup_mtrrs_with_detect, 1000) < 0)
+ if (mp_run_on_all_cpus(&x86_setup_mtrrs_with_detect, 2000) < 0)
printk(BIOS_ERR, "MTRR programming failure\n");
x86_mtrr_check();
--
To view, visit https://review.coreboot.org/25420
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f09c1407ccbcc3bae90fb3806f1c754b1d9ac09
Gerrit-Change-Number: 25420
Gerrit-PatchSet: 1
Gerrit-Owner: Srinidhi N Kaushik <srinidhi.n.kaushik(a)intel.com>