[BACK]Return to cache.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / mips / mips

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/mips/mips/cache.c between version 1.7.2.2 and 1.7.2.3

version 1.7.2.2, 2002/01/10 19:46:03 version 1.7.2.3, 2002/02/11 20:08:36
Line 114  struct mips_cache_ops mips_cache_ops;
Line 114  struct mips_cache_ops mips_cache_ops;
 #include <mips/cache_tx39.h>  #include <mips/cache_tx39.h>
 void    tx3900_get_cache_config(void);  void    tx3900_get_cache_config(void);
 void    tx3920_get_cache_config(void);  void    tx3920_get_cache_config(void);
   void    tx39_cache_config_write_through(void);
 #endif /* ENABLE_MIPS_TX3900 */  #endif /* ENABLE_MIPS_TX3900 */
 #endif /* MIPS1 */  #endif /* MIPS1 */
   
Line 277  mips_config_cache(void)
Line 278  mips_config_cache(void)
   
                 mips_pdcache_ways = 2;                  mips_pdcache_ways = 2;
                 tx3900_get_cache_config();                  tx3900_get_cache_config();
                   /* change to write-through mode */
                   tx39_cache_config_write_through();
   
                 uvmexp.ncolors = atop(mips_pdcache_size) / mips_pdcache_ways;                  uvmexp.ncolors = atop(mips_pdcache_size) / mips_pdcache_ways;
                 break;                  break;
Line 453  primary_cache_is_2way:
Line 456  primary_cache_is_2way:
                             r4600v2_pdcache_wb_range_32;                              r4600v2_pdcache_wb_range_32;
                 }                  }
   
                   /*
                    * Deal with VR4131 chip bugs.
                    */
                   if (MIPS_PRID_IMPL(cpu_id) == MIPS_R4100 &&
                       MIPS_PRID_REV_MAJ(cpu_id) == 8) {
                           KASSERT(mips_pdcache_line_size == 16);
                           mips_cache_ops.mco_pdcache_wbinv_range =
                               vr4131v1_pdcache_wbinv_range_16;
                   }
   
                 /* Virtually-indexed cache; no use for colors. */                  /* Virtually-indexed cache; no use for colors. */
                 break;                  break;
 #ifdef MIPS3_5900  #ifdef MIPS3_5900
Line 649  tx3920_get_cache_config(void)
Line 662  tx3920_get_cache_config(void)
         if ((tx3900_cp0_config_read() & R3900_CONFIG_WBON) == 0)          if ((tx3900_cp0_config_read() & R3900_CONFIG_WBON) == 0)
                 mips_pdcache_write_through = 1;                  mips_pdcache_write_through = 1;
 }  }
   
   /*
    * tx39_cache_config_write_through:
    *
    *      TX3922 write-through D-cache mode.
    *      for TX3912, no meaning. (no write-back mode)
    */
   void
   tx39_cache_config_write_through(void)
   {
           u_int32_t r;
   
           mips_dcache_wbinv_all();
   
           __asm__ __volatile__("mfc0 %0, $3" : "=r"(r));
           r &= 0xffffdfff;
           __asm__ __volatile__("mtc0 %0, $3" : : "r"(r));
   }
   
 #endif /* ENABLE_MIPS_TX3900 */  #endif /* ENABLE_MIPS_TX3900 */
 #endif /* MIPS1 */  #endif /* MIPS1 */
   

Legend:
Removed from v.1.7.2.2  
changed lines
  Added in v.1.7.2.3

CVSweb <webmaster@jp.NetBSD.org>