Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch/vax/vax Pull up revision 1.25 (requested by ra...



details:   https://anonhg.NetBSD.org/src/rev/f352ab5b7252
branches:  netbsd-1-5
changeset: 491477:f352ab5b7252
user:      he <he%NetBSD.org@localhost>
date:      Tue May 01 10:26:04 2001 +0000

description:
Pull up revision 1.25 (requested by ragge):
  Enable the cache on KA640.

diffstat:

 sys/arch/vax/vax/ka650.c |  24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diffs (57 lines):

diff -r a3bef66c09b6 -r f352ab5b7252 sys/arch/vax/vax/ka650.c
--- a/sys/arch/vax/vax/ka650.c  Tue May 01 10:23:27 2001 +0000
+++ b/sys/arch/vax/vax/ka650.c  Tue May 01 10:26:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ka650.c,v 1.21 2000/04/20 18:55:50 ragge Exp $ */
+/*     $NetBSD: ka650.c,v 1.21.4.1 2001/05/01 10:26:04 he Exp $        */
 /*
  * Copyright (c) 1988 The Regents of the University of California.
  * All rights reserved.
@@ -112,8 +112,7 @@
            syssub == VAX_SIE_KA640 ? 4 : 5,
            syssub == VAX_SIE_KA655 ? 5 : 0,
            (vax_cpudata & 0xff), GETFRMREV(vax_siedata));
-       if (syssub != VAX_SIE_KA640)
-               ka650setcache(CACHEON);
+       ka650setcache(CACHEON);
        if (ctob(physmem) > ka650merr_ptr->merr_qbmbr) {
                printf("physmem(0x%x) > qbmbr(0x%x)\n",
                    ctob(physmem), (int)ka650merr_ptr->merr_qbmbr);
@@ -252,25 +251,30 @@
  * Enable 1st level cache too.
  */
 void
-ka650setcache(state)
+ka650setcache(int state)
 {
-       register int i;
+       int syssub = GETSYSSUBT(vax_siedata);
+       int i;
 
        /*
         * Before doing anything, disable the cache.
         */
        mtpr(0, PR_CADR);
-       ka650cbd_ptr->cbd_cacr = CACR_CPE;
+       if (syssub != VAX_SIE_KA640)
+               ka650cbd_ptr->cbd_cacr = CACR_CPE;
 
        /*
         * Check what we want to do, enable or disable.
         */
        if (state == CACHEON) {
-               for (i = 0; i < (KA650_CACHESIZE / sizeof(KA650_CACHE_ptr[0]));
-                   i += 2)
-                       KA650_CACHE_ptr[i] = 0;
-               ka650cbd_ptr->cbd_cacr = CACR_CEN;
                mtpr(CADR_SEN2 | CADR_SEN1 | CADR_CENI | CADR_CEND, PR_CADR);
+               if (syssub != VAX_SIE_KA640) {
+                       for (i = 0;
+                           i < (KA650_CACHESIZE / sizeof(KA650_CACHE_ptr[0]));
+                           i += 2)
+                               KA650_CACHE_ptr[i] = 0;
+                       ka650cbd_ptr->cbd_cacr = CACR_CEN;
+               }
        }
 }
 



Home | Main Index | Thread Index | Old Index