touchups
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Sun, 30 Mar 1986 15:06:41 +0000 (07:06 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Sun, 30 Mar 1986 15:06:41 +0000 (07:06 -0800)
SCCS-vsn: sys/vax/vax/autoconf.c 6.23
SCCS-vsn: sys/vax/include/cpu.h 6.7
SCCS-vsn: sys/vax/vax/cpudata.c 6.7

usr/src/sys/vax/include/cpu.h
usr/src/sys/vax/vax/autoconf.c
usr/src/sys/vax/vax/cpudata.c

index 5339331..8793e0b 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.
  *
- *     @(#)cpu.h       6.6 (Berkeley) %G%
+ *     @(#)cpu.h       6.7 (Berkeley) %G%
  */
 
 #ifndef LOCORE
  */
 
 #ifndef LOCORE
@@ -74,9 +74,9 @@ struct        percpu {
 };
 
 struct iobus {
 };
 
 struct iobus {
+       int     io_type;                /* io adaptor types */
        caddr_t io_addr;                /* phys address of IO adaptor */
        int     io_size;                /* size of an IO space */
        caddr_t io_addr;                /* phys address of IO adaptor */
        int     io_size;                /* size of an IO space */
-       short   io_type;                /* io adaptor types if no cfg reg */
        caddr_t io_details;             /* specific to adaptor types */
 };
 
        caddr_t io_details;             /* specific to adaptor types */
 };
 
index 430cb0c..58ba119 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.
  *
- *     @(#)autoconf.c  6.22 (Berkeley) %G%
+ *     @(#)autoconf.c  6.23 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -182,7 +182,7 @@ probe_Abus(ioanum, iob)
        struct sbia_regs *sbiaregs;
 
        ioap = &ioa[ioanum];
        struct sbia_regs *sbiaregs;
 
        ioap = &ioa[ioanum];
-       nxaccess(iob->io_addr, Ioamap[ioanum], iob->io_size);
+       ioaccess(iob->io_addr, Ioamap[ioanum], iob->io_size);
        if (badaddr((caddr_t)ioap, 4))
                return;
        ioacsr.ioa_csr = ioap->ioacsr.ioa_csr;
        if (badaddr((caddr_t)ioap, 4))
                return;
        ioacsr.ioa_csr = ioap->ioacsr.ioa_csr;
@@ -222,13 +222,9 @@ probenexi(pnc)
        union nexcsr nexcsr;
        int i;
        
        union nexcsr nexcsr;
        int i;
        
-       nexnum = 0, nxv = &nexus[nsbi * 16];
+       nexnum = 0, nxv = &nexus[nsbi * NNEX8600];
        for (; nexnum < pnc->psb_nnexus; nexnum++, nxp++, nxv++) {
        for (; nexnum < pnc->psb_nnexus; nexnum++, nxp++, nxv++) {
-                       /*
-                        * the 16 below shouldn't be there, but the constant
-                        * is used at other points (vax/locore.s)
-                        */
-               nxaccess((caddr_t)nxp, Nexmap[nsbi * 16 + nexnum],
+               ioaccess((caddr_t)nxp, Nexmap[nsbi * 16 + nexnum],
                     sizeof(struct nexus));
                if (badaddr((caddr_t)nxv, 4))
                        continue;
                     sizeof(struct nexus));
                if (badaddr((caddr_t)nxv, 4))
                        continue;
@@ -555,6 +551,10 @@ unifind(vubp, pubp, vumem, pumem, memmap, haveubasr)
         */
        uhp->uh_uba = vubp;
        uhp->uh_physuba = pubp;
         */
        uhp->uh_uba = vubp;
        uhp->uh_physuba = pubp;
+       /*
+        * On the 8600, can't use UNIvec;
+        * the vectors for the second SBI overlap it.
+        */
        if (cpu == VAX_8600)
                uhp->uh_vec = (int(**)())calloc(512);
        else if (numuba == 0)
        if (cpu == VAX_8600)
                uhp->uh_vec = (int(**)())calloc(512);
        else if (numuba == 0)
@@ -575,7 +575,7 @@ unifind(vubp, pubp, vumem, pumem, memmap, haveubasr)
         */
        uhp->uh_lastiv = 0x200;
 
         */
        uhp->uh_lastiv = 0x200;
 
-       ubaaccess(pumem, memmap, UBAPAGES * NBPG);
+       ioaccess(pumem, memmap, UBAPAGES * NBPG);
 #if defined(VAX780) || defined(VAX8600)
        if (haveubasr) {
                vubp->uba_sr = vubp->uba_sr;
 #if defined(VAX780) || defined(VAX8600)
        if (haveubasr) {
                vubp->uba_sr = vubp->uba_sr;
@@ -797,7 +797,7 @@ setscbnex(fn)
 {
        register struct scb *scbp = &scb;
 
 {
        register struct scb *scbp = &scb;
 
-       scbp = (struct scb *)((caddr_t)scbp + nsbi * IOAMAPSIZ);
+       scbp = (struct scb *)((caddr_t)scbp + nsbi * 512);
        scbp->scb_ipl14[nexnum] = scbp->scb_ipl15[nexnum] =
            scbp->scb_ipl16[nexnum] = scbp->scb_ipl17[nexnum] =
                scbentry(fn, SCB_ISTACK);
        scbp->scb_ipl14[nexnum] = scbp->scb_ipl15[nexnum] =
            scbp->scb_ipl16[nexnum] = scbp->scb_ipl17[nexnum] =
                scbentry(fn, SCB_ISTACK);
@@ -806,12 +806,8 @@ setscbnex(fn)
 /*
  * Make an IO register area accessible at physical address physa
  * by mapping kernel ptes starting at pte.
 /*
  * Make an IO register area accessible at physical address physa
  * by mapping kernel ptes starting at pte.
- *
- * WE LEAVE ALL NEXI MAPPED; THIS IS PERHAPS UNWISE
- * SINCE MISSING NEXI DONT RESPOND.  BUT THEN AGAIN
- * PRESENT NEXI DONT RESPOND TO ALL OF THEIR ADDRESS SPACE.
  */
  */
-nxaccess(physa, pte, size)
+ioaccess(physa, pte, size)
        caddr_t physa;
        register struct pte *pte;
        int size;
        caddr_t physa;
        register struct pte *pte;
        int size;
@@ -825,20 +821,6 @@ nxaccess(physa, pte, size)
        mtpr(TBIA, 0);
 }
 
        mtpr(TBIA, 0);
 }
 
-ubaaccess(pumem, pte, size)
-       caddr_t pumem;
-       register struct pte *pte;
-       int size;
-{
-       register int i = btop(size);
-       register unsigned v = btop(pumem);
-       
-       do
-               *(int *)pte++ = PG_V|PG_KW|v++;
-       while (--i > 0);
-       mtpr(TBIA, 0);
-}
-
 /*
  * Configure swap space and related parameters.
  */
 /*
  * Configure swap space and related parameters.
  */
index e43e14f..c32d2b1 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.
  *
- *     @(#)cpudata.c   6.6 (Berkeley) %G%
+ *     @(#)cpudata.c   6.7 (Berkeley) %G%
  */
 
 #include "pte.h"
  */
 
 #include "pte.h"
@@ -76,8 +76,8 @@ struct nexusconnect sbi8600[] = {
        { NNEX8600, NEXB8600, umaddr8600b, NBDP8600, 1, 0 },
 };
 struct iobus io8600[] = {
        { NNEX8600, NEXB8600, umaddr8600b, NBDP8600, 1, 0 },
 };
 struct iobus io8600[] = {
-       { IOA8600(0), IOAMAPSIZ, IO_ABUS, (caddr_t)&sbi8600[0] },
-       { IOA8600(1), IOAMAPSIZ, IO_ABUS, (caddr_t)&sbi8600[1] },
+       { IO_ABUS, IOA8600(0), IOAMAPSIZ, (caddr_t)&sbi8600[0] },
+       { IO_ABUS, IOA8600(1), IOAMAPSIZ, (caddr_t)&sbi8600[1] },
 };
 #endif
 
 };
 #endif
 
@@ -85,21 +85,21 @@ struct iobus io8600[] = {
 struct nexusconnect sbi780 = {
        NNEX780, NEX780, umaddr780, NBDP780, 1, 0,
 };
 struct nexusconnect sbi780 = {
        NNEX780, NEX780, umaddr780, NBDP780, 1, 0,
 };
-struct iobus io780[] = { 0, 0, IO_SBI780, (caddr_t)&sbi780 };
+struct iobus io780[] = { IO_SBI780, 0, 0, (caddr_t)&sbi780 };
 #endif
 
 #if VAX750
 struct nexusconnect cmi750 = {
        NNEX750, NEX750, umaddr750, NBDP750, 0, nexty750,
 };
 #endif
 
 #if VAX750
 struct nexusconnect cmi750 = {
        NNEX750, NEX750, umaddr750, NBDP750, 0, nexty750,
 };
-struct iobus io750[] = { 0, 0, IO_CMI750, (caddr_t)&cmi750 };
+struct iobus io750[] = { IO_CMI750, 0, 0, (caddr_t)&cmi750 };
 #endif
 
 #if VAX730
 struct nexusconnect xxx730 = {
        NNEX730, NEX730, umaddr730, NBDP730, 0, nexty730,
 };
 #endif
 
 #if VAX730
 struct nexusconnect xxx730 = {
        NNEX730, NEX730, umaddr730, NBDP730, 0, nexty730,
 };
-struct iobus io730[] = { 0, 0, IO_XXX730, (caddr_t)&xxx730 };
+struct iobus io730[] = { IO_XXX730, 0, 0, (caddr_t)&xxx730 };
 #endif
 
 
 #endif