Subject: kernel 'config', autoconfig,  documentation changes (#95, 7 of 12)
Index:	sys,doc,etc,pdpif,.../many 2.11BSD

Description:
	This is part 7 of 12.  Updates #89 thru #100 are parts 1 thru 12
	respectively.
	
	If you have tired of reading the notes in the "Repeat-By:" section 
	please skip to the "Fix:" section for notes and instructions about 
	this patch file (list of files updated, etc).

Repeat-By:

	This section is repeated in each patch file.  Specific directions
	for the individual patches are included in the "Fix:" section.

	Several problem areas are addressed by this series of updates.

	1) The kernel configuration problems are best noticed
	   by maintaining kernels for a variety of systems and forgetting
	   to copy 'localopts.h' to ../h before compiling.  This at best
	   would cause compile time problems, at worst resulting in a kernel
	   that was unusable.  MANY of the changes described below are
	   aimed at the reduction of 'localopts.h' to almost nothing.

	2) There were several kernel config options which were either known not
	   to work, have not been used within recent memory or were obsolete.
	   UCB_FRCSWAP (to force a swap on program expansion) is a good
	   example of an option which has been removed.
	   
	   The list of things which have been options at one time or another
	   in the system's life has been removed.  Many of them dated back
	   to V7, the modules which they affected are not even present in
	   the system any longer.

	   Two options have been moved to the end of the 'config' script.
	   Neither is known to work (CGL_RTP and FPSIM) and are always left
	   NO.

	3) A couple of kernel config options should not have been options so
	   that the kernel could automatically adapt to whatever machine it
	   found itself running on.  The UNIBUS_MAP and Q22 options are good 
	   examples of this.  Usage of the UNIBUS_MAP option was inconsistent,
	   some of the drivers in the system "#ifdef"d references to the
	   Unibus map allocation routine while other drivers did not.  Since
	   the system knows whether a Unibus Map is present or not the
	   correct behaviour is to either test 'ubmap' or simply call 'mapalloc'
	   (which will do the test for you).  In the case of GENERIC or Unibus
	   based kernels there is _no_ penalty (since UNIBUS_MAP was defined),
	   in the case of Qbus systems there is about 900 bytes of code that
	   simply never gets used (and 40 bytes or so of D space).

	   The Q22 defined was used incorrectly in a couple of drivers to
	   either distinquish between Digital and 3rd party controllers (DH-11
	   vs Emulex CS02) or to indicate whether the system was Qbus or
	   Unibus based.  The references to Q22 in dh.c were changed to
	   CS02 (a new option in the device selection area of the config
	   files), deleted, or replaced with tests of 'ubmap'.

	   UCB_RUSAGE has been made standard because several applications
	   (iostat, vmstat, etc) use the statistics and because the
	   getrusage(2) call uses them.  UCB_METER has been left as an
	   option and will be placed in the Makefile as "-DUCB_METER" in
	   the DEFS line.  References to UCB_RUSAGE have been removed from the
	   kernel.

	   NONFP has been removed.  Hardware floating point is mandatory
	   for two reasons:  the simulator doesn't work, and FP is very
	   inexpensive (or standard on KDJ-11 systems).

	   VIRUS_VFORK has been removed.  Nothing depended on it in the
	   applications and VIRUS_VFORK has never been anything but YES.  

	4) NSWAP has gone away.  It was too easy to either forget to change
	   it or to pick a wrong number (by guessing).  Borrowing yet another
	   concept from 4.3BSD the system now determines the amount of
	   swap space dynamically after booting.  This is done by calling
	   a partition size routine which each disc driver provides.  The
	   bdevsw[] table (in pdp/conf.c) has been expanded to include 
	   a "d_psize" member for each device.

	   NOTE:  this change requires that 'a' and 'b' be the root and
		  swap partitions.  All drivers except the RK06/7 (hk.c) 
		  and RM02/3 (xp.c) observed this rule.  Changes were made 
		  to the RK06/7 and RM02/3 partition tables (and /etc/disktab).
		  The previous practice of using the 'e' or 'f' partitions
		  to overlap the old 'a'+'b' partitions has gone away.  THE
		  new 'a' partition is the same size as the 'e' or 'f'
		  partitions used to be, so there is ROOT FILESYSTEM
		  compatibility (the system will still boot).   Best
		  to back the system up (if using RK07 or RM02 drives)
		  before applying these changes.

	5) SWAPLO has gone away.  It has never been anything but 0 within
	   recent memory (and would have resulted in filesystem corruption
	   if an inappropriate value were chosen).  The only device which 
	   possibly would need to use it (the RL02) is required to be used 
	   in pairs.
	   
	   Deleting SWAPLO removed a number of long word adds scattered around
	   the kernel.  One sector (.5kb) of swap space is "lost"/discarded.
	   The previous practice was to decrement 'swplo' in compensation
	   for entering 1 as the first swap block.  Since 'swplo' has
	   gone away, the number of blocks available ('nswap') is simply 
	   decremented by 1 and the swapmap initialized starting at block 1.

	   This change affects a couple of the applications ('ps', 'pstat',
	   etc.) which were looking for 'swplo'.  These programs have been
	   updated.

	6) 'autoconfig' and programmable vector devices (MSCP, TMSCP, etc)
	    have never gotten along very well.  The drivers had
	    vectors hardcoded (either via #define statments or code
	    which allocated vectors from a base vector) into them.  Changing
	    /etc/dtab would have no effect (at best) or the system would
	    crash (at worst) because 'autoconfig' would allocate/initialize 
	    a vector different than that assumed by the driver. 

	    Networking drivers which support programmable vectors (DEQNA
	    for example) previously had their vectors hardcoded into
	    them AND into pdp/net_scb.s.  Changing one but forgetting to
	    change the other was one way to generate an inoperable system!

	    This has been fixed _at last_!  There are two methods used.
	    One for kernel devices configured by 'autoconfig' and a second 
	    used by the both 'autoconfig' and the networking drivers (which 
	    are not handled by 'autoconfig' because the networking is already 
	    running by the time 'init' starts 'autoconfig').

	    If a driver defines a routine "xxxVec" (where xxx is 'ra',
	    'tms', etc) then 'autoconfig' will call the driver with
	    two parameters:  the controller number and the vector from
	    /etc/dtab.  If the driver lacks a 'xxxVec' routine then
	    'autoconfig' functions as it always has.

	    The second method is used when dynamic allocation of vectors
	    is desired for programmable vector devices.  The networking
	    drivers (DEQNA, DEQTA, etc) use this method.  In the kernel
	    there is a location ('lastiv') which contains the next vector
	    to assign.  Usage is to decrement 'lastiv' by 4 and use the
	    new value.  If multiple vectors are needed then a multiple of
	    4 is subtracted ('autoconfig' counts how many "handlers" it
	    needs for a device).  To make use of this feature (second or third
	    MSCP controllers for example) put a 0 (zero) in the vector
	    field in /etc/dtab.

		NOTE:  It is an error to specify a 0 vector (dynamic
		       allocation) and not have a 'xxxVec' routine for
		       'autoconfig' to call.  'autoconfig' will print
		       an error and leave the device unattached.

		       If 'xxxVec' is used by 'autoconfig' the driver
		       should return success (0) or failure (non-0).
		       'autoconfig' will print "vectorset" if a programmable
		       vector is successfully installed.

	    Networking drivers access 'lastiv' via the "mfkd" and "mtkd"
	    (move from kernel data, move to kernel data) routines.  The
	    hardwired vector (400 for the DEQNA) has been removed from
	    scb.s.,

		NOTE:  the handlers for networking devices are still
		       present in net_scb.s, the drivers initialize
		       the allocated vector by means of a small (1 instruction)
		       assembly language routine (see the changes to 
		       pdpif/if_qe.c).  This 'asm' routine is needed
		       for the driver to access the handle name which does
		       not have a leading (underscore) prepended to it.

	7)  The logic in the DHV-11 driver to attempt forcing a fuller silo
	    (by turning off and on the receive interrupt enable) was removed
	    since it did not work (for very long).  After 2 silo overruns
	    or 90% full silos the logic would disable itself by decrementing
	    the number of delay ticks to 0.  The only real fix for the DHV-11's
	    silo handling problem is to replace the DHV-11 with a DHQ-11.

	8)  The kernel option UCB_NET has been renamed to INET (as 4.3BSD
	    does).  The TCP_COMPAT_42 option has been made "standard" by
	    removing the ifdef in netinet/tcp_var.h.

	9)  The MAXMEM option has been moved to param.h.  It is (almost)
	    never changed and was yet one more thing to accidentally get
	    wrong when configuring a kernel.  Thought was given to removing
	    MAXMEM entirely but it was put in with the other "never changed
	    without a great deal of thought" parameters in param.h

	10) The setup and installation documents have been revised to reflect
	    the new kernel configuration process and to remove references
	    to 'xpunix', 'raunix', etc (not needed now that the generic
	    kernel adapts automatically).

	11) The drivers in the OTHERS directory have been lightly edited
	    to change UCB_NET to INET, remove UNIBUS_MAP usage, etc.  No
	    attempt has been made to port or fix the drivers.

	12) Last, but by no means least, the 'config' script (/sys/conf/config)
	    and the conf/Make.{nsunix,unix,sunix} files have been totally 
	    redone.  Borrowing still another idea from 4.3BSD (not a whole
	    lot left to 'steal' ;-)) the 'config' script now places a line:

		DEFS="-DKERNEL -Doption1 -Doption2 ..."

	    at the front of the main Makefile.  The CFLAGS statement has
	    been modified to include ${DEFS}, thus the configuration options
	    are passed thru to the secondary makefiles Make.pdp, Make.pdpuba,
	    etc. 

	    The GENERIC config file has been redone.  You should make note
	    of your present device complement and then re-config your kernels
	    by making a copy of GENERIC and editing it.

		    NOTE:  The PDP11 line is now only used to select the
			   appropriate inlining method for the 'spl'
			   instruction.  You may safely set PDP11 to GENERIC,
			   no references to PDP11 are now made anywhere in the
			   kernel.

			   You should only set the IDENT line to GENERIC
			   if you either know what you are doing, or if
			   you really are making a distribution kernel.

			   Setting IDENT to GENERIC causes the kernel at
			   boot time to:

			   a) override "swapdev".
			      A GENERIC kernel automatically assigns the 'b'
			      partition of the booted device to be "swapdev"

			   b) override "rootdev".
			      A GENERIC kernel automatically assigns the 'a'
			      partition of the booted device to be "rootdev"
			      and "pipedev".

		The /GENALLSYS script is obsolete and has been removed
		from the system.  For a GENERIC system /unix will now
		adapt to the bootstrapped drive and automatically determine
		the amount of swap space.

	    The only change made to the secondary makefiles was to add
	    a new ethernet driver (not yet working) to Make.net.  The DEQTA
	    driver (if_qt.c) is still being debugged, a future update will
	    be forthcoming.  Since if_qt.c does not exist, the "patch" is
	    the whole file (the same applies to if_qtreg.h).  You will need
	    to create two 0 length files in pdpif ("touch /sys/pdpif/if_qt.c
	    /sys/pdpif/if_qtreg.h") before applying the 'pdpif' update kit.
	    A reminder will be placed in the part containing that patch.

		NOTE:  localopts.h has exactly _TWO_ (2) definitions in it
		       now:  EXTERNALITIMES (mapped out time values from the
		       inodes) and LINEHZ.

		       The default for EXTERNALITIMES is now YES.  It is
		       recommended that this not be changed, if it is changed
		       then applications which look at the kernel incore
		       inode table (pstat for example) will need to be
		       recompiled.

		       Unless either of these two defines change you never
		       need to worry about copying localopts.h again!

Fix:
	The following files are modified:

/usr/src/sys/OTHERS/18bit_22bit/mch_click.dfc
/usr/src/sys/OTHERS/bad144/xp.c
/usr/src/sys/OTHERS/dsd480/rx3.c
/usr/src/sys/OTHERS/du11/du.c
/usr/src/sys/OTHERS/dv/dv.c
/usr/src/sys/OTHERS/dvhp/dvhp.c
/usr/src/sys/OTHERS/emulex-cs02/cs02-q22-fixes
/usr/src/sys/OTHERS/fuji_160/dev/xp.c
/usr/src/sys/OTHERS/fuji_160/ioconf.c
/usr/src/sys/OTHERS/ht/ht.c
/usr/src/sys/OTHERS/ml11/ml.c
/usr/src/sys/OTHERS/rf11/rf.c
/usr/src/sys/OTHERS/rm02.03.05/rm.c
/usr/src/sys/OTHERS/rp03/rp.c
/usr/src/sys/OTHERS/rp04.06/hp.c
/usr/src/sys/OTHERS/rs03.04/hs.c
/usr/src/sys/OTHERS/rx01/rx.c
/usr/src/sys/OTHERS/rx02/#1/rx2.c
/usr/src/sys/OTHERS/rx02/#2/rx.c
/usr/src/sys/OTHERS/versatec/vp.c

	References to UCB_NET have been changed to INET.

	References to UNIBUS map have been removed because support for
	the Unibus Map is standard.

	References to Q22 have been replaced (or deleted as appropriate)
	with run time tests for a Unibus Map being present.

	No attempt has been made to fix or make operable any of the drivers
	in the OTHERS directory.   The files have merely been lightly edited
	to keep them follow the conventions in the running kernel.

*** /usr/src/sys/OTHERS/18bit_22bit/mch_click.dfc.old	Thu Sep  1 20:25:56 1988
--- /usr/src/sys/OTHERS/18bit_22bit/mch_click.dfc	Thu Dec 24 18:25:47 1992
***************
*** 15,21 ****
    #endif CGL_RTP
    
    
! ! #ifdef UCB_NET
    /*
     * copyv(fromaddr, toaddr, count)
     *	virtual_addr	fromaddr,
--- 15,21 ----
    #endif CGL_RTP
    
    
! ! #ifdef INET
    /*
     * copyv(fromaddr, toaddr, count)
     *	virtual_addr	fromaddr,
***************
*** 23,29 ****
    #endif CGL_RTP
    
    
! ! #if defined(UCB_NET) || defined(SOFUB_MAP)
    /*
     * copyv(fromaddr, toaddr, count)
     *	virtual_addr	fromaddr,
--- 23,29 ----
    #endif CGL_RTP
    
    
! ! #if defined(INET) || defined(SOFUB_MAP)
    /*
     * copyv(fromaddr, toaddr, count)
     *	virtual_addr	fromaddr,
***************
*** 33,41 ****
    	mov	PS,-(sp)		/ save current PS
    	bit	$0340,(sp)		/ are we currently at SPL?
    	bne	2f
! + #ifdef	UCB_NET
    	SPLNET				/ nope, lock out the network
! + #endif	UCB_NET
    2:
    	mov	KDSA5,-(sp)		/ save seg5
    	mov	KDSD5,-(sp)
--- 33,41 ----
    	mov	PS,-(sp)		/ save current PS
    	bit	$0340,(sp)		/ are we currently at SPL?
    	bne	2f
! + #ifdef	INET
    	SPLNET				/ nope, lock out the network
! + #endif
    2:
    	mov	KDSA5,-(sp)		/ save seg5
    	mov	KDSD5,-(sp)
***************
*** 44,50 ****
    4:
    	clr	r0			/ clear r0 and r1 (why?)
    	rts	pc			/   and return
! ! #endif UCB_NET
    
    
    /*
--- 44,50 ----
    4:
    	clr	r0			/ clear r0 and r1 (why?)
    	rts	pc			/   and return
! ! #endif
    
    
    /*
***************
*** 52,58 ****
    4:
    	clr	r0			/ clear r0 and r1 (why?)
    	rts	pc			/   and return
! ! #endif UCB_NET | SOFUB_MAP
    
    
    /*
--- 52,58 ----
    4:
    	clr	r0			/ clear r0 and r1 (why?)
    	rts	pc			/   and return
! ! #endif INET | SOFUB_MAP
    
    
    /*
*** /usr/src/sys/OTHERS/bad144/xp.c.old	Sun Sep 22 09:23:17 1991
--- /usr/src/sys/OTHERS/bad144/xp.c	Sat Jan  2 23:40:54 1993
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)xp.c	1.1 (2.10BSD Berkeley) 12/1/86
   */
  
  /* $Header: xp.c,v 1.3 88/06/18 08:10:08 jbj Locked $ */
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)xp.c	1.2 (2.11BSD GTE) 1/2/93
   */
  
  /* $Header: xp.c,v 1.3 88/06/18 08:10:08 jbj Locked $ */
***************
*** 46,55 ****
  #include "dkbad.h"
  #include "dk.h"
  
- #ifdef UNIBUS_MAP
  #include "map.h"
  #include "uba.h"
- #endif UNIBUS_MAP
  
  #define	XP_SDIST	2
  #define	XP_RDIST	6
--- 46,53 ----
***************
*** 297,306 ****
  		return(0);
  	if ((xpaddr != 0) && (fioword(xpaddr) != -1)) {
  		xc->xp_addr = xpaddr;
- #if (PDP11 == 70 || PDP11 == GENERIC || defined(Q22))
  		if (fioword(&xpaddr->hpbae) != -1)
  			xc->xp_flags |= XP_RH70;
- #endif
  #ifdef XP_PROBE
  	/*
  	 *  If already attached, ignore (don't want to renumber drives)
--- 295,302 ----
***************
*** 467,476 ****
  		iodone(bp);
  		return;
  	}
- #ifdef UNIBUS_MAP
  	if ((xd->xp_ctlr->xp_flags & XP_RH70) == 0)
  		mapalloc(bp);
- #endif
  	bp->b_cylin = bn / xd->xp_nspc + xd->xp_sizes[pseudo_unit].cyloff;
  	dp = &xputab[unit];
  	s = spl5();
--- 463,470 ----
***************
*** 547,556 ****
  		bbp->b_un.b_addr = (caddr_t)&xpbad[unit];
  		bbp->b_blkno = (daddr_t)xd->xp_ncyl * xd->xp_nspc - xd->xp_nsect;
  		bbp->b_cylin = xd->xp_ncyl - 1;
- #ifdef UNIBUS_MAP
  		if ((xd->xp_ctlr->xp_flags & XP_RH70) == 0)
  			mapalloc(bbp);
- #endif
  		dp->b_actf = bbp;
  		bbp->av_forw = bp;
  		bp = bbp;
--- 541,548 ----
***************
*** 675,684 ****
  	xpaddr->hpdc = cn;
  	xpaddr->hpda = (tn << 8) + sn;
  	xpaddr->hpba = bp->b_un.b_addr;
- #if (PDP11 == 70 || PDP11 == GENERIC || defined(Q22))
  	if (xc->xp_flags & XP_RH70)
  		xpaddr->hpbae = bp->b_xmem;
- #endif
  	xpaddr->hpwc = -(bp->b_bcount >> 1);
  	/*
  	 * Initiate i/o command.
--- 667,674 ----
***************
*** 894,902 ****
  	int	ocmd;
  	int	cn, tn, sn;
  	daddr_t bn;
- #ifdef UNIBUS_MAP
  	struct ubmap *ubp;
- #endif
  	int	unit;
  
  	/*
--- 884,890 ----
***************
*** 956,962 ****
  			 */
  			while (byte < bp->b_bcount && wrong != 0) {
  				addr = bb + byte;
- #ifdef UNIBUS_MAP
  				if (bp->b_flags & (B_MAP|B_UBAREMAP)) {
  					/*
  					 * Simulate UNIBUS map if UNIBUS
--- 944,949 ----
***************
*** 965,971 ****
  					ubp = UBMAP + ((addr >> 13) & 037);
  					addr = exadr(ubp->ub_hi, ubp->ub_lo) + (addr & 017777);
  				}
- #endif
  				putmemc(addr, getmemc(addr) ^ (int) wrong);
  				byte++;
  				wrong >>= 8;
--- 952,957 ----
***************
*** 1012,1021 ****
  	xpaddr->hpda = (tn << 8) + sn;
  	xpaddr->hpwc = wc;
  	xpaddr->hpba = (caddr_t)addr;
- #if (PDP11 == 70 || PDP11 == GENERIC || defined(Q22))
  	if (xd->xp_ctlr->xp_flags & XP_RH70)
  		xpaddr->hpbae = (int)(addr >> 16);
- #endif
  	xpaddr->hpcs1.w = ocmd;
  	return (1);
  }
--- 998,1005 ----
***************
*** 1023,1037 ****
  #ifdef XP_DUMP
  /*
   * Dump routine.  Dumps from dumplo to end of memory/end of disk section for
!  * minor(dev).  It uses the UNIBUS map to dump all of memory if there is a
!  * UNIBUS map and this isn't an RH70.  This depends on UNIBUS_MAP being
!  * defined.
   */
- #ifdef UNIBUS_MAP
- #define	DBSIZE	(UBPAGE/NBPG)		/* unit of transfer, one UBPAGE */
- #else
  #define DBSIZE	16			/* unit of transfer, same number */
- #endif
  
  xpdump(dev)
  	dev_t dev;
--- 1007,1015 ----
  #ifdef XP_DUMP
  /*
   * Dump routine.  Dumps from dumplo to end of memory/end of disk section for
!  * minor(dev).
   */
  #define DBSIZE	16			/* unit of transfer, same number */
  
  xpdump(dev)
  	dev_t dev;
***************
*** 1044,1052 ****
  	daddr_t bn, dumpsize;
  	long paddr;
  	int	sn, count;
- #ifdef UNIBUS_MAP
  	struct ubmap *ubp;
- #endif
  
  	if ((bdevsw[major(dev)].d_strategy != xpstrategy)	/* paranoia */
  		|| ((dev=minor(dev)) > (NXPD << 3)))
--- 1022,1028 ----
***************
*** 1068,1076 ****
  	}
  	if ((xpaddr->hpds & (HPDS_DPR | HPDS_MOL)) != (HPDS_DPR | HPDS_MOL))
  		return(EFAULT);
- #ifdef UNIBUS_MAP
  	ubp = &UBMAP[0];
- #endif
  	for (paddr = 0L; dumpsize > 0; dumpsize -= count) {
  		count = dumpsize>DBSIZE? DBSIZE: dumpsize;
  		bn = dumplo + (paddr >> PGSHIFT);
--- 1044,1050 ----
***************
*** 1078,1088 ****
  		sn = bn % xd->xp_nspc;
  		xpaddr->hpda = ((sn / xd->xp_nsect) << 8) | (sn % xd->xp_nsect);
  		xpaddr->hpwc = -(count << (PGSHIFT - 1));
- #ifdef UNIBUS_MAP
- 		/*
- 		 * If UNIBUS_MAP exists, use the map, unless on an 11/70
- 		 * with RH70.
- 		 */
  		if (ubmap && ((xd->xp_ctlr->xp_flags & XP_RH70) == 0)) {
  			ubp->ub_lo = loint(paddr);
  			ubp->ub_hi = hiint(paddr);
--- 1052,1057 ----
***************
*** 1090,1108 ****
  			xpaddr->hpcs1.w = HP_WCOM | HP_GO;
  		}
  		else {
- #endif UNIBUS_MAP
  			/*
  			 * Non-UNIBUS map, or 11/70 RH70 (MASSBUS)
  			 */
  			xpaddr->hpba = loint(paddr);
- #if (PDP11 == 70 || PDP11 == GENERIC || defined(Q22))
  			if (xd->xp_ctlr->xp_flags & XP_RH70)
  				xpaddr->hpbae = hiint(paddr);
- #endif
  			xpaddr->hpcs1.w = HP_WCOM | HP_GO | ((paddr >> 8) & (03 << 8));
- #ifdef UNIBUS_MAP
  		}
- #endif
  		while (xpaddr->hpcs1.w & HP_GO);
  		if (xpaddr->hpcs1.w & HP_TRE) {
  			if (xpaddr->hpcs2.w & HPCS2_NEM)
--- 1059,1072 ----
*** /usr/src/sys/OTHERS/dsd480/rx3.c.old	Wed Oct  9 21:32:46 1985
--- /usr/src/sys/OTHERS/dsd480/rx3.c	Sat Jan  2 23:52:05 1993
***************
*** 1,5 ****
  /*
!  *	SCCS id	@(#)rx3.c	2.1 (Berkeley)	8/5/83
   */
  
  /*
--- 1,5 ----
  /*
!  *	SCCS id	@(#)rx3.c	2.2 (2.11BSD GTE) 1/2/93
   */
  
  /*
***************
*** 212,221 ****
  	int mdev,okay,i;
  	off_t seek;
  
- #ifdef	UNIBUS_MAP
  	if (bp->b_flags & B_PHYS)
  		mapalloc(bp);
- #endif
  	/*
  	 *  Make sure block number is within range.
  	 */
--- 212,219 ----
*** /usr/src/sys/OTHERS/du11/du.c.old	Wed Apr 11 09:55:25 1990
--- /usr/src/sys/OTHERS/du11/du.c	Wed Dec 23 23:33:25 1992
***************
*** 74,82 ****
  	/*
  	 * Receive info
  	 */
- #ifndef	UCB_NKB
- 	struct	buf	*durbufp;	/* pointer to receive buffer */
- #endif
  	struct	msgbuf	durbuff[MSGN]; /* message buffer descriptors */
  	struct	msgbuf	*durbufi; /* in pointer */
  	struct	msgbuf	*durbufo; /* out pointer */
--- 74,79 ----
***************
*** 134,152 ****
  	/*
  	 * Allocate receive buffer
  	 */
- #ifndef	UCB_NKB
- 	du11.durbufp = geteblk();
  	for(n = 0; n < MSGN; n++)
- 		du11.durbuff[n].msgbufp = du11.durbufp->b_un.b_addr+(MSGLEN*n);
- #else
- #if	UCB_NKB >= 1
- 	for(n = 0; n < MSGN; n++)
  		du11.durbuff[n].msgbufp = (du11.dutbufp->b_un.b_addr+(BSIZE/2))
  						+ (MSGLEN * n);
- #else
- 	THIS IS AN ERROR!;
- #endif
- #endif
  	du11.durbufi = du11.durbufo = du11.durbuff;
  	du11.durbufn = 0;
  	du11.durstate = RIDLE;
--- 131,139 ----
***************
*** 203,211 ****
  #define	brelse	abrelse
  #endif
  	brelse(du11.dutbufp);
- #ifndef	UCB_NKB
- 	brelse(du11.durbufp);
- #endif
  
  	/*
  	 * clear maintenance mode flag
--- 190,195 ----
*** /usr/src/sys/OTHERS/dv/dv.c.old	Sun Sep 22 08:55:53 1991
--- /usr/src/sys/OTHERS/dv/dv.c	Thu Dec 24 15:12:18 1992
***************
*** 183,198 ****
  		DVADDR->dvcbr = CNBCOM | SEEK | RESET;
  		DVADDR->dvair.i = 1<<dv_unit;
  		DVADDR->dvcsr = DONE | IENABLE;
- 
- 		/***** I/O monitoring stuff  *****/
- /*  Removed for V7 upgrade
-  *		if((minord == 64) && (bp->b_blkno >= swplo1)) dv_busy = 18;
-  *		else dv_busy = (((minord & 030) >> 2) | (minord & 01)) + 10;
-  *		dk_busy |= 1<<DK_N;
-  *		dv_numb[dv_busy] += 1;
-  */
- 		/************************/
- 
  		return;
  	}
  	if(dvrdy()) return;
--- 183,188 ----
***************
*** 234,254 ****
  				DVADDR->dvcbr = CHWCOM | (sctr<<1);
  	}
  	DVADDR->dvcsr = IENABLE | GO | (dv_addr.in[0]<<4);
- 
- 	/***** I/O monitoring stuff *****/
- /* Removed for v7 Upgrade
-  *	dk_busy |= 1<<DK_N;
-  *	dk_numb[DK_N] += 1;
-  *	dk_wds[DK_N] += 8;
-  *	if((minord == 64) && (bp->b_blkno >= swplo1)) dv_busy = 9;
-  *	else dv_busy = (((minord & 030) >> 2) | (minord & 01)) + 1;
-  *	if (dv_count >= -512)
-  *		dv_numb[dv_busy] += 1;
-  *	if(bp->b_flags & B_READ) dv_rwds[dv_busy] += 8;
-  *	else dv_wwds[dv_busy] += 8;
-  */
- 	/*****************************/
- 
  }
  
  int	dv_tmp;
--- 224,229 ----
*** /usr/src/sys/OTHERS/dvhp/dvhp.c.old	Sun Sep 22 08:49:12 1991
--- /usr/src/sys/OTHERS/dvhp/dvhp.c	Sat Jan  2 23:58:59 1993
***************
*** 1,5 ****
  /*
!  *	SCCS id	@(#)dvhp.c	2.1 (Berkeley)	9/1/83
   */
  
  /*
--- 1,5 ----
  /*
!  *	SCCS id	@(#)dvhp.c	2.2 (2.11BSD GTE) 1/2/93
   */
  
  /*
***************
*** 58,67 ****
  		return(0);
  	if ((addr != (struct hpdevice *) NULL) && (fioword(addr) != -1)) {
  		DVHPADDR = addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if (fioword(&(addr->hpbae)) != -1)
  			dvhptab.b_flags |= B_RH70;
- #endif
  		return(1);
  	}
  	DVHPADDR = (struct hpdevice *) NULL;
--- 58,65 ----
***************
*** 89,98 ****
  		iodone(bp);
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	if ((dvhptab.b_flags & B_RH70) == 0)
  		mapalloc(bp);
- #endif
  	bp->b_cylin = bn / (DVHP_NSECT * DVHP_NTRAC) + dv_sizes[unit & 07].cyloff;
  	unit = dkunit(bp);
  	dp = &dvhputab[unit];
--- 87,94 ----
***************
*** 257,266 ****
  	dvhpaddr->hpdc = cn;
  	dvhpaddr->hpda = (tn << 8) + sn;
  	dvhpaddr->hpba = bp->b_un.b_addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (dvhptab.b_flags & B_RH70)
  		dvhpaddr->hpbae = bp->b_xmem;
- #endif
  	dvhpaddr->hpwc = -(bp->b_bcount >> 1);
  	/*
  	 * Warning:  unit is being used as a temporary.
--- 253,260 ----
***************
*** 402,410 ****
  	int	ocmd;
  	int	cn, tn, sn;
  	daddr_t	bn;
- #ifdef	UNIBUS_MAP
  	struct	ubmap *ubp;
- #endif
  
  	/*
  	 *	ndone is #bytes including the error
--- 396,402 ----
***************
*** 441,447 ****
  	 */
  	while (byte < bp->b_bcount && wrong != 0) {
  		addr = bb + byte;
- #ifdef	UNIBUS_MAP
  		if (bp->b_flags & (B_MAP | B_UBAREMAP)) {
  			/*
  			 * Simulate UNIBUS map if UNIBUS transfer.
--- 433,438 ----
***************
*** 449,455 ****
  			ubp = UBMAP + ((addr >> 13) & 037);
  			addr = exadr(ubp->ub_hi, ubp->ub_lo) + (addr & 017777);
  		}
- #endif
  		putmemc(addr, getmemc(addr) ^ (int) wrong);
  		byte++;
  		wrong >>= 8;
--- 440,445 ----
***************
*** 482,491 ****
  	dvhpaddr->hpda = (tn << 8) + sn;
  	dvhpaddr->hpwc = ((int)(ndone - bp->b_bcount)) / NBPW;
  	dvhpaddr->hpba = (int) addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (dvhptab.b_flags & B_RH70)
  		dvhpaddr->hpbae = (int) (addr >> 16);
- #endif
  	dvhpaddr->hpcs1.w = ocmd;
  	return (1);
  }
--- 472,479 ----
*** /usr/src/sys/OTHERS/emulex-cs02/cs02-q22-fixes.old	Sat Dec 24 16:18:45 1988
--- /usr/src/sys/OTHERS/emulex-cs02/cs02-q22-fixes	Mon Dec 28 23:34:20 1992
***************
*** 51,57 ****
    #else
                                  {
                                  ubadr_t car;
! + #if   defined(DH_CS02) && defined(Q22)
  +                               struct dmdevice *dmaddr = (struct dmdevice *)dmi
  nfo[dh].ui_addr;
  
--- 51,57 ----
    #else
                                  {
                                  ubadr_t car;
! + #if   defined(CS02)
  +                               struct dmdevice *dmaddr = (struct dmdevice *)dmi
  nfo[dh].ui_addr;
  
***************
*** 70,86 ****
                  addr->dhcar = (u_short)cpaddr(tp->t_outq.c_cf);
    #else
                  ubadr_t uba;
! + #if   defined(DH_CS02) && defined(Q22)
  +               struct dmdevice *dmaddr = (struct dmdevice *)dminfo[dh].ui_addr;
  + #endif
  
                  uba = cpaddr(tp->t_outq.c_cf);
! + #if   defined(DH_CS02) && defined(Q22)
  +               addr->un.dhcsrl = (unit&017) | DH_IE;
  +               dmaddr->dmlst_h = hiint(uba) & 077;
  + #else
                  addr->un.dhcsrl = (unit&017) | DH_IE | ((hiint(uba)<<4)&060);
! + #endif        defined(DH_CS02) && defined(Q22)
                  addr->dhcar = loint(uba);
    #endif
                  { short word = 1 << unit;
--- 70,86 ----
                  addr->dhcar = (u_short)cpaddr(tp->t_outq.c_cf);
    #else
                  ubadr_t uba;
! + #if   defined(CS02)
  +               struct dmdevice *dmaddr = (struct dmdevice *)dminfo[dh].ui_addr;
  + #endif
  
                  uba = cpaddr(tp->t_outq.c_cf);
! + #if   defined(CS02)
  +               addr->un.dhcsrl = (unit&017) | DH_IE;
  +               dmaddr->dmlst_h = hiint(uba) & 077;
  + #else
                  addr->un.dhcsrl = (unit&017) | DH_IE | ((hiint(uba)<<4)&060);
! + #endif
                  addr->dhcar = loint(uba);
    #endif
                  { short word = 1 << unit;
***************
*** 96,102 ****
     */
    struct dmdevice {
          short   dmcsr;          /* control status register */
! + #if   defined(DH_CS02) && defined(Q22)
  +       union {                 /* Need to access high byte independently */
  +               short dmlst_w;
  +               char dmlst_b[2];
--- 96,102 ----
     */
    struct dmdevice {
          short   dmcsr;          /* control status register */
! + #if   defined(CS02)
  +       union {                 /* Need to access high byte independently */
  +               short dmlst_w;
  +               char dmlst_b[2];
*** /usr/src/sys/OTHERS/fuji_160/dev/xp.c.old	Sun Sep 22 09:15:05 1991
--- /usr/src/sys/OTHERS/fuji_160/dev/xp.c	Sat Jan  2 23:44:35 1993
***************
*** 30,38 ****
  #ifndef	INTRLVE
  #include <sys/inline.h>
  #endif
- #ifdef	UNIBUS_MAP
  #include <sys/uba.h>
- #endif
  
  #define	XP_SDIST	2
  #define	XP_RDIST	6
--- 30,36 ----
***************
*** 96,105 ****
  		return(0);
  	if ((xpaddr != 0) && (fioword(xpaddr) != -1)) {
  		xc->xp_addr = xpaddr;
- #if	PDP11 == 70 || PDP11 == GENERIC || defined(EXT_LSI)
  		if (fioword(&(xpaddr->hpbae)) != -1)
  			xc->xp_flags |= XP_RH70;
- #endif
  #ifdef	XP_PROBE
  		/*
  		 *  If already attached, ignore (don't want to renumber drives)
--- 94,101 ----
***************
*** 240,249 ****
  		iodone(bp);
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	if ((xd->xp_ctlr->xp_flags & XP_RH70) == 0)
  		mapalloc(bp);
- #endif	UNIBUS_MAP
  #ifdef EXT_LSI
  	if(bp->b_flags & B_PHYS)
  		if(Sofub_alloc(bp) == 0)
--- 236,243 ----
***************
*** 437,446 ****
  	xpaddr->hpdc = cn;
  	xpaddr->hpda = (tn << 8) + sn;
  	xpaddr->hpba = bp->b_un.b_addr;
- #if	PDP11 == 70 || PDP11 == GENERIC || defined(EXT_LSI)
  	if (xc->xp_flags & XP_RH70)
  		xpaddr->hpbae = bp->b_xmem;
- #endif
  	xpaddr->hpwc = -(bp->b_bcount >> 1);
  
  	/*
--- 431,438 ----
***************
*** 596,604 ****
  	int	ocmd;
  	int	cn, tn, sn;
  	daddr_t	bn;
- #ifdef	UNIBUS_MAP
  	struct	ubmap *ubp;
- #endif
  	int	unit;
  
  	/*
--- 588,594 ----
***************
*** 639,645 ****
  	 */
  	while (byte < bp->b_bcount && wrong != 0) {
  		addr = bb + byte;
- #ifdef	UNIBUS_MAP
  		if (bp->b_flags & (B_MAP|B_UBAREMAP)) {
  			/*
  			 * Simulate UNIBUS map if UNIBUS transfer.
--- 629,634 ----
***************
*** 647,653 ****
  			ubp = UBMAP + ((addr >> 13) & 037);
  			addr = exadr(ubp->ub_hi, ubp->ub_lo) + (addr & 017777);
  		}
- #endif
  		putmemc(addr, getmemc(addr) ^ (int) wrong);
  		byte++;
  		wrong >>= 8;
--- 636,641 ----
***************
*** 682,691 ****
  	xpaddr->hpda = (tn << 8) + sn;
  	xpaddr->hpwc = ((int)(ndone - bp->b_bcount)) / NBPW;
  	xpaddr->hpba = (int) addr;
- #if	PDP11 == 70 || PDP11 == GENERIC || defined(EXT_LSI)
  	if (xd->xp_ctlr->xp_flags & XP_RH70)
  		xpaddr->hpbae = (int) (addr >> 16);
- #endif
  	xpaddr->hpcs1.w = ocmd;
  	return (1);
  }
--- 670,677 ----
***************
*** 695,709 ****
  /*
   *  Dump routine.
   *  Dumps from dumplo to end of memory/end of disk section for minor(dev).
-  *  It uses the UNIBUS map to dump all of memory if there is a UNIBUS map
-  *  and this isn't an RH70.  This depends on UNIBUS_MAP being defined.
   */
  
! #ifdef	UNIBUS_MAP
! #define	DBSIZE	(UBPAGE/PGSIZE)		/* unit of transfer, one UBPAGE */
! #else
! #define DBSIZE	16			/* unit of transfer, same number */
! #endif
  
  xpdump(dev)
  dev_t dev;
--- 681,689 ----
  /*
   *  Dump routine.
   *  Dumps from dumplo to end of memory/end of disk section for minor(dev).
   */
  
! #define DBSIZE	16			/* number of blocks to write */
  
  xpdump(dev)
  dev_t dev;
***************
*** 714,723 ****
  	daddr_t	bn, dumpsize;
  	long	paddr;
  	int	sn, count;
- #ifdef	UNIBUS_MAP
  	extern	bool_t ubmap;
  	struct ubmap *ubp;
- #endif
  
  	if ((bdevsw[major(dev)].d_strategy != xpstrategy)	/* paranoia */
  	    || ((dev=minor(dev)) > (NXP << 3)))
--- 694,701 ----
***************
*** 740,748 ****
  	}
  	if ((xpaddr->hpds & (HPDS_DPR | HPDS_MOL)) != (HPDS_DPR | HPDS_MOL))
  		return(EFAULT);
- #ifdef	UNIBUS_MAP
  	ubp = &UBMAP[0];
- #endif
  	for (paddr = 0L; dumpsize > 0; dumpsize -= count) {
  		count = dumpsize>DBSIZE? DBSIZE: dumpsize;
  		bn = dumplo + (paddr >> PGSHIFT);
--- 718,724 ----
***************
*** 751,761 ****
  		sn = bn % xd->xp_nspc;
  		xpaddr->hpda = ((sn / xd->xp_nsect) << 8) | (sn % xd->xp_nsect);
  		xpaddr->hpwc = -(count << (PGSHIFT - 1));
- #ifdef	UNIBUS_MAP
- 		/*
- 		 *  If UNIBUS_MAP exists, use
- 		 *  the map, unless on an 11/70 with RH70.
- 		 */
  		if (ubmap && ((xd->xp_ctlr->xp_flags & XP_RH70) == 0)) {
  			ubp->ub_lo = loint(paddr);
  			ubp->ub_hi = hiint(paddr);
--- 727,732 ----
***************
*** 763,778 ****
  			xpaddr->hpcs1.w = HP_WCOM | HP_GO;
  		}
  		else
- #endif
  			{
  			/*
  			 *  Non-UNIBUS map, or 11/70 RH70 (MASSBUS)
  			 */
  			xpaddr->hpba = loint(paddr);
- #if	PDP11 == 70 || PDP11 == GENERIC || defined(EXT_LSI)
  			if (xd->xp_ctlr->xp_flags & XP_RH70)
  				xpaddr->hpbae = hiint(paddr);
- #endif
  			xpaddr->hpcs1.w = HP_WCOM | HP_GO | ((paddr >> 8) & (03 << 8));
  		}
  		while (xpaddr->hpcs1.w & HP_GO)
--- 734,746 ----
*** /usr/src/sys/OTHERS/fuji_160/ioconf.c.old	Wed May 27 22:12:17 1987
--- /usr/src/sys/OTHERS/fuji_160/ioconf.c	Thu Dec 24 00:58:51 1992
***************
*** 12,19 ****
  dev_t	rootdev	= makedev(6,0);
  dev_t	swapdev	= makedev(6,1);
  dev_t	pipedev = makedev(6,0);
! daddr_t	swplo	= (daddr_t) 0;
! int	nswap	= 9600;
  
  #ifdef	UCB_AUTOBOOT
  /*
--- 12,18 ----
  dev_t	rootdev	= makedev(6,0);
  dev_t	swapdev	= makedev(6,1);
  dev_t	pipedev = makedev(6,0);
! int	nswap;
  
  #ifdef	UCB_AUTOBOOT
  /*
*** /usr/src/sys/OTHERS/ht/ht.c.old	Sun Sep 22 09:11:41 1991
--- /usr/src/sys/OTHERS/ht/ht.c	Sat Jan  2 23:50:56 1993
***************
*** 3,9 ****
   */
  
  /*
!  *	SCCS id	@(#)ht.c	2.1 (Berkeley)	8/5/83
   *	Eric Haag's Driver
   *	I received this from Eric when I first got 2.9 up
   *	(Oct 84) and have recently sent it to Steve Malone
--- 3,9 ----
   */
  
  /*
!  *	SCCS id	@(#)ht.c	2.2 (2.11BSD GTE) 1/2/93
   *	Eric Haag's Driver
   *	I received this from Eric when I first got 2.9 up
   *	(Oct 84) and have recently sent it to Steve Malone
***************
*** 64,73 ****
  		return(0);
  	if ((addr != (struct htdevice *) NULL) && (fioword(addr) != -1)) {
  		HTADDR = addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if (fioword(&(addr->htbae)) != -1)
  			httab.b_flags |= B_RH70;
- #endif
  		return(1);
  	}
  	HTADDR = (struct hpdevice *) NULL;
--- 64,71 ----
***************
*** 187,196 ****
  	}
  
  	if(bp != &chtbuf) {
- #ifdef	UNIBUS_MAP
  		if ((httab.b_flags & B_RH70) == 0)
  			mapalloc(bp);
- #endif
  		p = &sc->sc_nxrec;
  		if(dbtofsb(bp->b_blkno) > *p) {
  			bp->b_flags |= B_ERROR;
--- 185,192 ----
***************
*** 267,276 ****
  	if (blkno == dbtofsb(bp->b_blkno)) {
  		httab.b_active = SIO;
  		HTADDR->htba = bp->b_un.b_addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if(httab.b_flags & B_RH70)
  			HTADDR->htbae = bp->b_xmem;
- #endif
  		HTADDR->htfc = -bp->b_bcount;
  		HTADDR->htwc = -(bp->b_bcount >> 1);
  		den = ((bp->b_xmem & 3) << 8) | HT_IE | HT_GO;
--- 263,270 ----
*** /usr/src/sys/OTHERS/ml11/ml.c.old	Sun Sep 22 08:51:45 1991
--- /usr/src/sys/OTHERS/ml11/ml.c	Sat Jan  2 23:53:01 1993
***************
*** 12,18 ****
   */
  
  /*
!  *	SCCS id	@(#)ml.c	2.1 (Berkeley)	8/5/83
   */
  
  #include "ml.h"
--- 12,18 ----
   */
  
  /*
!  *	SCCS id	@(#)ml.c	2.2 (2.11BSD GTE) 1/2/93
   */
  
  #include "ml.h"
***************
*** 62,71 ****
  			if (MLADDR->mlmr & 02000)
  				ml_sizes[unit] <<= 2;
  		}
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if (fioword (&(MLADDR->mlbae)) != -1)
  			mltab.b_flags |= B_RH70;
- #endif
  	}
  }
  
--- 62,69 ----
***************
*** 81,90 ****
  	unit = minor(bp->b_dev) & 07;
  	if (!ml_alive || unit >= NML)
  		goto bad;
- #ifdef	UNIBUS_MAP
  	if ((bp->b_flags & B_PHYS) && ((mltab.b_flags & B_RH70) == 0))
  		mapalloc(bp);
- #endif
  
  	(void) _spl5();
  	if ((MLADDR->mldt & 0377) != ML11)
--- 79,86 ----
***************
*** 150,159 ****
  	}
  	MLADDR->mlda = bp->b_blkno;
  	MLADDR->mlba = bp->b_un.b_addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (mltab.b_flags & B_RH70)
  		MLADDR->mlbae = bp->b_xmem;
- #endif
  	MLADDR->mlwc = -(bp->b_bcount >> 1);
  	com = ((bp->b_xmem & 3) << 8) | ML_IE | ML_GO;
  	if (bp->b_flags & B_READ)
--- 146,153 ----
*** /usr/src/sys/OTHERS/rf11/rf.c.old	Sun Sep 22 08:51:22 1991
--- /usr/src/sys/OTHERS/rf11/rf.c	Sat Jan  2 23:53:43 1993
***************
*** 1,5 ****
  /*
!  *	SCCS id	@(#)rf.c	2.1 (Berkeley)	8/5/83
   */
  
  #include "rf.h"
--- 1,5 ----
  /*
!  *	SCCS id	@(#)rf.c	2.2 (2.11BSD GTE) 1/2/93
   */
  
  #include "rf.h"
***************
*** 40,48 ****
  		iodone(bp);
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	mapalloc(bp);
- #endif
  	bp->av_forw = (struct buf *) NULL;
  	(void) _spl5();
  	if (rftab.b_actf == NULL)
--- 40,46 ----
*** /usr/src/sys/OTHERS/rm02.03.05/rm.c.old	Sun Sep 22 09:12:15 1991
--- /usr/src/sys/OTHERS/rm02.03.05/rm.c	Sat Jan  2 23:49:55 1993
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)rm.c	1.1 (2.10BSD Berkeley) 12/1/86
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)rm.c	1.2 (2.11BSD GTE) 1/2/93
   */
  
  /*
***************
*** 100,109 ****
  		return(0);
  	if ((addr != (struct hpdevice *) NULL) && (fioword(addr) != -1)) {
  		RMADDR = addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if (fioword(&(addr->hpbae)) != -1)
  			rmtab.b_flags |= B_RH70;
- #endif
  		return(1);
  	}
  	RMADDR = (struct hpdevice *) NULL;
--- 100,107 ----
***************
*** 131,140 ****
  		iodone(bp);
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	if ((rmtab.b_flags & B_RH70) == 0)
  		mapalloc(bp);
- #endif
  	bp->b_cylin = bn / (RM_NSECT * RM_NTRAC) + rm_sizes[unit & 07].cyloff;
  	unit = dkunit(bp);
  #if	NRM > 1
--- 129,136 ----
***************
*** 210,219 ****
  		bbp->b_blkno = (daddr_t)RM_NCYL * (RM_NSECT*RM_NTRAC)
  		    - RM_NSECT;
  		bbp->b_cylin = RM_NCYL - 1;
- #ifdef	UNIBUS_MAP
  		if ((rmtab.b_flags & B_RH70) == 0)
  			mapalloc(bbp);
- #endif	UNIBUS_MAP
  		dp->b_actf = bbp;
  		bbp->av_forw = bp;
  		bp = bbp;
--- 206,213 ----
***************
*** 333,342 ****
  		bbp->b_blkno = (daddr_t)RM_NCYL * (RM_NSECT*RM_NTRAC)
  		    - RM_NSECT;
  		bbp->b_cylin = RM_NCYL - 1;
- #ifdef	UNIBUS_MAP
  		if ((rmtab.b_flags & B_RH70) == 0)
  			mapalloc(bbp);
- #endif	UNIBUS_MAP
  		dp->b_actf = bbp;
  		bbp->av_forw = bp;
  		bp = bbp;
--- 327,334 ----
***************
*** 368,377 ****
  	rmaddr->hpdc = cn;
  	rmaddr->hpda = (tn << 8) + sn;
  	rmaddr->hpba = bp->b_un.b_addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (rmtab.b_flags & B_RH70)
  		rmaddr->hpbae = bp->b_xmem;
- #endif
  	rmaddr->hpwc = -(bp->b_bcount >> 1);
  	/*
  	 * Warning:  unit is being used as a temporary.
--- 360,367 ----
***************
*** 546,554 ****
  	int	ocmd;
  	int	cn, tn, sn;
  	daddr_t	bn;
- #ifdef	UNIBUS_MAP
  	struct	ubmap *ubp;
- #endif
  	int	unit;
  
  	/*
--- 536,542 ----
***************
*** 608,614 ****
  		 */
  		while (byte < bp->b_bcount && wrong != 0) {
  			addr = bb + byte;
- #ifdef	UNIBUS_MAP
  			if (bp->b_flags & (B_MAP|B_UBAREMAP)) {
  				/*
  				 * Simulate UNIBUS map if UNIBUS transfer.
--- 596,601 ----
***************
*** 617,623 ****
  				addr = exadr(ubp->ub_hi, ubp->ub_lo)
  				    + (addr & 017777);
  			}
- #endif
  			putmemc(addr, getmemc(addr) ^ (int) wrong);
  			byte++;
  			wrong >>= 8;
--- 604,609 ----
***************
*** 667,676 ****
  	rmaddr->hpda = (tn << 8) + sn;
  	rmaddr->hpwc = wc;
  	rmaddr->hpba = (caddr_t)addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (rmtab.b_flags & B_RH70)
  		rmaddr->hpbae = (short)(addr >> 16);
- #endif
  	rmaddr->hpcs1.w = ocmd;
  	return (1);
  }
--- 653,660 ----
***************
*** 679,694 ****
  /*
   *  Dump routine for RM02/RM03.
   *  Dumps from dumplo to end of memory/end of disk section for minor(dev).
-  *  It uses the UNIBUS map to dump all of memory if there is a UNIBUS map
-  *  and this isn't an RM03.  This depends on UNIBUS_MAP being defined.
-  *  If there is no UNIBUS map, it will work with any definitions.
   */
  
! #ifdef	UNIBUS_MAP
! #define	DBSIZE	(UBPAGE/NBPG)		/* unit of transfer, one UBPAGE */
! #else
! #define DBSIZE	16			/* unit of transfer, same number */
! #endif
  
  rmdump(dev)
  dev_t	dev;
--- 663,671 ----
  /*
   *  Dump routine for RM02/RM03.
   *  Dumps from dumplo to end of memory/end of disk section for minor(dev).
   */
  
! #define DBSIZE	16			/* number of blocks to write */
  
  rmdump(dev)
  dev_t	dev;
***************
*** 698,706 ****
  	long	paddr;
  	register sn;
  	register count;
- #ifdef	UNIBUS_MAP
  	register struct ubmap *ubp;
- #endif
  
  	if ((bdevsw[major(dev)].d_strategy != rmstrategy)	/* paranoia */
  	    || ((dev=minor(dev)) > (NRM << 3)))
--- 675,681 ----
***************
*** 719,727 ****
  	if ((rmaddr->hpds & (HPDS_DPR | HPDS_MOL)) != (HPDS_DPR | HPDS_MOL))
  		return(EFAULT);
  	dev &= 07;
- #ifdef	UNIBUS_MAP
  	ubp = &UBMAP[0];
- #endif
  	for (paddr = 0L; dumpsize > 0; dumpsize -= count) {
  		count = dumpsize>DBSIZE? DBSIZE: dumpsize;
  		bn = dumplo + (paddr >> PGSHIFT);
--- 694,700 ----
***************
*** 729,739 ****
  		sn = bn % (RM_NSECT * RM_NTRAC);
  		rmaddr->hpda = ((sn / RM_NSECT) << 8) | (sn % RM_NSECT);
  		rmaddr->hpwc = -(count << (PGSHIFT - 1));
- 		/*
- 		 *  If UNIBUS_MAP exists, use
- 		 *  the map, unless on an 11/70 with RM03.
- 		 */
- #ifdef	UNIBUS_MAP
  		if (ubmap && ((rmtab.b_flags & B_RH70) == 0)) {
  			ubp->ub_lo = loint(paddr);
  			ubp->ub_hi = hiint(paddr);
--- 702,707 ----
***************
*** 741,756 ****
  			rmaddr->hpcs1.w = HP_WCOM | HP_GO;
  		}
  		else
- #endif
  			{
  			/*
  			 *  Non-UNIBUS map, or 11/70 RM03 (MASSBUS)
  			 */
  			rmaddr->hpba = loint(paddr);
- #if	PDP11 == 70 || PDP11 == GENERIC
  			if (rmtab.b_flags & B_RH70)
  				rmaddr->hpbae = hiint(paddr);
- #endif
  			rmaddr->hpcs1.w = HP_WCOM | HP_GO | ((paddr >> 8) & (03 << 8));
  		}
  		while (rmaddr->hpcs1.w & HP_GO)
--- 709,721 ----
*** /usr/src/sys/OTHERS/rp03/rp.c.old	Sun Sep 22 08:50:08 1991
--- /usr/src/sys/OTHERS/rp03/rp.c	Sat Jan  2 23:56:05 1993
***************
*** 1,5 ****
  /*
!  *	SCCS id	@(#)rp.c	2.1 (Berkeley)	8/31/83
   */
  
  /*
--- 1,5 ----
  /*
!  *	SCCS id	@(#)rp.c	2.2 (2.11BSD GTE) 1/2/93
   */
  
  /*
***************
*** 94,102 ****
  		iodone(bp);
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	mapalloc(bp);
- #endif
  	bp->av_forw = NULL;
  	unit >>= 3;
  	(void) _spl5();
--- 94,100 ----
*** /usr/src/sys/OTHERS/rp04.06/hp.c.old	Sun Sep 22 09:14:06 1991
--- /usr/src/sys/OTHERS/rp04.06/hp.c	Sat Jan  2 23:46:20 1993
***************
*** 97,106 ****
  		return(0);
  	if ((addr != (struct hpdevice *) NULL) && (fioword(addr) != -1)) {
  		HPADDR = addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if (fioword(&(addr->hpbae)) != -1)
  			hptab.b_flags |= B_RH70;
- #endif
  		return(1);
  	}
  	HPADDR = (struct hpdevice *) NULL;
--- 97,104 ----
***************
*** 128,137 ****
  		iodone(bp);
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	if ((hptab.b_flags & B_RH70) == 0)
  		mapalloc(bp);
- #endif
  	bp->b_cylin = bn / (HP_NSECT * HP_NTRAC) + hp_sizes[unit & 07].cyloff;
  	unit = dkunit(bp);
  	dp = &hputab[unit];
--- 126,133 ----
***************
*** 211,220 ****
  		bbp->b_blkno = (daddr_t)HP_NCYL * (HP_NSECT*HP_NTRAC)
  		    - HP_NSECT;
  		bbp->b_cylin = HP_NCYL - 1;
- #ifdef	UNIBUS_MAP
  		if ((hptab.b_flags & B_RH70) == 0)
  			mapalloc(bbp);
- #endif	UNIBUS_MAP
  		dp->b_actf = bbp;
  		bbp->av_forw = bp;
  		bp = bbp;
--- 207,214 ----
***************
*** 332,341 ****
  	hpaddr->hpdc = cn;
  	hpaddr->hpda = (tn << 8) + sn;
  	hpaddr->hpba = bp->b_un.b_addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (hptab.b_flags & B_RH70)
  		hpaddr->hpbae = bp->b_xmem;
- #endif
  	hpaddr->hpwc = -(bp->b_bcount >> 1);
  	/*
  	 * Warning:  unit is being used as a temporary.
--- 326,333 ----
***************
*** 505,513 ****
  	int	ocmd;
  	int	cn, tn, sn;
  	daddr_t	bn;
- #ifdef	UNIBUS_MAP
  	struct	ubmap *ubp;
- #endif
  	int	unit;
  
  	/*
--- 497,503 ----
***************
*** 567,573 ****
  		 */
  		while (byte < bp->b_bcount && wrong != 0) {
  			addr = bb + byte;
- #ifdef	UNIBUS_MAP
  			if (bp->b_flags & (B_MAP|B_UBAREMAP)) {
  				/*
  				 * Simulate UNIBUS map if UNIBUS transfer.
--- 557,562 ----
***************
*** 576,582 ****
  				addr = exadr(ubp->ub_hi, ubp->ub_lo)
  				    + (addr & 017777);
  			}
- #endif
  			putmemc(addr, getmemc(addr) ^ (int) wrong);
  			byte++;
  			wrong >>= 8;
--- 565,570 ----
***************
*** 633,642 ****
  	hpaddr->hpda = (tn << 8) + sn;
  	hpaddr->hpwc = wc;
  	hpaddr->hpba = (caddr_t)addr;
- #if PDP11 == 70 || PDP11 == GENERIC
  	if (hptab.b_flags & B_RH70)
  		hpaddr->hpbae = (int) (addr >> 16);
- #endif
  	hpaddr->hpcs1.w = ocmd;
  	return (1);
  }
--- 621,628 ----
***************
*** 646,658 ****
   *  Dump routine for RP04/05/06.
   *  Dumps from dumplo to end of memory/end of disk section for minor(dev).
   *  It uses the UNIBUS map to dump all of memory if there is a UNIBUS map
!  *  and this isn't an RH70.  This depends on UNIBUS_MAP being defined.
   */
! #ifdef UNIBUS_MAP
! #define	DBSIZE	(UBPAGE/NBPG)		/* unit of transfer, one UBPAGE */
! #else !UNIBUS_MAP
! #define DBSIZE	16			/* unit of transfer, same number */
! #endif UNIBUS_MAP
  
  hpdump(dev)
  dev_t	dev;
--- 632,640 ----
   *  Dump routine for RP04/05/06.
   *  Dumps from dumplo to end of memory/end of disk section for minor(dev).
   *  It uses the UNIBUS map to dump all of memory if there is a UNIBUS map
!  *  and this isn't an RH70.
   */
! #define DBSIZE	16			/* number of blocks to write */
  
  hpdump(dev)
  dev_t	dev;
***************
*** 664,672 ****
  	register count;
  	long mem;
  	extern size_t physmem;	/* number of clicks of real memory */
- #ifdef UNIBUS_MAP
  	register struct ubmap *ubp;
- #endif UNIBUS_MAP
  
  	mem = ((long)physmem) * ctob(1);	/* real memory in bytes */
  	if ((bdevsw[major(dev)].d_strategy != hpstrategy)	/* paranoia */
--- 646,652 ----
***************
*** 686,694 ****
  	if ((hpaddr->hpds & (HPDS_DPR | HPDS_MOL)) != (HPDS_DPR | HPDS_MOL))
  		return(EFAULT);
  	dev &= 07;
- #ifdef UNIBUS_MAP
  	ubp = &UBMAP[0];
- #endif UNIBUS_MAP
  	for (paddr = 0L; dumpsize > 0; dumpsize -= count) {
  		count = dumpsize>DBSIZE? DBSIZE: dumpsize;
  		bn = dumplo + (paddr >> PGSHIFT);
--- 666,672 ----
***************
*** 696,704 ****
  		sn = bn % (HP_NSECT * HP_NTRAC);
  		hpaddr->hpda = ((sn / HP_NSECT) << 8) | (sn % HP_NSECT);
  		hpaddr->hpwc = -(count << (PGSHIFT - 1));
- #ifdef UNIBUS_MAP
  		/*
! 		 *  If UNIBUS_MAP exists, use
  		 *  the map, unless on an 11/70 with RH70.
  		 */
  		if (ubmap && ((hptab.b_flags & B_RH70) == 0)) {
--- 674,681 ----
  		sn = bn % (HP_NSECT * HP_NTRAC);
  		hpaddr->hpda = ((sn / HP_NSECT) << 8) | (sn % HP_NSECT);
  		hpaddr->hpwc = -(count << (PGSHIFT - 1));
  		/*
! 		 *  If map exists, use
  		 *  the map, unless on an 11/70 with RH70.
  		 */
  		if (ubmap && ((hptab.b_flags & B_RH70) == 0)) {
***************
*** 708,723 ****
  			hpaddr->hpcs1.w = HP_WCOM | HP_GO;
  		}
  		else
- #endif UNIBUS_MAP
  			{
  			/*
  			 *  Non-UNIBUS map, or 11/70 RH70 (MASSBUS)
  			 */
  			hpaddr->hpba = loint(paddr);
- #if PDP11 == 44 || PDP11 == 70 || PDP11 == GENERIC
  			if (hptab.b_flags & B_RH70)
  				hpaddr->hpbae = hiint(paddr);
- #endif
  			hpaddr->hpcs1.w = HP_WCOM | HP_GO | ((paddr >> 8) & (03 << 8));
  		}
  		while (hpaddr->hpcs1.w & HP_GO)
--- 685,697 ----
*** /usr/src/sys/OTHERS/rs03.04/hs.c.old	Sun Sep 22 08:47:54 1991
--- /usr/src/sys/OTHERS/rs03.04/hs.c	Sat Jan  2 23:59:41 1993
***************
*** 1,5 ****
  /*
!  *	SCCS id	@(#)hs.c	2.1	8/5/83
   */
  
  /*
--- 1,5 ----
  /*
!  *	SCCS id	@(#)hs.c	2.2	1/3/93
   */
  
  /*
***************
*** 49,58 ****
  		return(0);
  	if (fioword(addr) != -1) {
  		HSADDR = addr;
- #if	PDP11 == 70 || PDP11 == GENERIC
  		if (fioword(&(addr->hsbae)) != -1)
  			hstab.b_flags |= B_RH70;
- #endif
  		return(1);
  	}
  	HSADDR = (struct hsdevice *) NULL;
--- 49,56 ----
***************
*** 80,89 ****
  		return;
  	}
  
- #ifdef	UNIBUS_MAP
  	if ((hstab.b_flags & B_RH70) == 0)
  		mapalloc(bp);
- #endif	UNIBUS_MAP
  	bp->av_forw = 0;
  	s = spl5();
  	if (hstab.b_actf == 0)
--- 78,85 ----
***************
*** 110,119 ****
  		com_addr <<= 1; /* RJS03 */
  	hsaddr->hscs2 = minor(bp->b_dev) & 07;
  	hsaddr->hsda = com_addr << 1;
- #if	PDP11 == 70 || PDP11 == GENERIC
  	if (hstab.b_flags & B_RH70)
  		hsaddr->hsbae = bp->b_xmem;
- #endif
  	hsaddr->hsba = bp->b_un.b_addr;
  	hsaddr->hswc = -(bp->b_bcount >> 1);
  	com_addr = HS_IE | HS_GO | ((bp->b_xmem & 03) << 8);
--- 106,113 ----
*** /usr/src/sys/OTHERS/rx01/rx.c.old	Sun Sep 22 09:16:16 1991
--- /usr/src/sys/OTHERS/rx01/rx.c	Sat Jan  2 23:42:34 1993
***************
*** 2,8 ****
--- 2,10 ----
   * Rx disk driver
   */
  
+ #ifdef	never
  static	char	SCCS_ID[]	= "@(#)rx.c	Ver. 1.2 6/83";
+ #endif
  
  /*	This was taken and adapted from V7 unix
   *	The baroque ifdefs were to identify changes
***************
*** 79,88 ****
  	ctlr = minor (bp->b_dev) >> RXCTLR;
  	dp = &rxutab[ctlr];
  
- #ifdef	UNIBUS_MAP
  	if(bp->b_flags & B_PHYS)
  		mapalloc(bp);
- #endif
  	/* link buffer into i/o queue and start i/o */
  	bp->b_resid = bp->b_bcount;
  	bp->b_error = 0;
--- 81,88 ----
***************
*** 110,118 ****
  	char *ptr;
  	long blk, lptr;
  	int trk, sct, wd;
- #ifdef	UNIBUS_MAP
  	struct	ubmap *ubp;
- #endif
  
  	dp = &rxutab[ctlr];
  	rp = rx_addr[ctlr];
--- 110,116 ----
***************
*** 125,131 ****
  		/* output characters to buffer */
  		rp->rxcs = FILL|GO;
  		lptr = exadr(bp->b_xmem, bp->b_un.b_addr);
- #ifdef	UNIBUS_MAP
  		if(bp->b_flags & (B_MAP|B_UBAREMAP)) {
  			/*
  			 * Simulate UNIBUS map if UNIBUS transfer
--- 123,128 ----
***************
*** 134,140 ****
  			ubp = UBMAP + ((lptr >> 13) & 037);
  			lptr = exadr(ubp->ub_hi, ubp->ub_lo) + (lptr & 017777);
  		}
- #endif	UNIBUS_MAP
  		lptr += (long) (bp->b_bcount - bp->b_resid);
  		for (bx = 0; bx < NRXBYTE; bx += 1) {
  			wd = (bp->b_resid > bx) ? getmemc(lptr) : 0;
--- 131,136 ----
***************
*** 262,270 ****
  	char *ptr, byte;
  	long lptr;
  	int wd;
- #ifdef	UNIBUS_MAP
  	struct	ubmap *ubp;
- #endif
  
  	dp = &rxutab[ctlr];
  	if (!dp->b_active) {
--- 258,264 ----
***************
*** 280,286 ****
  		/* input data from buffer */
  		rp->rxcs = EMPTY|GO;
  		lptr = exadr(bp->b_xmem, bp->b_un.b_addr);
- #ifdef	UNIBUS_MAP
  		if(bp->b_flags & (B_MAP|B_UBAREMAP)) {
  			/*
  			 * Simulate UNIBUS map if UNIBUS transfer
--- 274,279 ----
***************
*** 289,295 ****
  			ubp = UBMAP + ((lptr >> 13) & 037);
  			lptr = exadr(ubp->ub_hi, ubp->ub_lo) + (lptr & 017777);
  		}
- #endif	UNIBUS_MAP
  		lptr += (long) (bp->b_bcount - bp->b_resid);
  		for (bx = 0; bx < NRXBYTE; bx += 1) {
  			getdb(byte);
--- 282,287 ----
*** /usr/src/sys/OTHERS/rx02/#1/rx2.c.old	Sun Sep 22 08:51:04 1991
--- /usr/src/sys/OTHERS/rx02/#1/rx2.c	Sat Jan  2 23:54:13 1993
***************
*** 39,53 ****
   *	the following defines use some fundamental
   *	constants of the RX02.
   */
- #if	UCB_NKB == 1
  #define	NSPB	((minor(bp->b_dev)&2) ? 4 : 8)		/* sectors per block */
  #define	NRXBLKS	((minor(bp->b_dev)&2) ? 500 : 250)	/* blocks on device */
- #else
- #ifndef	UCB_NKB
- #define	NSPB	((minor(bp->b_dev)&2) ? 2 : 4)		/* sectors per block */
- #define	NRXBLKS	((minor(bp->b_dev)&2) ? 1001 : 500)	/* blocks on device */
- #endif
- #endif	UCB_NKB
  #define	NBPS	((minor(bp->b_dev)&2) ? 256 : 128)	/* bytes per sector */
  #define	DENSITY	(minor(bp->b_dev)&2)	/* Density: 0 = single, 2 = double */
  #define	UNIT	(minor(bp->b_dev)&1)	/* Unit Number: 0 = left, 1 = right */
--- 39,46 ----
***************
*** 82,91 ****
  rx2strategy(bp)
  register struct buf *bp;
  {
- #ifdef	UNIBUS_MAP
  	if(bp->b_flags & B_PHYS)
  		mapalloc(bp);
- #endif
  	if(bp->b_blkno >= NRXBLKS) {
  		if(bp->b_flags&B_READ)
  			bp->b_resid = bp->b_bcount;
--- 75,82 ----
*** /usr/src/sys/OTHERS/rx02/#2/rx.c.old	Sun Sep 22 08:50:38 1991
--- /usr/src/sys/OTHERS/rx02/#2/rx.c	Sat Jan  2 23:55:05 1993
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)rx.c	1.1 (2.10BSD Berkeley) 12/1/86
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)rx.c	1.2 (2.11BSD GTE) 1/2/93
   */
  
  /*
***************
*** 91,99 ****
  
  	if (minor(bp->b_dev) >= 4 || !RXADDR)
  		goto bad;
- #ifdef UNIBUS_MAP
  	mapalloc(bp);
- #endif
  	if (bp->b_blkno >= NRXBLKS) {
  		if (bp->b_flags&B_READ)
  			bp->b_resid = bp->b_bcount;
--- 91,97 ----
*** /usr/src/sys/OTHERS/versatec/vp.c.old	Sun Sep 22 09:13:23 1991
--- /usr/src/sys/OTHERS/versatec/vp.c	Sat Jan  2 23:47:50 1993
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)vp.c	1.1 (2.10BSD Berkeley) 12/1/86
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)vp.c	1.2 (2.11BSD GTE) 1/2/93
   */
  
  /*
***************
*** 292,300 ****
  		bp->b_flags |= B_DONE;	/* fake it */
  		return;
  	}
- #ifdef	UNIBUS_MAP
  	mapalloc(bp);
- #endif
  	vpp->addr = (short)(bp->b_un.b_addr);
  	vpp->addrext = (bp->b_xmem & 03) << 4;
  #ifndef	VP_TWOSCOMPL
--- 292,298 ----
