Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
binaryPI: Fix failing AP startup
Fix regression with commit 5639736
binaryPI: Drop CAR teardown without POSTCAR_STAGE
Occassionally (maybe 1 boot in 10) SMP lapic_cpu_init() fails with following errors in the logs of pcengines/apu2:
CPU 0x03 would not start! CPU 0x03 did not initialize!
The CPU number is sometimes 0x02, never seen 0x01. Work-around also suggests something to do with cache coherency and MTRRs that is really at fault.
As a work-around return the BSP CAR teardown to use wbinvd instead of invd. These platforms do not support S3 resume so this is the easy work-around for the time being.
Change-Id: I3dac8785aaf4af5c7c105ec9dd0b95156b7cca21 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc M src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc M src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc 3 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/37438/1
diff --git a/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc index 4d903e6..cecf5ca 100644 --- a/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc @@ -904,7 +904,8 @@ btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR
- invd + # An invd here sometimes breaks AP CPU startup ? + wbinvd
#.if (bh == 01h) || (bh == 03h) ; Is this TN or KV? cmp $01, %bh diff --git a/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc index b208cc1..88e1a7d 100644 --- a/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc @@ -639,7 +639,8 @@ btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR
- invd + # An invd here sometimes breaks AP CPU startup ? + wbinvd
# #.if (bh == 01h) || (bh == 03h) ; Is this TN or KM? # cmp $01, %bh diff --git a/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc index 7d86a31..c246b99 100644 --- a/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc @@ -603,7 +603,8 @@ btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR
- invd + # An invd here sometimes breaks AP CPU startup + wbinvd
#Do Standard Family 16 work mov $HWCR, %ecx # MSR:C001_0015h
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
Patch Set 1:
topic:"WIP_wb_cache_postcar" CLFLUSHES cbmem and stage cache to ram before running postcar. Might also fix things here?
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
Patch Set 1:
Patch Set 1:
topic:"WIP_wb_cache_postcar" CLFLUSHES cbmem and stage cache to ram before running postcar. Might also fix things here?
I suggest we study that later. Let's get things into state where we can start to merge c-env-bootblock commits.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
Patch Set 1: Code-Review+2
100 power cycles and no sign of wrong CPU initialization in the serial output. That seems to be the culprit
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
Patch Set 1: Code-Review+2
Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37438 )
Change subject: binaryPI: Fix failing AP startup ......................................................................
binaryPI: Fix failing AP startup
Fix regression with commit 5639736
binaryPI: Drop CAR teardown without POSTCAR_STAGE
Occassionally (maybe 1 boot in 10) SMP lapic_cpu_init() fails with following errors in the logs of pcengines/apu2:
CPU 0x03 would not start! CPU 0x03 did not initialize!
The CPU number is sometimes 0x02, never seen 0x01. Work-around also suggests something to do with cache coherency and MTRRs that is really at fault.
As a work-around return the BSP CAR teardown to use wbinvd instead of invd. These platforms do not support S3 resume so this is the easy work-around for the time being.
Change-Id: I3dac8785aaf4af5c7c105ec9dd0b95156b7cca21 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/37438 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Michał Żygowski michal.zygowski@3mdeb.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc M src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc M src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc 3 files changed, 6 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved Michał Żygowski: Looks good to me, approved
diff --git a/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc index 4d903e6..cecf5ca 100644 --- a/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc @@ -904,7 +904,8 @@ btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR
- invd + # An invd here sometimes breaks AP CPU startup ? + wbinvd
#.if (bh == 01h) || (bh == 03h) ; Is this TN or KV? cmp $01, %bh diff --git a/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc index b208cc1..88e1a7d 100644 --- a/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc @@ -639,7 +639,8 @@ btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR
- invd + # An invd here sometimes breaks AP CPU startup ? + wbinvd
# #.if (bh == 01h) || (bh == 03h) ; Is this TN or KM? # cmp $01, %bh diff --git a/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc index 7d86a31..c246b99 100644 --- a/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc @@ -603,7 +603,8 @@ btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR
- invd + # An invd here sometimes breaks AP CPU startup + wbinvd
#Do Standard Family 16 work mov $HWCR, %ecx # MSR:C001_0015h