From 30576601f6d29a72d5057ac0051ebe3479abc03c Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Wed, 14 Dec 2005 20:16:49 +0000 Subject: from issue 53: don't set TOM2 if 4G less mem installed, opt for init_ecc git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2144 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/cpu/amd/mtrr/amd_mtrr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/cpu/amd/mtrr') 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. -- cgit v1.2.3