diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2003-08-04 22:13:57 +0000 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2003-08-04 22:13:57 +0000 |
commit | 60e185fcc4f2cfe1f8c01011ab976c10b2975f7a (patch) | |
tree | 7ba6a027aec89e3d931cf098db914fbf9580034c /src/cpu/k8/cpufixup.c | |
parent | a43048d371ad4bfaa7a53b3621770907b5d1879d (diff) |
patches from Yh Lu. Tested and working on HDAMA
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1068 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/k8/cpufixup.c')
-rw-r--r-- | src/cpu/k8/cpufixup.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/cpu/k8/cpufixup.c b/src/cpu/k8/cpufixup.c index 4976bee578..c9979c180b 100644 --- a/src/cpu/k8/cpufixup.c +++ b/src/cpu/k8/cpufixup.c @@ -32,15 +32,28 @@ void k8_cpufixup(struct mem_range *mem) mmio_basek = tomk; } - /* Setup TOP_MEM */ - msr.hi = mmio_basek >> 22; - msr.lo = mmio_basek << 10; - wrmsr(TOP_MEM, msr); +#if 1 + /* Report the amount of memory. */ + print_debug("cpufixup RAM: 0x"); + print_debug_hex32(tomk); + print_debug(" KB\r\n"); +#endif + + /* Now set top of memory */ + msr.lo = (tomk & 0x003fffff) << 10; + msr.hi = (tomk & 0xffc00000) >> 22; + wrmsr(TOP_MEM2, msr); + + /* Leave a 64M hole between TOP_MEM and TOP_MEM2 + * so I can see my rom chip and other I/O devices. + */ + if (tomk >= 0x003f0000) { + tomk = 0x3f0000; + } // tom_k = 0x3c0000; + msr.lo = (tomk & 0x003fffff) << 10; + msr.hi = (tomk & 0xffc00000) >> 22; + wrmsr(TOP_MEM, msr); - /* Setup TOP_MEM2 */ - msr.hi = tomk >> 22; - msr.lo = tomk << 10; - wrmsr(TOP_MEM2, msr); /* zero the IORR's before we enable to prevent * undefined side effects. |