summaryrefslogtreecommitdiff
path: root/src/cpu/amd
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-10-29 01:09:55 -0500
committerRonald G. Minnich <rminnich@gmail.com>2015-10-30 16:32:51 +0100
commite67d2404444c473f1fbec849f5175c13a4e3743f (patch)
tree9d4b6cb21b1d72d914cf1f20ece9b1491d860d19 /src/cpu/amd
parent2caf3cbac0b4dd79e024471bebbb93be11f9f0b1 (diff)
downloadcoreboot-e67d2404444c473f1fbec849f5175c13a4e3743f.tar.xz
cpu/amd/car: Honor BKDG recommendations for DisFillP in CAR
The recommendation to set DisFillP during CAR initialization on K8 NPT CPUs was ignored. The consequences of this are largely unknown; fix up coreboot to follow the recommendations. Change-Id: Ide512bbc1d9aa284179628e2aa598ef5475e8eeb Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/12249 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu/amd')
-rw-r--r--src/cpu/amd/car/cache_as_ram.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/cpu/amd/car/cache_as_ram.inc b/src/cpu/amd/car/cache_as_ram.inc
index 0b2bc60bea..2a33dc1171 100644
--- a/src/cpu/amd/car/cache_as_ram.inc
+++ b/src/cpu/amd/car/cache_as_ram.inc
@@ -34,6 +34,7 @@
#define MSR_MCFG_BASE 0xC0010058
#define MSR_FAM10 0xC001102A
+#define jmp_if_not_k8(x) comisd %xmm2, %xmm1; jae x
#define jmp_if_k8(x) comisd %xmm2, %xmm1; jb x
#define CPUID_MASK 0x0ff00f00
@@ -344,6 +345,19 @@ wbcache_post_fam10_setup:
andl $(~(CR0_CacheDisable | CR0_NoWriteThrough)), %eax
movl %eax, %cr0
+ jmp_if_not_k8(CAR_skip_k8_errata_part1)
+
+ /* Set DisFillP on BSP. */
+ movl $0x8000c068, %eax
+ movw $0xcf8, %dx
+ outl %eax, %dx
+ addw $4, %dx
+ inl %dx, %eax
+ bts $10, %eax
+ outl %eax, %dx
+
+CAR_skip_k8_errata_part1:
+
jmp_if_k8(fam10_end_part1)
/* So we need to check if it is BSP. */
@@ -367,6 +381,19 @@ fam10_end_part1:
xorl %eax, %eax
rep stosl
+ jmp_if_not_k8(CAR_skip_k8_errata_part2)
+
+ /* Clear DisFillP on BSP. */
+ movl $0x8000c068, %eax
+ movw $0xcf8, %dx
+ outl %eax, %dx
+ addw $4, %dx
+ inl %dx, %eax
+ btr $10, %eax
+ outl %eax, %dx
+
+CAR_skip_k8_errata_part2:
+
/* Set up the stack pointer. */
movl $(CacheBase + CacheSize), %eax
movl %eax, %esp