diff --git a/sys/arch/pmax/pmax/autoconf.c b/sys/arch/pmax/pmax/autoconf.c index 1011c32ac46c..67328da8bc7c 100644 --- a/sys/arch/pmax/pmax/autoconf.c +++ b/sys/arch/pmax/pmax/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.47 2000/02/19 04:16:18 nisimura Exp $ */ +/* $NetBSD: autoconf.c,v 1.48 2000/02/19 09:43:40 nisimura Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -43,7 +43,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.47 2000/02/19 04:16:18 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.48 2000/02/19 09:43:40 nisimura Exp $"); #include #include @@ -57,6 +57,14 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.47 2000/02/19 04:16:18 nisimura Exp $ #include +#include "rz.h" +#include "xasc_ioasic.h" +#include "xasc_pmaz.h" + +#if NRZ > 0 && (NXASC_PMAZ + NXASC_IOASIC) > 0 +#error MI SCSI can not coexist with pmax old SCSI. +#endif + struct intrhand intrtab[MAX_INTR_COOKIES]; struct device *booted_device; int booted_slot, booted_unit, booted_partition; @@ -78,9 +86,10 @@ cpu_configure() /* Configuration is finished, turn on interrupts. */ _splnone(); /* enable all source forcing SOFT_INTs cleared */ - +#if NRZ > 0 printf("Beginning old-style SCSI device autoconfiguration\n"); configure_scsi(); +#endif } /* @@ -124,6 +133,7 @@ makebootdev(cp) void cpu_rootconf() { +#if NRZ > 0 struct device *dv; char name[4]; @@ -138,8 +148,40 @@ cpu_rootconf() break; } } +#endif printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); setroot(booted_device, booted_partition); } + +#if (NXASC_PMAZ + NXASC_IOASIC) > 0 + +#include +#include +#include + +struct xx_softc { + struct device sc_dev; + struct disk sc_dk; + int flag; + struct scsipi_link *sc_link; +}; +#define SCSITARGETID(dev) ((struct xx_softc *)dev)->sc_link->scsipi_scsi.target + +int slot_in_progress; /* XXX - TC slot being probed, ugly backdoor interface */ + +void +dk_establish(dk, dev) + struct disk *dk; + struct device *dev; +{ + if (booted_device || strcmp(booted_protocol, "SCSI")) + return; + if (booted_slot != slot_in_progress) + return; + if (booted_unit != SCSITARGETID(dev)) + return; + booted_device = dev; +} +#endif diff --git a/sys/arch/pmax/pmax/conf.c b/sys/arch/pmax/pmax/conf.c index 0d7ed8a7a796..803c01afc341 100644 --- a/sys/arch/pmax/pmax/conf.c +++ b/sys/arch/pmax/pmax/conf.c @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.37 2000/01/10 03:24:36 simonb Exp $ */ +/* $NetBSD: conf.c,v 1.38 2000/02/19 09:43:40 nisimura Exp $ */ /* * Copyright (c) 1992, 1993 @@ -43,56 +43,56 @@ #include #include - -bdev_decl(sw); -#include "rz.h" -bdev_decl(rz); -#include "tz.h" -bdev_decl(tz); -#include "sd.h" -bdev_decl(sd); -#include "st.h" -bdev_decl(st); -#include "cd.h" -bdev_decl(cd); #include "ccd.h" -bdev_decl(ccd); -#include "raid.h" -bdev_decl(raid); -#include "vnd.h" -bdev_decl(vnd); +#include "cd.h" #include "md.h" +#include "raid.h" +#include "sd.h" +#include "st.h" +#include "vnd.h" +bdev_decl(ccd); +bdev_decl(cd); bdev_decl(md); +bdev_decl(raid); +bdev_decl(sd); +bdev_decl(st); +bdev_decl(sw); +bdev_decl(vnd); + +#include "rz.h" +#include "tz.h" +bdev_decl(rz); +bdev_decl(tz); struct bdevsw bdevsw[] = { - bdev_notdef(), /* 0: SCSI disk */ - bdev_notdef(), /* 1: vax ht */ + bdev_notdef(), /* 0: nodev */ + bdev_notdef(), /* 1: ULTRIX vax ht */ bdev_disk_init(NVND,vnd), /* 2: vnode disk driver */ - bdev_notdef(), /* 3: vax rk*/ + bdev_notdef(), /* 3: ULTRIX vax rk */ bdev_swap_init(1,sw), /* 4: swap pseudo-device*/ - bdev_notdef(), /* 5: vax tm */ - bdev_notdef(), /* 6: vax ts */ - bdev_notdef(), /* 7: vax mt */ - bdev_notdef(), /* 8: vax tu */ - bdev_notdef(), /* 9: ?? */ - bdev_notdef(), /* 10: ut */ - bdev_notdef(), /* 11: 11/730 idc */ - bdev_notdef(), /* 12: rx */ - bdev_notdef(), /* 13: uu */ - bdev_notdef(), /* 14: rl */ - bdev_notdef(), /* 15: tmscp */ - bdev_notdef(), /* 16: cs */ + bdev_notdef(), /* 5: ULTRIX vax tm */ + bdev_notdef(), /* 6: ULTRIX vax ts */ + bdev_notdef(), /* 7: ULTRIX vax mt */ + bdev_notdef(), /* 8: ULTRIX vax tu */ + bdev_notdef(), /* 9: nodev */ + bdev_notdef(), /* 10: ULTRIX ut */ + bdev_notdef(), /* 11: ULTRIX 11/730 idc */ + bdev_notdef(), /* 12: ULTRIX rx */ + bdev_notdef(), /* 13: ULTRIX uu */ + bdev_notdef(), /* 14: ULTRIX rl */ + bdev_notdef(), /* 15: ULTRIX tmscp */ + bdev_notdef(), /* 16: ULTRIX cs */ bdev_disk_init(NMD,md), /* 17: memory disk driver */ - bdev_tape_init(NST,st), /* 18: st */ - bdev_disk_init(NSD,sd), /* 19: sd */ - bdev_tape_init(NTZ, tz), /* 20: tz */ - bdev_disk_init(NRZ,rz), /* 21: ?? SCSI disk */ /*XXX*/ - bdev_disk_init(NRZ,rz), /* 22: ?? old SCSI disk */ /*XXX*/ - bdev_notdef(), /* 23: mscp */ + bdev_tape_init(NST,st), /* 18: MI SCSI tape */ + bdev_disk_init(NSD,sd), /* 19: MI SCSI disk */ + bdev_tape_init(NTZ, tz), /* 20: ULTRIX tz tape */ + bdev_disk_init(NRZ,rz), /* 21: ULTRIX rz disk & CD-ROM */ + bdev_notdef(), /* 22: nodev */ + bdev_notdef(), /* 23: ULTRIX mscp */ bdev_disk_init(NCCD,ccd), /* 24: concatenated disk driver */ - bdev_disk_init(NCD,cd), /* 25: SCSI CD-ROM */ + bdev_disk_init(NCD,cd), /* 25: MI SCSI CD-ROM */ bdev_lkm_dummy(), /* 26 */ bdev_lkm_dummy(), /* 27 */ @@ -132,52 +132,45 @@ cdev_decl(pts); #define ptcioctl ptyioctl cdev_decl(ptc); cdev_decl(log); -cdev_decl(fd); -cdev_decl(sd); -cdev_decl(st); -cdev_decl(md); -#include "ss.h" -cdev_decl(ss); -#include "uk.h" -cdev_decl(uk); -cdev_decl(vnd); -cdev_decl(cd); -cdev_decl(ccd); -cdev_decl(raid); #include "bpfilter.h" -cdev_decl(bpf); -#include "dtop.h" -cdev_decl(dtop); -#include "dc.h" -cdev_decl(dc); -#include "scc.h" -cdev_decl(scc); -cdev_decl(rz); -cdev_decl(tz); -#include "rasterconsole.h" -cdev_decl(rcons); -#include "fb.h" -cdev_decl(fb); -#include "pm.h" -cdev_decl(pm); -#include "cfb.h" -cdev_decl(cfb); -#include "xcfb.h" -cdev_decl(xcfb); -#include "mfb.h" -cdev_decl(mfb); -#include "px.h" -cdev_decl(px); -dev_decl(filedesc,open); -#include "tun.h" -cdev_decl(tun); -cdev_decl(vnd); +#include "ch.h" #include "ipfilter.h" #include "rnd.h" - +#include "ss.h" +#include "tun.h" +#include "uk.h" #include "scsibus.h" +cdev_decl(bpf); +cdev_decl(ccd); +cdev_decl(cd); +cdev_decl(ch); +cdev_decl(fd); +dev_decl(filedesc,open); +cdev_decl(md); +cdev_decl(raid); cdev_decl(scsibus); +cdev_decl(sd); +cdev_decl(ss); +cdev_decl(st); +cdev_decl(tun); +cdev_decl(uk); +cdev_decl(vnd); +cdev_decl(vnd); +#include "dc.h" +#include "dtop.h" +#include "fb.h" +#include "px.h" +#include "rasterconsole.h" +#include "scc.h" +cdev_decl(dc); +cdev_decl(dtop); +cdev_decl(fb); +cdev_decl(px); +cdev_decl(rcons); +cdev_decl(rz); +cdev_decl(scc); +cdev_decl(tz); /* a framebuffer with an attached mouse: */ /* open, close, ioctl, poll, mmap */ @@ -195,89 +188,89 @@ struct cdevsw cdevsw[] = cdev_swap_init(1,sw), /* 1: /dev/drum (swap pseudo-device) */ cdev_ctty_init(1,ctty), /* 2: controlling terminal */ cdev_mm_init(1,mm), /* 3: /dev/{null,mem,kmem,...} */ - cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */ - cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */ + cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */ + cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */ cdev_log_init(1,log), /* 6: /dev/klog */ cdev_fd_init(1,filedesc), /* 7: file descriptor pseudo-dev */ - cdev_notdef(), /* 8: old 2100/3100 frame buffer */ - cdev_disk_init(NSD,sd), /* 9: old slot for SCSI disk */ - cdev_tape_init(NTZ,tz), /* 10: SCSI tape */ + cdev_notdef(), /* 8: ULTRIX fl */ + cdev_disk_init(NSD,sd), /* 9: MI SCSI disk */ + cdev_tape_init(NTZ,tz), /* 10: ULTRIX tz tape */ cdev_disk_init(NVND,vnd), /* 11: vnode disk driver */ cdev_bpftun_init(NBPFILTER,bpf),/* 12: Berkeley packet filter */ - cdev_notdef(), /* 13: color frame buffer */ - cdev_notdef(), /* 14: maxine color frame buffer */ + cdev_notdef(), /* 13: ULTRIX up */ + cdev_notdef(), /* 14: ULTRIX tm */ cdev_tty_init(NDTOP,dtop), /* 15: desktop bus interface */ cdev_tty_init(NDC,dc), /* 16: dc7085 serial interface */ cdev_tty_init(NSCC,scc), /* 17: scc 82530 serial interface */ - cdev_notdef(), /* 18: mono frame buffer */ - cdev_notdef(), /* 19: mt */ - cdev_tty_init(NPTY,pts), /* 20: pty slave */ - cdev_ptc_init(NPTY,ptc), /* 21: pty master */ - cdev_notdef(), /* 22: dmf */ - cdev_notdef(), /* 23: vax 730 idc */ - cdev_notdef(), /* 24: dn-11 */ + cdev_notdef(), /* 18: ULTRIX ct */ + cdev_notdef(), /* 19: ULTRIX mt */ + cdev_tty_init(NPTY,pts), /* 20: ULTRIX pty slave */ + cdev_ptc_init(NPTY,ptc), /* 21: ULTRIX pty master */ + cdev_notdef(), /* 22: ULTRIX dmf */ + cdev_notdef(), /* 23: ULTRIX vax 730 idc */ + cdev_notdef(), /* 24: ULTRIX dn-11 */ /* 25-28 CSRG reserved to local sites, DEC sez: */ - cdev_notdef(), /* 25: gpib */ - cdev_notdef(), /* 26: lpa */ - cdev_notdef(), /* 27: psi */ - cdev_notdef(), /* 28: ib */ - cdev_notdef(), /* 29: ad */ - cdev_notdef(), /* 30: rx */ - cdev_notdef(), /* 31: ik */ - cdev_notdef(), /* 32: rl-11 */ - cdev_notdef(), /* 33: dhu/dhv */ - cdev_notdef(), /* 34: Vax Able dmz, mips dc */ - cdev_notdef(), /* 35: qv */ - cdev_notdef(), /* 36: tmscp */ - cdev_notdef(), /* 37: vs */ - cdev_notdef(), /* 38: vax cn console */ - cdev_notdef(), /* 39: lta */ - cdev_notdef(), /* 40: crl (Venus, aka 8600 aka 11/790 console RL02) */ - cdev_notdef(), /* 41: cs */ - cdev_notdef(), /* 42: qd, Qdss, vcb02 */ - cdev_mm_init(1,mm), /* 43: errlog (VMS-lookalike puke) */ - cdev_notdef(), /* 44: dmb */ - cdev_notdef(), /* 45: vax ss, mips scc */ - cdev_tape_init(NST,st), /* 46: st */ - cdev_disk_init(NCD,cd), /* 47: sd */ - cdev_notdef(), /* 48: Ultrix /dev/trace */ - cdev_notdef(), /* 49: sm (sysV shm?) */ - cdev_notdef(), /* 50 sg */ - cdev_notdef(), /* 51: sh tty */ - cdev_notdef(), /* 52: its */ - cdev_notdef(), /* 53: nodev */ - cdev_notdef(), /* 54: nodev */ - cdev_tape_init(NTZ,tz), /* 55: ultrix-compatible scsi tape (tz) */ - cdev_disk_init(NRZ,rz), /* 56: rz scsi, Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 25: ULTRIX gpib */ + cdev_notdef(), /* 26: ULTRIX lpa */ + cdev_notdef(), /* 27: ULTRIX ps */ + cdev_notdef(), /* 28: ULTRIX ib */ + cdev_notdef(), /* 29: ULTRIX ad */ + cdev_notdef(), /* 30: ULTRIX rx */ + cdev_notdef(), /* 31: ULTRIX ik */ + cdev_notdef(), /* 32: ULTRIX rl-11 */ + cdev_notdef(), /* 33: ULTRIX dhu/dhv */ + cdev_notdef(), /* 34: ULTRIX vax Able dmz, mips dc */ + cdev_notdef(), /* 35: ULTRIX qv */ + cdev_notdef(), /* 36: ULTRIX tmscp */ + cdev_notdef(), /* 37: ULTRIX vs */ + cdev_notdef(), /* 38: ULTRIX vax cn console */ + cdev_notdef(), /* 39: ULTRIX lta */ + cdev_notdef(), /* 40: ULTRIX crl (Venus, aka 8600 aka 11/790 console RL02) */ + cdev_notdef(), /* 41: ULTRIX cs */ + cdev_notdef(), /* 42: ULTRIX qd, Qdss, vcb02 */ + cdev_mm_init(1,mm), /* 43: ULTRIX errlog (VMS-lookalike puke) */ + cdev_notdef(), /* 44: ULTRIX dmb */ + cdev_notdef(), /* 45: ULTRIX vax ss, mips scc */ + cdev_tape_init(NST,st), /* 46: MI SCSI tape */ + cdev_disk_init(NCD,cd), /* 47: MI SCSI CD-ROM */ + cdev_notdef(), /* 48: ULTRIX /dev/trace */ + cdev_notdef(), /* 49: ULTRIX sm (sysV shm?) */ + cdev_notdef(), /* 50: ULTRIX sg */ + cdev_notdef(), /* 51: ULTRIX sh tty */ + cdev_notdef(), /* 52: ULTRIX its */ + cdev_scanner_init(NSS,ss), /* 53: MI SCSI scanner */ + cdev_ch_init(NCH,ch), /* 54: MI SCSI autochanger */ + cdev_uk_init(NUK,uk), /* 55: MI SCSI unknown */ + cdev_disk_init(NRZ,rz), /* 56: ULTRIX rz SCSI, gross coupling to PrestoServe driver */ cdev_notdef(), /* 57: nodev */ - cdev_notdef(), /* 58: fc */ - cdev_notdef(), /* 59: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 60: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 61: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 62: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 63: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 64: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 65: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 66: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 67: mscp, again Ultrix gross coupling to PrestoServe driver */ - cdev_notdef(), /* 68: ld */ - cdev_notdef(), /* 69: /dev/audit */ - cdev_notdef(), /* 70: Mogul (nee' CMU) packetfilter */ - cdev_notdef(), /* 71: xcons, mips Ultrix /dev/xcons virtual console nightmare */ - cdev_notdef(), /* 72: xa */ - cdev_notdef(), /* 73: utx */ - cdev_notdef(), /* 74: sp */ - cdev_notdef(), /* 75: pr Ultrix PrestoServe NVRAM pseudo-device control device */ - cdev_notdef(), /* 76: ultrix disk shadowing */ - cdev_notdef(), /* 77: ek */ - cdev_notdef(), /* 78: msdup ? */ - cdev_notdef(), /* 79: so-called multimedia audio A */ - cdev_notdef(), /* 80: so-called multimedia audio B */ - cdev_notdef(), /* 81: so-called multimedia video in */ - cdev_notdef(), /* 82: so-called multimedia video out */ - cdev_notdef(), /* 83: fd */ - cdev_notdef(), /* 84: DTi */ + cdev_notdef(), /* 58: ULTRIX fc */ + cdev_notdef(), /* 59: ULTRIX fg, again gross coupling to PrestoServe driver */ + cdev_notdef(), /* 60: ULTRIX mscp, again gross coupling to PrestoServe driver */ + cdev_notdef(), /* 61: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 62: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 63: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 64: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 65: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 66: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 67: ULTRIX mscp, again Ultrix gross coupling to PrestoServe driver */ + cdev_notdef(), /* 68: ULTRIX ld */ + cdev_notdef(), /* 69: ULTRIX /dev/audit */ + cdev_notdef(), /* 70: ULTRIX Mogul (nee' CMU) packetfilter */ + cdev_notdef(), /* 71: ULTRIX xcons, mips /dev/xcons virtual console nightmare */ + cdev_notdef(), /* 72: ULTRIX xa */ + cdev_notdef(), /* 73: ULTRIX utx */ + cdev_notdef(), /* 74: ULTRIX sp */ + cdev_notdef(), /* 75: ULTRIX pr PrestoServe NVRAM pseudo-device control device */ + cdev_notdef(), /* 76: ULTRIX disk shadowing */ + cdev_notdef(), /* 77: ULTRIX ek */ + cdev_notdef(), /* 78: ULTRIX msdup */ + cdev_notdef(), /* 79: ULTRIX multimedia audio A */ + cdev_notdef(), /* 80: ULTRIX multimedia audio B */ + cdev_notdef(), /* 81: ULTRIX multimedia video in */ + cdev_notdef(), /* 82: ULTRIX multimedia video out */ + cdev_notdef(), /* 83: ULTRIX fd */ + cdev_notdef(), /* 84: ULTRIX DTi */ cdev_tty_init(NRASTERCONSOLE,rcons), /* 85: rcons pseudo-dev */ cdev_fbm_init(NFB,fb), /* 86: frame buffer pseudo-device */ cdev_disk_init(NCCD,ccd), /* 87: concatenated disk driver */ @@ -339,9 +332,9 @@ static int chrtoblktbl[] = { /* 6 */ NODEV, /* 7 */ NODEV, /* 8 */ NODEV, - /* 9 */ NODEV, - /* 10 */ NODEV, - /* 11 */ 2, + /* 9 */ 19, /* MI SCSI disk */ + /* 10 */ 20, /* ULTRIX tz */ + /* 11 */ 2, /* vnode disk */ /* 12 */ NODEV, /* 13 */ NODEV, /* 14 */ NODEV, @@ -376,8 +369,8 @@ static int chrtoblktbl[] = { /* 43 */ NODEV, /* 44 */ NODEV, /* 45 */ NODEV, - /* 46 */ NODEV, - /* 47 */ 19, /* sd */ + /* 46 */ 18, /* MI SCSI tape */ + /* 47 */ 25, /* MI SCSI CD-ROM */ /* 48 */ NODEV, /* 49 */ NODEV, /* 50 */ NODEV, @@ -386,7 +379,7 @@ static int chrtoblktbl[] = { /* 53 */ NODEV, /* 54 */ NODEV, /* 55 */ NODEV, - /* 56 */ 21, /* 19 */ /* XXX rz, remapped to sd */ + /* 56 */ 21, /* ULTRIX rz */ /* 57 */ NODEV, /* 58 */ NODEV, /* 59 */ NODEV, @@ -417,7 +410,7 @@ static int chrtoblktbl[] = { /* 84 */ NODEV, /* 85 */ NODEV, /* 86 */ NODEV, - /* 87 */ 24, + /* 87 */ 24, /* concatenated disk */ /* 88 */ NODEV, /* 89 */ NODEV, /* 90 */ NODEV, @@ -426,8 +419,8 @@ static int chrtoblktbl[] = { /* 93 */ NODEV, /* 94 */ NODEV, /* 95 */ NODEV, - /* 96 */ 32, - /* 97 */ 17, + /* 96 */ 32, /* RAIDframe */ + /* 97 */ 17, /* memory disk */ /* 98 */ NODEV, }; diff --git a/sys/arch/pmax/pmax/disksubr.c b/sys/arch/pmax/pmax/disksubr.c index 80d26d814536..da3700805762 100644 --- a/sys/arch/pmax/pmax/disksubr.c +++ b/sys/arch/pmax/pmax/disksubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.26 2000/01/18 19:48:02 thorpej Exp $ */ +/* $NetBSD: disksubr.c,v 1.27 2000/02/19 09:43:40 nisimura Exp $ */ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. @@ -277,20 +277,6 @@ done: return (error); } - -/* - * was this the boot device ? - */ -void -dk_establish(dk, dev) - struct disk *dk; - struct device *dev; -{ - /* see also arch/alpha/alpha/disksubr.c */ - printf("Warning: boot path unknown\n"); - return; -} - /* * UNTESTED !! *