field names
SCCS-vsn: sys/vax/vax/autoconf.c 4.23
SCCS-vsn: sys/vax/vax/conf.c 4.24
-/* autoconf.c 4.22 81/03/06 */
+/* autoconf.c 4.23 81/03/07 */
/*
* Initialize the devices for the current machine.
/*
* Initialize the devices for the current machine.
#include "../h/nexus.h"
#include "../h/pte.h"
#include "../h/buf.h"
#include "../h/nexus.h"
#include "../h/pte.h"
#include "../h/buf.h"
+#include "../h/mbareg.h"
+#include "../h/mbavar.h"
#include "../h/dk.h"
#include "../h/vm.h"
#include "../h/dk.h"
#include "../h/vm.h"
+#include "../h/ubareg.h"
+#include "../h/ubavar.h"
#include "../h/mtpr.h"
#include "../h/cpu.h"
#include "../h/scb.h"
#include "../h/mtpr.h"
#include "../h/cpu.h"
#include "../h/scb.h"
(caddr_t) 0x201be000, (caddr_t) 0x201fe000
};
#endif
(caddr_t) 0x201be000, (caddr_t) 0x201fe000
};
#endif
+struct uba_hd uba_hd[MAXNUBA];
#if VAX780
char nexflt_bits[] = NEXFLT_BITS;
#if VAX780
char nexflt_bits[] = NEXFLT_BITS;
unifind((struct uba_regs *)nxv, (struct uba_regs *)nxp,
umem[i], umaddr780[i]);
((struct uba_regs *)nxv)->uba_cr =
unifind((struct uba_regs *)nxv, (struct uba_regs *)nxp,
umem[i], umaddr780[i]);
((struct uba_regs *)nxv)->uba_cr =
- UBA_IFS|UBA_BRIE|UBA_USEFIE|UBA_SUEFIE;
+ UBACR_IFS|UBACR_BRIE|UBACR_USEFIE|UBACR_SUEFIE;
+struct mba_device *mbaconfig();
/*
* Find devices attached to a particular mba
* and look for each device found in the massbus
/*
* Find devices attached to a particular mba
* and look for each device found in the massbus
{
register struct mba_regs *mdp;
register struct mba_drv *mbd;
{
register struct mba_regs *mdp;
register struct mba_drv *mbd;
+ register struct mba_device *mi;
+ register struct mba_slave *ms;
mdp = (struct mba_regs *)nxv;
mba_hd[nummba].mh_mba = mdp;
mdp = (struct mba_regs *)nxv;
mba_hd[nummba].mh_mba = mdp;
if (dt == MBDT_MOH)
continue;
fnd.mi_drive = dn;
if (dt == MBDT_MOH)
continue;
fnd.mi_drive = dn;
- if (dt & MBDT_TAP) {
- for (sn = 0; sn < 8; sn++) {
- mbd->mbd_tc = sn;
+ if ((mi = mbaconfig(&fnd, dt)) && (dt & MBDT_TAP)) {
+ for (ms = mbsinit; ms->ms_driver; ms++)
+ if (ms->ms_driver == mi->mi_driver && ms->ms_alive == 0 &&
+ (ms->ms_ctlr == mi->mi_unit || ms->ms_ctlr=='?')) {
+ mbd->mbd_tc = ms->ms_slave;
- if ((dt & MBDT_SPR) == 0)
- continue;
- fnd.mi_slave = sn;
- mbaconfig(&fnd, dt);
+ ms->ms_alive = 1;
+ ms->ms_ctlr = mi->mi_unit;
+ if (dt & MBDT_SPR) {
+ printf("%s%d at %s%d slave %d\n",
+ ms->ms_driver->md_sname,
+ ms->ms_unit,
+ mi->mi_driver->md_dname,
+ mi->mi_unit,
+ ms->ms_slave);
+ (*ms->ms_driver->md_slave)
+ (mi, ms);
+ }
- } else {
- fnd.mi_slave = -1;
- mbaconfig(&fnd, dt);
}
}
mdp->mba_cr = MBAINIT;
}
}
mdp->mba_cr = MBAINIT;
* see if it is in the configuration table.
* If so, fill in its data.
*/
* see if it is in the configuration table.
* If so, fill in its data.
*/
- register struct mba_info *ni;
+ register struct mba_device *ni;
- register struct mba_info *mi;
+ register struct mba_device *mi;
register short *tp;
register struct mba_hd *mh;
register short *tp;
register struct mba_hd *mh;
- for (mi = mbinit; mi->mi_driver; mi++) {
+ for (mi = mbdinit; mi->mi_driver; mi++) {
if (mi->mi_alive)
continue;
tp = mi->mi_driver->md_type;
if (mi->mi_alive)
continue;
tp = mi->mi_driver->md_type;
continue;
found:
#define match(fld) (ni->fld == mi->fld || mi->fld == '?')
continue;
found:
#define match(fld) (ni->fld == mi->fld || mi->fld == '?')
- if (!match(mi_slave) || !match(mi_drive) || !match(mi_mbanum))
+ if (!match(mi_drive) || !match(mi_mbanum))
- printf("%c%d at mba%d drive %d",
- mi->mi_name, mi->mi_unit, ni->mi_mbanum, ni->mi_drive);
- if (type & MBDT_TAP)
- printf(" slave %d", ni->mi_slave);
+ printf("%s%d at mba%d drive %d",
+ mi->mi_driver->md_dname, mi->mi_unit,
+ ni->mi_mbanum, ni->mi_drive);
printf("\n");
mi->mi_alive = 1;
mh = &mba_hd[ni->mi_mbanum];
printf("\n");
mi->mi_alive = 1;
mh = &mba_hd[ni->mi_mbanum];
mi->mi_driver->md_info[mi->mi_unit] = mi;
mi->mi_mbanum = ni->mi_mbanum;
mi->mi_drive = ni->mi_drive;
mi->mi_driver->md_info[mi->mi_unit] = mi;
mi->mi_mbanum = ni->mi_mbanum;
mi->mi_drive = ni->mi_drive;
- mi->mi_slave = ni->mi_slave;
if (mi->mi_dk && dkn < DK_NDRIVE)
mi->mi_dk = dkn++;
else
mi->mi_dk = -1;
if (mi->mi_dk && dkn < DK_NDRIVE)
mi->mi_dk = dkn++;
else
mi->mi_dk = -1;
- (*mi->mi_driver->md_dkinit)(mi);
+ (*mi->mi_driver->md_attach)(mi);
+ return (mi);
- register struct uba_minfo *um;
- register struct uba_dinfo *ui;
+ register struct uba_ctlr *um;
+ register struct uba_device *ui;
register struct uba_driver *ud;
#define phys(a,b) ((b)(((int)(a))&0x7fffffff))
register struct uba_driver *ud;
#define phys(a,b) ((b)(((int)(a))&0x7fffffff))
caddr_t vumem, pumem;
{
register int br, cvec; /* MUST BE r11, r10 */
caddr_t vumem, pumem;
{
register int br, cvec; /* MUST BE r11, r10 */
- register struct uba_dinfo *ui;
- register struct uba_minfo *um;
+ register struct uba_device *ui;
+ register struct uba_ctlr *um;
u_short *umem = (u_short *)vumem, *sp, *reg, addr;
struct uba_hd *uhp;
struct uba_driver *udp;
u_short *umem = (u_short *)vumem, *sp, *reg, addr;
struct uba_hd *uhp;
struct uba_driver *udp;
#if VAX780
if (haveubasr) {
vubp->uba_sr = vubp->uba_sr;
#if VAX780
if (haveubasr) {
vubp->uba_sr = vubp->uba_sr;
- vubp->uba_cr = UBA_IFS|UBA_BRIE;
+ vubp->uba_cr = UBACR_IFS|UBACR_BRIE;
* for devices which will need to dma
* output to produce an interrupt.
*/
* for devices which will need to dma
* output to produce an interrupt.
*/
- *(int *)(&vubp->uba_map[0]) = UBA_MRV;
+ *(int *)(&vubp->uba_map[0]) = UBAMR_MRV;
#define ubaddr(off) (u_short *)((int)vumem + ((off)&0x1fff))
/*
#define ubaddr(off) (u_short *)((int)vumem + ((off)&0x1fff))
/*
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/inode.h"
#include "../h/acct.h"
#include "../h/pte.h"
#include "../h/inode.h"
#include "../h/acct.h"
#include "../h/pte.h"
int nulldev();
int nodev();
int nulldev();
int nodev();
#define hpdump nodev
#endif
#define hpdump nodev
#endif
#if NHT > 0
int htopen(),htclose(),htstrategy(),htread(),htwrite(),htdump();
#else
#if NHT > 0
int htopen(),htclose(),htstrategy(),htread(),htwrite(),htdump();
#else