[coreboot-gerrit] Patch set updated for coreboot: cpu/amd/car: Honor BKDG recommendations for DisFillP in CAR

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Thu Oct 29 15:51:56 CET 2015


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12249

-gerrit

commit 43d2a6ca4feb7c6163cddb5463c352d5e8e6bf65
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Thu Oct 29 01:09:55 2015 -0500

    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 at raptorengineeringinc.com>
---
 src/cpu/amd/car/cache_as_ram.inc | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/cpu/amd/car/cache_as_ram.inc b/src/cpu/amd/car/cache_as_ram.inc
index 0b2bc60..2a33dc1 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



More information about the coreboot-gerrit mailing list