summaryrefslogtreecommitdiff
path: root/src/cpu/amd/agesa
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-03-20 15:50:59 -0500
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-03-22 04:06:42 +0100
commit57686f848597f6b133c9d45a9b98a54638399b32 (patch)
tree22c21ddc2f81cb3616a255061876042c8caf6a74 /src/cpu/amd/agesa
parentc8eab2c0441851a141ef47d10022fb385d0eacad (diff)
x86: unify amd and non-amd MTRR routines
The amd_mtrr.c file contains a copy of the fixed MTRR algorithm. However, the AMD code needs to handle the RdMem and WrMem attribute bits in the fixed MTRR MSRs. Instead of duplicating the code with the one slight change introduce a Kconfig option, X86_AMD_FIXED_MTRRS, which indicates that the RdMem and WrMem fields need to be handled for writeback fixed MTRR ranges. The order of how the AMD MTRR setup routine is maintained by providing a x86_setup_fixed_mtrrs_no_enable() function which does not enable the fixed MTRRs after setting them up. All Kconfig files which had a Makefile that included amd/mtrr in the subdirs-y now have a default X86_AMD_FIXED_MTRRS selection. There may be some overlap with the agesa and socket code, but I didn't know the best way to tease out the interdependency. Change-Id: I256d0210d1eb3004e2043b46374dcc0337432767 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/2866 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu/amd/agesa')
-rwxr-xr-xsrc/cpu/amd/agesa/family10/Kconfig1
-rwxr-xr-xsrc/cpu/amd/agesa/family12/Kconfig1
-rw-r--r--src/cpu/amd/agesa/family14/Kconfig1
-rw-r--r--src/cpu/amd/agesa/family15/Kconfig1
-rw-r--r--src/cpu/amd/agesa/family15tn/Kconfig1
5 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/amd/agesa/family10/Kconfig b/src/cpu/amd/agesa/family10/Kconfig
index cb7b9a549a..621ee5813e 100755
--- a/src/cpu/amd/agesa/family10/Kconfig
+++ b/src/cpu/amd/agesa/family10/Kconfig
@@ -21,6 +21,7 @@ config CPU_AMD_AGESA_FAMILY10
bool
select CPU_AMD_MODEL_10XXX
select PCI_IO_CFG_EXT
+ select X86_AMD_FIXED_MTRRS
if CPU_AMD_AGESA_FAMILY10
diff --git a/src/cpu/amd/agesa/family12/Kconfig b/src/cpu/amd/agesa/family12/Kconfig
index 063e41037d..1adf5eca31 100755
--- a/src/cpu/amd/agesa/family12/Kconfig
+++ b/src/cpu/amd/agesa/family12/Kconfig
@@ -20,6 +20,7 @@
config CPU_AMD_AGESA_FAMILY12
bool
select PCI_IO_CFG_EXT
+ select X86_AMD_FIXED_MTRRS
config CPU_ADDR_BITS
int
diff --git a/src/cpu/amd/agesa/family14/Kconfig b/src/cpu/amd/agesa/family14/Kconfig
index 3c51bf0094..dea839ea51 100644
--- a/src/cpu/amd/agesa/family14/Kconfig
+++ b/src/cpu/amd/agesa/family14/Kconfig
@@ -20,6 +20,7 @@
config CPU_AMD_AGESA_FAMILY14
bool
select PCI_IO_CFG_EXT
+ select X86_AMD_FIXED_MTRRS
config CPU_ADDR_BITS
int
diff --git a/src/cpu/amd/agesa/family15/Kconfig b/src/cpu/amd/agesa/family15/Kconfig
index 0afdab78c6..e20cce8ab3 100644
--- a/src/cpu/amd/agesa/family15/Kconfig
+++ b/src/cpu/amd/agesa/family15/Kconfig
@@ -20,6 +20,7 @@
config CPU_AMD_AGESA_FAMILY15
bool
select PCI_IO_CFG_EXT
+ select X86_AMD_FIXED_MTRRS
config CPU_ADDR_BITS
int
diff --git a/src/cpu/amd/agesa/family15tn/Kconfig b/src/cpu/amd/agesa/family15tn/Kconfig
index fba935abe4..d2f5a8c1b2 100644
--- a/src/cpu/amd/agesa/family15tn/Kconfig
+++ b/src/cpu/amd/agesa/family15tn/Kconfig
@@ -20,6 +20,7 @@
config CPU_AMD_AGESA_FAMILY15_TN
bool
select PCI_IO_CFG_EXT
+ select X86_AMD_FIXED_MTRRS
config CPU_ADDR_BITS
int