Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13158
-gerrit
commit 9387e097b76f347e0515ac30d2735de377cd7b4f
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Tue Nov 24 14:11:58 2015 -0600
cpu/amd/fam10h-15h: Fix Family 15h boot hang when BSP lift enabled
The existing code did not allow for the second core of the BSP to
reside on an APIC ID other than 1, leading to a boot hang on Family
15h processors when APIC_ID_OFFSET was set to anything other than 0.
Furthermore, insufficient AP stack space was allocated for AP start.
Change-Id: I4ded3cfb3736149e2265848014352d7622d5042a
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
src/cpu/amd/family_10h-family_15h/Kconfig | 2 +-
src/cpu/amd/family_10h-family_15h/init_cpus.c | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/cpu/amd/family_10h-family_15h/Kconfig b/src/cpu/amd/family_10h-family_15h/Kconfig
index bfb6751..2f3dfc0 100644
--- a/src/cpu/amd/family_10h-family_15h/Kconfig
+++ b/src/cpu/amd/family_10h-family_15h/Kconfig
@@ -48,7 +48,7 @@ config DCACHE_BSP_STACK_SLUSH
config DCACHE_AP_STACK_SIZE
hex
- default 0x400
+ default 0x500
config UDELAY_IO
bool
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c
index 5a67601..e8e81d2 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.c
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c
@@ -356,6 +356,7 @@ static u32 init_cpus(u32 cpu_init_detectedx, struct sys_info *sysinfo)
uint32_t dword;
uint8_t set_mtrrs;
uint8_t node_count;
+ uint8_t fam15_bsp_core1_apicid;
struct node_core_id id;
/* Please refer to the calculations and explaination in cache_as_ram.inc before modifying these values */
@@ -483,7 +484,12 @@ static u32 init_cpus(u32 cpu_init_detectedx, struct sys_info *sysinfo)
if (is_fam15h()) {
/* core 1 on node 0 is special; to avoid corrupting the
* BSP do not alter MTRRs on that core */
- if (apicid == 1)
+ if (IS_ENABLED(CONFIG_ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0))
+ fam15_bsp_core1_apicid = CONFIG_APIC_ID_OFFSET + 1;
+ else
+ fam15_bsp_core1_apicid = 1;
+
+ if (apicid == fam15_bsp_core1_apicid)
set_mtrrs = 0;
else
set_mtrrs = !!(apicid & 0x1);
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13169
-gerrit
commit fa9f44375d5a382d6e355c74da366762e1c92a4b
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Tue Nov 24 14:12:03 2015 -0600
mainboard/asus/kgpe-d16: Wait for all APs to stop before MCT setup
Under certain conditions when the APs are still executing during
MCT setup the system can hang. This was the root cause of most
of the S3 resume failures on this platform; waiting for AP stop
before MCT setup allows for reliable S3 resume.
Change-Id: I329eea9a8912d7b57efe6aae327d24fd6c3fd782
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
src/mainboard/asus/kgpe-d16/romstage.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mainboard/asus/kgpe-d16/romstage.c b/src/mainboard/asus/kgpe-d16/romstage.c
index 89183cc..1904bc2 100644
--- a/src/mainboard/asus/kgpe-d16/romstage.c
+++ b/src/mainboard/asus/kgpe-d16/romstage.c
@@ -515,6 +515,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
post_code(0x3B);
+ /* Wait for all APs to be stopped, otherwise ram initialization may hang */
+ if (IS_ENABLED(CONFIG_LOGICAL_CPUS))
+ wait_all_other_cores_stopped(bsp_apicid);
+
/* It's the time to set ctrl in sysinfo now; */
printk(BIOS_DEBUG, "fill_mem_ctrl() detected %d nodes\n", sysinfo->nodes);
if (is_fam15h())
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13171
-gerrit
commit 53e451ba4a1a3ca9c408243e12c969b6296b783a
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Tue Nov 24 14:12:06 2015 -0600
mainboard/asus/kgpe-d16: Reenable power LED after S3 resume
Change-Id: I958990f3203d3cbe7ae64833800d631c1034327f
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
src/mainboard/asus/kgpe-d16/acpi/pm_ctrl.asl | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/mainboard/asus/kgpe-d16/acpi/pm_ctrl.asl b/src/mainboard/asus/kgpe-d16/acpi/pm_ctrl.asl
index b5a7ed9..658d877 100644
--- a/src/mainboard/asus/kgpe-d16/acpi/pm_ctrl.asl
+++ b/src/mainboard/asus/kgpe-d16/acpi/pm_ctrl.asl
@@ -218,7 +218,7 @@ Method(\_WAK, 1) {
/* Set up LEDs */
/* Set power LED to steady on */
- Store(0x3, BLNK)
+ Store(0x0, BLNK)
/* Configure SuperIO for wake */
/* Access SuperIO ACPI device */
@@ -291,11 +291,6 @@ Method(\_PTS, 1) {
/* Set suspend LED to 0.25Hz toggle pulse with 50% duty cycle */
Store(0x2, BLNK)
}
- if (LEqual(Arg0, 0x3)) /* Power state S3 requested */
- {
- /* Set suspend LED to 0.25Hz toggle pulse with 25% duty cycle */
- Store(0x1, BLNK)
- }
/* Configure SuperIO for sleep */
/* Access SuperIO ACPI device */