mbcluster map is full-sized now; rearrange cpu-specific setup
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Wed, 4 Sep 1985 23:17:26 +0000 (15:17 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Wed, 4 Sep 1985 23:17:26 +0000 (15:17 -0800)
SCCS-vsn: sys/vax/vax/machdep.c 6.20

usr/src/sys/vax/vax/machdep.c

index d0d66c1..fcc7aca 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)machdep.c   6.19 (Berkeley) %G%
+ *     @(#)machdep.c   6.20 (Berkeley) %G%
  */
 
 #include "reg.h"
  */
 
 #include "reg.h"
@@ -233,34 +233,19 @@ startup(firstaddr)
                nbuf, bufpages * CLBYTES);
        rminit(kernelmap, (long)USRPTSIZE, (long)1,
            "usrpt", nproc);
                nbuf, bufpages * CLBYTES);
        rminit(kernelmap, (long)USRPTSIZE, (long)1,
            "usrpt", nproc);
-       rminit(mbmap, (long)((nmbclusters - 1) * CLSIZE), (long)CLSIZE,
+       rminit(mbmap, (long)(nmbclusters * CLSIZE), (long)CLSIZE,
            "mbclusters", nmbclusters/4);
 
        /*
            "mbclusters", nmbclusters/4);
 
        /*
-        * Configure the system.
+        * Set up CPU-specific registers, cache, etc.
         */
         */
-       configure();
-       switch (cpu) {
+       initcpu();
 
 
-       case VAX_780:
-               setcache(0x200000);
-               break;
-       case VAX_750:
-       case VAX_730:
-               setcache(0);
-               break;
-       case VAX_8600:
-               setcache(3);
-               break;
-       }
-
-#if VAX8600
        /*
        /*
-        * Enable Fbox on 8600 if it exists
+        * Configure the system.
         */
         */
-       if ((cpu == VAX_8600) && ((mfpr(ACCS) & 0xff) != 0))
-               mtpr(ACCS, 0x8000);
-#endif
+       configure();
+
        /*
         * Clear restart inhibit flags.
         */
        /*
         * Clear restart inhibit flags.
         */
@@ -1035,24 +1020,45 @@ physstrat(bp, strat, prio)
        splx(s);
 }
 
        splx(s);
 }
 
-setcache(val)
-int val;
+initcpu()
 {
 {
-       switch(cpu) {
+       /*
+        * Enable cache.
+        */
+       switch (cpu) {
+
 #if VAX780
        case VAX_780:
 #if VAX780
        case VAX_780:
-               mtpr(SBIMT, val);
+               mtpr(SBIMT, 0x200000);
                break;
 #endif
 #if VAX750
        case VAX_750:
                break;
 #endif
 #if VAX750
        case VAX_750:
-               mtpr(CADR, val);
+               mtpr(CADR, 0);
                break;
 #endif
 #if VAX8600
        case VAX_8600:
                break;
 #endif
 #if VAX8600
        case VAX_8600:
-               mtpr(CSWP, val);
+               mtpr(CSWP, 3);
                break;
                break;
+#endif
+       default:
+               break;
+       }
+
+       /*
+        * Enable floating point accelerator if it exists
+        * and has control register.
+        */
+       switch(cpu) {
+
+#if VAX8600 || VAX780
+       case VAX_780:
+       case VAX_8600:
+               if ((mfpr(ACCS) & 0xff) != 0) {
+                       printf("Enabling FPA\n");
+                       mtpr(ACCS, 0x8000);
+               }
 #endif
        default:
                break;
 #endif
        default:
                break;