Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18526
-gerrit
commit 06a7c50b471ad534340379a1e64827dd1512788d Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Wed Mar 1 13:31:40 2017 +0200
[NOTFORMERGE] binaryPI CAR: Revert invd to wbinvd change
Requires binaryPI romstages to get fixed first.
The change was originally applied as a workaround to allow disable_cache_as_ram() to be called with a stack frame, in the middle of cache_as_ram_main().
Comments next to AMD_DISABLE_STACK tell to destroy the stack. AGESA documentation and comparison to another CAR implementation under NDA (cpcar.inc) tell to use invalidate without writeback here. Also, using writeback here is suspected to cause low-memory corruption on S3 resume path for platforms without PSP.
There is no documentation telling one must use writeback here for any affected APU platforms touched here.
Now that disable_cache_as_ram() equivalent executes with no stack, we can avoid pointless differentiation of CAR setup code between different AMD APUs, and also in comparison against perhaps the more authoritive CAR setup in cpcar.inc used with UEFI implementations.
Change-Id: I693c104c3aab3be537c00695cbd764a48bd603b0 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc | 2 +- src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc | 2 +- src/vendorcode/amd/pi/00670F00/binaryPI/gcccar.inc | 2 +- src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc index 2707cab..15f3247 100644 --- a/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00630F01/binaryPI/gcccar.inc @@ -903,7 +903,7 @@ fam15_disable_stack_remote_read_exit: _RDMSR btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR - wbinvd # Clear the cache tag RAMs + invd # Clear the cache tag RAMs #.if (bh == 01h) || (bh == 03h) ; Is this TN or KV? cmp $01, %bh jz 4f diff --git a/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc index d6782a3..19102fc 100644 --- a/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00660F01/binaryPI/gcccar.inc @@ -638,7 +638,7 @@ fam15_disable_stack_remote_read_exit: _RDMSR btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR - wbinvd #bao # Clear the cache tag RAMs + invd # Clear the cache tag RAMs # #.if (bh == 01h) || (bh == 03h) ; Is this TN or KM? # cmp $01, %bh # jz 4f diff --git a/src/vendorcode/amd/pi/00670F00/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00670F00/binaryPI/gcccar.inc index d6782a3..19102fc 100644 --- a/src/vendorcode/amd/pi/00670F00/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00670F00/binaryPI/gcccar.inc @@ -638,7 +638,7 @@ fam15_disable_stack_remote_read_exit: _RDMSR btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR - wbinvd #bao # Clear the cache tag RAMs + invd # Clear the cache tag RAMs # #.if (bh == 01h) || (bh == 03h) ; Is this TN or KM? # cmp $01, %bh # jz 4f diff --git a/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc b/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc index 2c51eb1..a0a7965 100644 --- a/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc +++ b/src/vendorcode/amd/pi/00730F01/binaryPI/gcccar.inc @@ -602,8 +602,7 @@ fam16_disable_stack_remote_read_exit: _RDMSR btr $INVD_WBINVD, %eax # Disable INVD -> WBINVD conversion _WRMSR - wbinvd # Clear the cache tag RAMs - #invd + invd # Clear the cache tag RAMs
#Do Standard Family 16 work mov $HWCR, %ecx # MSR:C001_0015h