summaryrefslogtreecommitdiff
path: root/src/cpu/amd
diff options
context:
space:
mode:
authorMarc Jones <marcj303@gmail.com>2012-01-30 19:30:45 -0700
committerMarc Jones <marcj303@gmail.com>2012-02-20 05:37:26 +0100
commitd8d8c63cf71efbc8fae21e3db8aea87b530111f9 (patch)
tree20c62d4d6ff94ede297e9b4dd51e0e71f35954da /src/cpu/amd
parentdc0bdbab2df7ff8c89b0e1325a60ce994ee6bf43 (diff)
Fix MTRR TOM2 WB cache setup for AMD CPUs > revF.
The MTRR check for WB TOM2 setting was only checking revF, not extended family revisions. All families above revf indicate 0xf in the family field and have additional bits in the extended family field. Change-Id: I93d719789acda6b7c42de7fd6d4bad2da866a25f Signed-off-by: Marc Jones <marcj303@gmail.com> Reviewed-on: http://review.coreboot.org/627 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/cpu/amd')
-rw-r--r--src/cpu/amd/mtrr/amd_mtrr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cpu/amd/mtrr/amd_mtrr.c b/src/cpu/amd/mtrr/amd_mtrr.c
index c5e01b137d..54a70e2d91 100644
--- a/src/cpu/amd/mtrr/amd_mtrr.c
+++ b/src/cpu/amd/mtrr/amd_mtrr.c
@@ -114,12 +114,13 @@ void amd_setup_mtrrs(void)
msr_t msr, sys_cfg;
// Test if this CPU is a Fam 0Fh rev. F or later
const int cpu_id = cpuid_eax(0x80000001);
+ printk(BIOS_SPEW, "CPU ID 0x80000001: %x\n", cpu_id);
const int has_tom2wb =
- (((cpu_id>>8 )&0xf) > 0xf) || // Family > 0F
+ (((cpu_id>>20 )&0xf) > 0) || // ExtendedFamily > 0
((((cpu_id>>8 )&0xf) == 0xf) && // Family == 0F
(((cpu_id>>16)&0xf) >= 0x4)); // Rev>=F deduced from rev tables
if(has_tom2wb)
- printk(BIOS_DEBUG, "CPU is Fam 0Fh rev.F or later, using TOM2WB instead of MTRR above 4GB\n");
+ printk(BIOS_DEBUG, "CPU is Fam 0Fh rev.F or later. We can use TOM2WB for any memory above 4GB\n");
/* Enable the access to AMD RdDram and WrDram extension bits */
disable_cache();