make early_mtrr_init() invisible for cache as ram targets as it breaks them.
authorStefan Reinauer <stepan@coresystems.de>
Sun, 1 Aug 2010 17:22:17 +0000 (17:22 +0000)
committerStefan Reinauer <stepan@openbios.org>
Sun, 1 Aug 2010 17:22:17 +0000 (17:22 +0000)
Fix up converted mainboards that still used early_mtrr_init()

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5678 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/cpu/x86/mtrr/earlymtrr.c
src/mainboard/bcom/winnetp680/romstage.c
src/mainboard/via/epia-cn/romstage.c
src/mainboard/via/pc2500e/romstage.c

index 1cbc5443504a05a602da3e66010e49478c743271..72c471e180d4b7b6f50819dfb59ce5e57735d359 100644 (file)
@@ -62,6 +62,7 @@ static inline void cache_lbmem(int type)
        enable_cache();
 }
 
+#if !defined(CONFIG_USE_DCACHE_RAM) || (CONFIG_USE_DCACHE_RAM == 0)
 /* the fixed and variable MTTRs are power-up with random values,
  * clear them to MTRR_TYPE_UNCACHEABLE for safty.
  */
@@ -118,6 +119,7 @@ static inline void early_mtrr_init(void)
        do_early_mtrr_init(mtrr_msrs);
        enable_cache();
 }
+#endif
 
 static inline int early_mtrr_init_detected(void)
 {
index cdf4ad359cb5a6a9f884d3ac70fd2036f6e2d824..edca90bd113f4018985d85e40d5f671130fad154 100644 (file)
@@ -95,11 +95,6 @@ void main(unsigned long bist)
        enable_smbus();
        smbus_fixup(&ctrl);
 
-       if (bist == 0) {
-               print_debug("doing early_mtrr\n");
-               early_mtrr_init();
-       }
-
        /* Halt if there was a built-in self test failure. */
        report_bist_failure(bist);
 
index eb7f294510a7c57aabec8565379fd5893d398c33..b98103be6d108c5c66a361e0cbfdc0607e073f33 100644 (file)
@@ -93,11 +93,6 @@ void main(unsigned long bist)
        enable_smbus();
        smbus_fixup(&ctrl);
 
-       if (bist == 0) {
-               print_debug("doing early_mtrr\n");
-               early_mtrr_init();
-       }
-
        /* Halt if there was a built-in self test failure. */
        report_bist_failure(bist);
 
index 32a853cdb30be6e75cab07ce6efc69bc438224b1..90913e1710aa95b7609ff5f3994232edce48d6a8 100644 (file)
@@ -67,9 +67,6 @@ void main(unsigned long bist)
        enable_smbus();
        smbus_fixup(&ctrl);
 
-       if (bist == 0)
-               early_mtrr_init();
-
        /* Halt if there was a built-in self test failure. */
        report_bist_failure(bist);