date and time created 82/06/14 18:09:52 by peter
[unix-history] / usr / src / sys / vax / uba / uba.c
index 3884a71..a4e419d 100644 (file)
@@ -1,4 +1,4 @@
-/*     uba.c   4.43    82/04/11        */
+/*     uba.c   4.45    82/05/26        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -109,8 +109,8 @@ ubasetup(uban, bp, flags)
        struct proc *rp;
        int a, o, ubinfo;
 
        struct proc *rp;
        int a, o, ubinfo;
 
-#if VAX7ZZ
-       if (cpu == VAX_7ZZ)
+#if VAX730
+       if (cpu == VAX_730)
                flags &= ~UBA_NEEDBDP;
 #endif
        v = btop(bp->b_un.b_addr);
                flags &= ~UBA_NEEDBDP;
 #endif
        v = btop(bp->b_un.b_addr);
@@ -274,6 +274,29 @@ ubapurge(um)
        }
 }
 
        }
 }
 
+ubainitmaps(uhp)
+       register struct uba_hd *uhp;
+{
+
+       rminit(uhp->uh_map, NUBMREG, 1, "uba", UAMSIZ);
+       switch (cpu) {
+#if VAX780
+       case VAX_780:
+               uhp->uh_bdpfree = (1<<NBDP780) - 1;
+               break;
+#endif
+#if VAX750
+       case VAX_750:
+               uhp->uh_bdpfree = (1<<NBDP750) - 1;
+               break;
+#endif
+#if VAX730
+       case VAX_730:
+               break;
+#endif
+       }
+}
+
 /*
  * Generate a reset on uba number uban.  Then
  * call each device in the character device table,
 /*
  * Generate a reset on uba number uban.  Then
  * call each device in the character device table,
@@ -294,6 +317,7 @@ ubareset(uban)
        uh->uh_actf = uh->uh_actl = 0;
        uh->uh_bdpwant = 0;
        uh->uh_mrwant = 0;
        uh->uh_actf = uh->uh_actl = 0;
        uh->uh_bdpwant = 0;
        uh->uh_mrwant = 0;
+       ubainitmaps(uh);
        wakeup((caddr_t)&uh->uh_bdpwant);
        wakeup((caddr_t)&uh->uh_mrwant);
        printf("uba%d: reset", uban);
        wakeup((caddr_t)&uh->uh_bdpwant);
        wakeup((caddr_t)&uh->uh_mrwant);
        printf("uba%d: reset", uban);
@@ -331,10 +355,10 @@ ubainit(uba)
 #if VAX750
        case VAX_750:
 #endif
 #if VAX750
        case VAX_750:
 #endif
-#if VAX7ZZ
-       case VAX_7ZZ:
+#if VAX730
+       case VAX_730:
 #endif
 #endif
-#if defined(VAX750) || defined(VAX7ZZ)
+#if defined(VAX750) || defined(VAX730)
                mtpr(IUR, 0);
                /* give devices time to recover from power fail */
 /* THIS IS PROBABLY UNNECESSARY */
                mtpr(IUR, 0);
                /* give devices time to recover from power fail */
 /* THIS IS PROBABLY UNNECESSARY */