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>
This commit is contained in:
parent
2caf3cbac0
commit
e67d240444
1 changed files with 27 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue