summaryrefslogtreecommitdiff
path: root/src/cpu/amd/mtrr
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/amd/mtrr')
-rw-r--r--src/cpu/amd/mtrr/amd_mtrr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cpu/amd/mtrr/amd_mtrr.c b/src/cpu/amd/mtrr/amd_mtrr.c
index e57bb3bec7..b422f9f425 100644
--- a/src/cpu/amd/mtrr/amd_mtrr.c
+++ b/src/cpu/amd/mtrr/amd_mtrr.c
@@ -149,10 +149,12 @@ void amd_setup_mtrrs(void)
msr.lo = state.mmio_basek << 10;
wrmsr(TOP_MEM, msr);
- /* Setup TOP_MEM2 */
- msr.hi = state.tomk >> 22;
- msr.lo = state.tomk << 10;
- wrmsr(TOP_MEM2, msr);
+ if(state.tomk>(4*1024*1024)) {
+ /* Setup TOP_MEM2 */
+ msr.hi = state.tomk >> 22;
+ msr.lo = state.tomk << 10;
+ wrmsr(TOP_MEM2, msr);
+ }
/* zero the IORR's before we enable to prevent
* undefined side effects.