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

Description:
	This is part 5 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/conf/GENERIC
/usr/src/sys/conf/Make.net
/usr/src/sys/conf/Make.nsunix
/usr/src/sys/conf/Make.sunix
/usr/src/sys/conf/Make.unix
/usr/src/sys/conf/README
/usr/src/sys/conf/checksys.c
/usr/src/sys/conf/config
/usr/src/sys/conf/ioconf.c
/usr/src/sys/conf/param.c

	The biggest change is to the GENERIC config file.  MANY changes
	have been made, some options have been removed because they were
	made standard, other options have been deleted due to obsolescence,
	still other options were removed because the feature didn't work
	or was replaced.

	You should save existing kernel configuration files, make a new
	copy of GENERIC and edit it.

	The 'config' script no longer complains about the directory
	already existing if you run 'config' for an existing kernel.  
	Instead the existing 'Makefile' is saved (because the overlay
	structure will likely need to be referred to) to 'Makefile.old'.

	NOTE:  there are references to 'if_qt.c' in a couple of the Make.*
	       files.  This is a new ethernet driver which is not functional
	       yet - it is being worked on.  For the present do not select
	       "NQT" when configuring a networking system.

*** /usr/src/sys/conf/GENERIC.old	Thu Nov 19 21:06:31 1992
--- /usr/src/sys/conf/GENERIC	Sun Jan  3 13:45:32 1993
***************
*** 12,93 ****
  #########################################
  
  # Machine type
! # 2.11 runs on:
! #	11/44/53/70/73/83/84/93/94 with 22 bit addressing
! # 2.11 WILL NOT run on:
! #	T11, 11/03/04/05/10/15/20/21/23/24/34/35/40/45/50/55
! #	(45/50/55 because of max memory contraints, the others
! #	 because the MMUs do not have split I/D and/or supervisor)
! # Any QBUS machine using an ABLE Microverter should be treated as
! # if it were an 11/70.
! #
! # You should also make a point of having both floating point hardware and
! # at least a megabyte of memory, if possible.  They aren't that expensive,
! # and they make a big difference.
! #
! # Including UNIBUS map support for machines without a UNIBUS will not cause
! # a kernel to die.  It simply includes code to support UNIBUS mapping if
! # present.
  
! # The define UNIBUS_MAP implements kernel support for UNIBUS mapped
! # machines.  However, a kernel compiled with UNIBUS_MAP does *not* have to
! # be run on a UNIBUS machine.  The define simply includes support for UNIBUS
! # mapping if the kernel finds itself on a machine with UNIBUS mapping.
! UNIBUS_MAP	YES			# include support for UNIBUS mapping
! 					# always: 11/44/70/84
! 					# sometimes: 11/24
! 					# never: 11/23/34/35/40/45/50/53/
! 					#	55/60/73/83
  
- # The define Q22 states that the configured system is a 22-bit Q-BUS machine
- # (if UNIBUS mapping isn't found) and no 18-bit DMA disk or tape devices
- # exist.  If Q22 is defined and an 18-bit DMA disk or tape does exist, reads
- # and writes to the raw devices will cause DMA transfers to and from user
- # space which might be above 18-bits (256K) which would cause random
- # sections of memory (probably the kernel) to be overwritten (for reads).
- # An 18-bit DH isn't a problem since it never does DMA to user space and
- # clists (even with UCB_CLIST defined) are never above 18-bits.
- #
- # Note, the Q22 define is only effective if the kernel finds itself on a
- # machine without UNIBUS mapping.  Note also that the presence of UNIBUS
- # mapping is only tested for if UNIBUS_MAP is defined.
- Q22		YES			# 22-bit Qbus with no 18-bit devices
- 					# always 11/53/73/83
- 					# sometimes: 11/23
- 					# never: 11/24/34/35/40/44/50/
- 					#	55/60/70/84
- 
- # Defining NONFP to NO compiles in support for hardware floating point.
- # However, this doesn't require that floating point hardware be present.
- # Defining NONFP to YES will save you a few hundred bytes of text.
- NONFP		NO			# if no floating point hardware
- 
- # Defining FPSIM to YES compiles a floating point simulator into the kernel
- # which will catch floating point instruction traps from user space.  Note
- # that defining FPSIM to YES will only cost you text space.  If you actually
- # have floating point hardware, the simulator just won't be used.  The floating
- # point simulator is automatically compiled in if PDP11 (below) is GENERIC.
- FPSIM		NO			# floating point simulator
- 
  #LINEHZ		50			# clock frequency European
  LINEHZ		60			# clock frequency USA
  
! # To enable profiling, the :splfix script must be changed to use spl6 instead
! # of spl7 (see conf/:splfix.profile), also, you have to have a machine with a
! # supervisor PAR/PDR pair, i.e. an 11/44/45/50/53/55/70/73/83/84, as well
! # as both a KW11-L and a KW11-P.
! #
! # Note that profiling is not currently working.  We don't have any plans on
! # fixing it, so this is essentially a non-supported feature.
! PROFILE		NO			# system profiling with KW11P clock
! 
! # PDP-11 machine type; allowable values are GENERIC, 23, 24, 34, 35, 40,
! # 44, 45, 50, 53, 55, 60, 70, 73, 83, 84.  GENERIC should only be used to
! # build a distribution kernel.
  PDP11		GENERIC			# distribution kernel
  #PDP11		44			# PDP-11/44
! #PDP11		70			# PDP-11/70
! #PDP11		73			# PDP-11/73
  
  #########################################
  # GENERAL SYSTEM PARAMETERS		#
--- 12,38 ----
  #########################################
  
  # Machine type
! # Split I/D and hardware floating point are required.
! # UNIBUS support is always included, it only cost 1kb of text space and
! # 94 bytes of D space for Qbus systems (obviously Unibus systems incur
! # no penalty).
  
! # The define Q22 has been removed.  The references to it were incorrect
! # (i.e. using it to distinguish between an Emulex CS02 and a DH11) or
! # inappropriate (the if_il.c driver should have been checking if a Unibus
! # Map was present at runtime).
  
  #LINEHZ		50			# clock frequency European
  LINEHZ		60			# clock frequency USA
  
! # PDP-11 machine type; allowable values are GENERIC, 44, 70, 73.  GENERIC 
! # should only be used to build a distribution kernel.  The only use of this
! # option is to select the proper in-line PS instructions (references to the
! # PSW use 'spl', 'mfps/mtps' or 'movb' instructions depending on the cpu type).
  PDP11		GENERIC			# distribution kernel
  #PDP11		44			# PDP-11/44
! #PDP11		70			# PDP-11/70,45,50,55
! #PDP11		73			# PDP-11/73,53,83,93,84,94
  
  #########################################
  # GENERAL SYSTEM PARAMETERS		#
***************
*** 129,135 ****
  PIPEDEV		makedev(10,0)		# makedev(10,0) xp0a
  ROOTDEV		makedev(10,0)		# makedev(10,0) xp0a
  SWAPDEV		makedev(10,1)		# makedev(10,1) xp0b
- SWAPLO		0			# swap start address, normally 0
  
  # DUMPROUTINE indicates which dump routine should be used.  DUMPDEV
  # should be in terms of makedev.  If DUMPDEV is NODEV no automatic
--- 74,79 ----
***************
*** 150,202 ****
  #DUMPROUTINE	xpdump			# xp driver dump routine
  #DUMPROUTINE	tmsdump			# tms driver dump routine
  
- # NSWAP should be set to the 512-byte block length of the swap device, e.g.
- # 9120 for an RM05 B partition.
- #NSWAP		9405			# dvhp?b or xp?b, DIVA COMP V
- #NSWAP		5940			# hk?a, RK611, RK06/07
- NSWAP		2376			# hk?b, RK611, RK06/07
- #NSWAP		12122			# br?b, Eaton BR1538 or BR1711
- #NSWAP		8779			# hp?b or xp?b, RP04/05/06
- #NSWAP		4800			# rm?b or xp?b, RM02/03
- #NSWAP		9120			# xp?b, RM05
- #NSWAP		17300			# rd?b, RD51/52/53
- #NSWAP		3100			# rd?c, RD51/52/53
- #NSWAP		10032			# ra?b, RC25
- #NSWAP		33440			# ra?b, RA60/80/81
- #NSWAP		16720			# ra?b, RD54, RA82
- #NSWAP		10240			# rl?, RL01
- #NSWAP		20480			# rl?, RL02
- 
  #########################################
  # KERNEL CONFIGURATION			#
  #########################################
  
  BADSECT		NO			# bad-sector forwarding
! CGL_RTP		NO			# allow one real time process
! EXTERNALITIMES	NO			# map out inode time values
  UCB_CLIST	NO			# clists moved from kernel data space
- UCB_FRCSWAP	NO			# force swap on expand/fork
- NOKA5		NO			# KA5 not used except for buffers
- 					# and clists (_end < 0120000);
  QUOTA		NO			# dynamic file system quotas
  					# NOTE -- *very* expensive
  
! # UCB_METER is fairly expensive.  Unless you really look at the statistics
! # that it produces, don't bother running with it on.  Suggested usage is
! # when you want to tune your system or you're curious about how effective
! # some algorithm, for example, the text coremap cacheing, is.  UCB_RUSAGE
! # isn't nearly as bad, and should probably be included, although it's not
! # necessary for anything.
  UCB_METER	NO			# vmstat performance metering
- UCB_RUSAGE	YES			# enable more rusage fields
  
- # If your system is *seriously* short of memory, and you're doing a lot of
- # thrashing, 2.10's implementation of vfork can hurt you.  Otherwise, run
- # with it on.  You do not have to recompile any applications when you change
- # it.  You should also get rid of any local code that uses VIRUS_VFORK to
- # decide whether to call fork or vfork, they should just call vfork.
- VIRUS_VFORK	YES			# include vfork system call
- 
  # NBUF is the size of the buffer cache, and is directly related to the UNIBUS
  # mapping registers.  There are 32 total mapping registers, of which 30 are
  # available.  The 0'th is used for CLISTS, and the 31st is used for the I/O
--- 94,113 ----
  #DUMPROUTINE	xpdump			# xp driver dump routine
  #DUMPROUTINE	tmsdump			# tms driver dump routine
  
  #########################################
  # KERNEL CONFIGURATION			#
  #########################################
  
  BADSECT		NO			# bad-sector forwarding
! EXTERNALITIMES	YES			# map out inode time values
  UCB_CLIST	NO			# clists moved from kernel data space
  QUOTA		NO			# dynamic file system quotas
  					# NOTE -- *very* expensive
  
! # UCB_METER is fairly expensive, but various programs (iostat, vmstat, etc)
! # use it.
  UCB_METER	NO			# vmstat performance metering
  
  # NBUF is the size of the buffer cache, and is directly related to the UNIBUS
  # mapping registers.  There are 32 total mapping registers, of which 30 are
  # available.  The 0'th is used for CLISTS, and the 31st is used for the I/O
***************
*** 206,283 ****
  # if you have a DR-11 and a TM-11, you would leave 14 unassigned for them and
  # allocate 16 to the buffer pool.  Since each mapping register addresses 8
  # buffers for a 1K file system, NBUF would be 128.  A possible exception would
! # be to reduce the buffers to save on data space, as they were 24 bytes per
! # header, last time I looked.
! # should be 'small' for GENERIC, so room for kernel + large program to run.
  NBUF		32			# buffer cache, *must* be <= 240
  
- # MAXMEM is the maximum core per process is allowed.  First number
- # is Kb.
- MAXMEM		(300*16)		# 300K max per process ...
- 
  # DIAGNOSTIC does various run-time checks, some of which are pretty
  # expensive and at a high priority.  Suggested use is when the kernel
  # is crashing and you don't know why, otherwise run with it off.
  DIAGNOSTIC	NO			# misc. diagnostic loops and checks
  
- # The following entries used to be part of the kernel configuration, and,
- # for various reasons, are no longer modifiable.  They are included here
- # for historical information ONLY.  If "YES", they are always included in
- # the kernel, if "NO", they are never included.
- 
- # ACCT			YES		# process accounting
- # DISPLAY		NO		# PDP-11/45/70 display routine
- # INSECURE		NO		# don't clear setuid/gid bits on write
- # INTRLVE		NO		# file system/disk interleaving
- # MENLO_JCL		YES		# job control
- # MENLO_KOV		YES		# kernel uses overlaid call sequence
- # MENLO_OVLY		YES		# support user process text overlays
- # MPX_FILS		NO		# hooks for multiplexed files
- # OLDTTY		YES		# old line discipline
- # RAND_XO		YES		# rand file exclusive open (flock(2))
- # SMALL			YES		# smaller inode, buf, sched queues
- # TEXAS_AUTOBAUD	YES		# tty image mode to support autobauding
- # UCB_AUTOBOOT		YES		# system is able to reboot itself
- # UCB_BHASH		YES		# hashed buffer accessing
- # UCB_DBUF		YES		# use one buffer per disk
- # UCB_DEVERR		YES		# print device errors in mnemonics
- # UCB_ECC		YES		# disk drivers should do ECC
- # UCB_FSFIX		YES		# crash resistant filesystems
- # UCB_GRPMAST		NO		# group master accounts
- # UCB_IHASH		YES		# hashed inode table
- # UCB_LOAD		YES		# load average and uptime
- # UCB_LOGIN		NO		# login sys call
- # UCB_NTTY		YES		# new tty driver
- # UCB_PGRP		NO		# count process limit by process group
- # UCB_RENICE		YES		# renice system call (setpriority(2))
- # UCB_SCRIPT		YES		# shell scripts can specify interpreter
- # UCB_SUBM		YES		# "submit" processing (stty(1))
- # UCB_SYMLINKS		YES		# symbolic links
- # UCB_UPRINTF		YES		# send error messages to user
- # UCB_VHANGUP		YES		# revoke control tty access
- # UNFAST		NO		# don't use inline.h macro speedups
- 
- # DISKMON has been absorbed into UCB_METER.
- # DISKMON		UCB_METER	# iostat disk monitoring
- 
- # BSLOP was a #define in param.c for the TIU/Spider.  It seems that
- # particular printer would DMA a few extra characters for you for free.
- # V7 came with a BSLOP of 2, but it was normally set to 0.  Add the
- # following #defines to param.c, then change all occurrences of BSIZE
- # to bsize.
- #
- #			/* BSLOP can be 0 unless you have a TIU/Spider*/
- #	#define BSLOP	0
- #	int	bsize = BSIZE + BSLOP;		/* size of buffers */
- 
- # The UCB_NKB flag requires changes to UNIX boot pgms as well as changes to
- # dump, restore, icheck, dcheck, ncheck, mkfs.  It includes the options
- # previously known as UCB_SMINO (smaller inodes, NADDR = 7) and UCB_MOUNT
- # (multiple superblocks per internal buffer).  It's measured in KB byte
- # system buffers, it's not just a boolean.  If you're not hearing what
- # I'm saying, don't even *think* of changing it.
- # UCB_NKB		1		# "n" KB byte system buffers
- 
  #########################################
  # PERIPHERALS: DISK DRIVES		#
  #########################################
--- 117,131 ----
  # if you have a DR-11 and a TM-11, you would leave 14 unassigned for them and
  # allocate 16 to the buffer pool.  Since each mapping register addresses 8
  # buffers for a 1K file system, NBUF would be 128.  A possible exception would
! # be to reduce the buffers to save on data space, as they were 24 bytes each
! # Should be 'small' for GENERIC, so room for kernel + large program to run.
  NBUF		32			# buffer cache, *must* be <= 240
  
  # DIAGNOSTIC does various run-time checks, some of which are pretty
  # expensive and at a high priority.  Suggested use is when the kernel
  # is crashing and you don't know why, otherwise run with it off.
  DIAGNOSTIC	NO			# misc. diagnostic loops and checks
  
  #########################################
  # PERIPHERALS: DISK DRIVES		#
  #########################################
***************
*** 312,329 ****
  # PERIPHERALS: TAPE DRIVES		#
  #########################################
  
! NHT		1		# TE16, TU45, TU77
  
  # Setting AVIVTM configures the TM driver for the AVIV 800/1600/6250
  # controller (the standard DEC TM only supports 800BPI).  For more details,
  # see /sys/pdpuba/tm.c.
! NTM		1		# TM11
  AVIVTM		YES		# AVIV 800/1600/6250 controller
  
! NTS		1		# TS11
  
! NTMSCP		1		# TMSCP controllers
! NTMS		1		# TMSCP drives
  TMSCP_DEBUG	NO		# debugging code in TMSCP drive (EXPENSIVE)
  
  #########################################
--- 160,177 ----
  # PERIPHERALS: TAPE DRIVES		#
  #########################################
  
! NHT		2		# TE16, TU45, TU77
  
  # Setting AVIVTM configures the TM driver for the AVIV 800/1600/6250
  # controller (the standard DEC TM only supports 800BPI).  For more details,
  # see /sys/pdpuba/tm.c.
! NTM		2		# TM11
  AVIVTM		YES		# AVIV 800/1600/6250 controller
  
! NTS		2		# TS11
  
! NTMSCP		2		# TMSCP controllers
! NTMS		2		# TMSCP drives
  TMSCP_DEBUG	NO		# debugging code in TMSCP drive (EXPENSIVE)
  
  #########################################
***************
*** 334,339 ****
--- 182,189 ----
  # It should always be at least 1, for the console.
  NKL		1		# KL11, DL11
  NDH		0		# DH11; NDH is in units of boards (16 each)
+ CS02		NO		# DH units above are really Emulex CS02 
+ 				# boards on a 22bit Qbus.
  NDM		0		# DM11; NDM is in units of boards (16 each)
  NDHU		0		# DHU11
  NDHV		0		# DHV11
***************
*** 351,376 ****
  # PSEUDO DEVICES, PROTOCOLS, NETWORKING	#
  #########################################
  # Networking only works with split I/D and SUPERVISOR space, i.e. with the
! # 11/44/45/50/53/55/70/73/83/84.  NETHER should be non-zero for networking
  # systems using any ethernet.  CHECKSTACK makes sure the networking stack
! # pointer and the kernel stack pointer don't collide; it's fairly expensive
  # at 4 extra instructions for EVERY function call AND return, always left
  # NO unless doing serious debugging.
! UCB_NET		NO		# TCP/IP
  CHECKSTACK	NO		# Kernel & Supervisor stack pointer checking
  NETHER		0		# ether pseudo-device
  
  # Note, PTY's and the select(2) system call do not require the kernel to
! # be configured for networking (UCB_NET).  Note that you can allocate PTY's
  # in any number (multiples of 8, of 16, even, odd, prime, whatever).  Nothing
  # in the kernel cares.  PTY's cost 78 bytes apiece in kernel data space.  You
! # should probably have at least 16 since so many applications use them:
  # script, jove, window, rlogin, ...
  NPTY		0		# pseudo-terminals - GENERIC sys needs NONE
  
- # To make the 3Com Ethernet board work correctly, splimp has to be promoted
- # to spl6; splfix files that do this are in conf/3Com; the config script
- # hopefully does the right thing.
  NEC		0		# 3Com Ethernet
  NDE		0		# DEUNA/DELUA
  NIL		0		# Interlan Ethernet
--- 201,223 ----
  # PSEUDO DEVICES, PROTOCOLS, NETWORKING	#
  #########################################
  # Networking only works with split I/D and SUPERVISOR space, i.e. with the
! # 11/44/53/70/73/83/84/93,94.  NETHER should be non-zero for networking
  # systems using any ethernet.  CHECKSTACK makes sure the networking stack
! # pointer and the kernel stack pointer don't collide; it's *very* expensive
  # at 4 extra instructions for EVERY function call AND return, always left
  # NO unless doing serious debugging.
! INET		NO		# TCP/IP
  CHECKSTACK	NO		# Kernel & Supervisor stack pointer checking
  NETHER		0		# ether pseudo-device
  
  # Note, PTY's and the select(2) system call do not require the kernel to
! # be configured for networking (INET).  Note that you can allocate PTY's
  # in any number (multiples of 8, of 16, even, odd, prime, whatever).  Nothing
  # in the kernel cares.  PTY's cost 78 bytes apiece in kernel data space.  You
! # should probably have at least 8-10 since several applications use them:
  # script, jove, window, rlogin, ...
  NPTY		0		# pseudo-terminals - GENERIC sys needs NONE
  
  NEC		0		# 3Com Ethernet
  NDE		0		# DEUNA/DELUA
  NIL		0		# Interlan Ethernet
***************
*** 382,390 ****
  PLI		NO		# LH/DH is connected to a PLI
  NIMP		0		# ARPAnet IMP 1822 interface
  
! # The following devices are untested in 2.11BSD; some are untested since
! # before 2.9BSD.  Some won't even compile.  Most will require modification
! # of various Makefiles to include the correct source.  Good luck.
  ENABLE34	NO		# if have the ENABLE34 board
  
  NCSS		0		# DEC/CSS IMP11-A ARPAnet IMP interface
--- 229,236 ----
  PLI		NO		# LH/DH is connected to a PLI
  NIMP		0		# ARPAnet IMP 1822 interface
  
! # The following are untested in 2.11BSD; some are untested since before 2.9BSD
! # Some won't even compile.  Most will require modification.  Good luck.
  ENABLE34	NO		# if have the ENABLE34 board
  
  NCSS		0		# DEC/CSS IMP11-A ARPAnet IMP interface
***************
*** 394,396 ****
--- 240,258 ----
  NS		0		# Xerox NS (XNS)
  NSRI		0		# SRI DR11c ARPAnet IMP
  NTB		0		# RS232 interface for Genisco/Hitachi tablets
+ 
+ # Defining FPSIM to YES compiles a floating point simulator into the kernel
+ # which will catch floating point instruction traps from user space.  This
+ # doesn't work at present.
+ FPSIM		NO			# floating point simulator
+ 
+ # To enable profiling, the :splfix script must be changed to use spl6 instead
+ # of spl7 (see conf/:splfix.profile), also, you have to have a machine with a
+ # supervisor PAR/PDR pair, i.e. an 11/44/45/50/53/55/70/73/83/84, as well
+ # as both a KW11-L and a KW11-P.
+ #
+ # Note that profiling is not currently working.  We don't have any plans on
+ # fixing it, so this is essentially a non-supported feature.
+ PROFILE		NO			# system profiling with KW11P clock
+ 
+ CGL_RTP		NO			# allow one real time process
*** /usr/src/sys/conf/Make.net.old	Mon Aug 14 14:36:50 1989
--- /usr/src/sys/conf/Make.net	Tue Oct 13 20:49:24 1992
***************
*** 40,48 ****
  N6=	../pdpif
  N6C=	${N6}/if_acc.c ${N6}/if_css.c ${N6}/if_de.c ${N6}/if_dmc.c	\
  	${N6}/if_ec.c ${N6}/if_en.c ${N6}/if_il.c ${N6}/if_qe.c		\
! 	${N6}/if_sri.c ${N6}/if_uba.c ${N6}/if_vv.c
  N6O=	if_acc.o if_css.o if_de.o if_dmc.o if_ec.o if_en.o if_il.o	\
! 	if_qe.o if_sri.o if_uba.o if_vv.o
  
  S=	../sys
  SC=	${S}/sys_socket.c ${S}/sys_net.c ${S}/uipc_domain.c		\
--- 40,48 ----
  N6=	../pdpif
  N6C=	${N6}/if_acc.c ${N6}/if_css.c ${N6}/if_de.c ${N6}/if_dmc.c	\
  	${N6}/if_ec.c ${N6}/if_en.c ${N6}/if_il.c ${N6}/if_qe.c		\
! 	${N6}/if_qt.c ${N6}/if_sri.c ${N6}/if_uba.c ${N6}/if_vv.c
  N6O=	if_acc.o if_css.o if_de.o if_dmc.o if_ec.o if_en.o if_il.o	\
! 	if_qe.o if_qt.o if_sri.o if_uba.o if_vv.o
  
  S=	../sys
  SC=	${S}/sys_socket.c ${S}/sys_net.c ${S}/uipc_domain.c		\
*** /usr/src/sys/conf/Make.nsunix.old	Sat Jul 11 23:13:10 1992
--- /usr/src/sys/conf/Make.nsunix	Sat Dec 26 22:26:30 1992
***************
*** 27,33 ****
  U=	../pdpuba
  MB=	../pdpmba
  
! DEFS=	-DKERNEL -Dpdp11 -I. -I${H}
  CFLAGS=	-O ${DEFS}
  
  CPP=	/lib/cpp -P ${DEFS}
--- 27,33 ----
  U=	../pdpuba
  MB=	../pdpmba
  
! DEFS=	-DKERNEL ${OPTS} -I. -I${H}
  CFLAGS=	-O ${DEFS}
  
  CPP=	/lib/cpp -P ${DEFS}
***************
*** 50,56 ****
  CONF=	scb.o libc_bcmp.o libc_bcopy.o libc_bzero.o libc_ffs.o \
  	libc_insque.o libc_ldiv.o libc_lmul.o libc_lrem.o libc_remque.o \
  	libc_strlen.o mch_backup.o mch_click.o mch_copy.o mch_csv.o \
! 	mch_dump.o mch_dzpdma.o mch_fpsim.o mch_KScall.o mch_profile.o \
  	mch_start.o mch_trap.o mch_vars.o mch_xxx.o conf.o ioconf.o boot.o
  
  NCONF=	libc_bcmp.o libc_bcopy.o libc_bzero.o libc_ffs.o libc_htonl.o \
--- 50,56 ----
  CONF=	scb.o libc_bcmp.o libc_bcopy.o libc_bzero.o libc_ffs.o \
  	libc_insque.o libc_ldiv.o libc_lmul.o libc_lrem.o libc_remque.o \
  	libc_strlen.o mch_backup.o mch_click.o mch_copy.o mch_csv.o \
! 	mch_dump.o mch_dzpdma.o mch_KScall.o mch_profile.o \
  	mch_start.o mch_trap.o mch_vars.o mch_xxx.o conf.o ioconf.o boot.o
  
  NCONF=	libc_bcmp.o libc_bcopy.o libc_bzero.o libc_ffs.o libc_htonl.o \
***************
*** 76,81 ****
--- 76,82 ----
  OV6=	clock.o dn.o init_main.o kern_pdp.o machdep2.o subr_prf.o syscalls.o \
  	subr_log.o toy.o
  OV7=	tmscp.o
+ OV8=	mch_fpsim.o
  
  KERNOBJ=${CONF} ${BASE} ${OV1} ${OV2} ${OV3} ${OV4} ${OV5} \
  	${OV6} ${OV7} ${OV8} ${OV9} ${OV10} ${OV11} ${OV12} \
***************
*** 91,97 ****
  
  NETOBJ=	${NCONF} af.o idp_usrreq.o if.o if_acc.o if_css.o if_de.o \
  	if_dmc.o if_ec.o if_en.o if_ether.o if_il.o if_imp.o if_imphost.o \
! 	if_loop.o if_qe.o if_sl.o if_sri.o if_uba.o if_vv.o in.o \
  	in_cksum.o in_pcb.o in_proto.o ip_icmp.o ip_input.o ip_output.o \
  	ns.o ns_error.o ns_input.o ns_ip.o ns_output.o ns_pcb.o \
  	ns_proto.o raw_cb.o raw_imp.o raw_ip.o \
--- 92,98 ----
  
  NETOBJ=	${NCONF} af.o idp_usrreq.o if.o if_acc.o if_css.o if_de.o \
  	if_dmc.o if_ec.o if_en.o if_ether.o if_il.o if_imp.o if_imphost.o \
! 	if_loop.o if_qe.o if_qt.o if_sl.o if_sri.o if_uba.o if_vv.o in.o \
  	in_cksum.o in_pcb.o in_proto.o ip_icmp.o ip_input.o ip_output.o \
  	ns.o ns_error.o ns_input.o ns_ip.o ns_output.o ns_pcb.o \
  	ns_proto.o raw_cb.o raw_imp.o raw_ip.o \
*** /usr/src/sys/conf/Make.sunix.old	Sat Jul 11 23:13:33 1992
--- /usr/src/sys/conf/Make.sunix	Tue Dec 29 00:44:28 1992
***************
*** 22,28 ****
  U=	../pdpuba
  MB=	../pdpmba
  
! DEFS=	-DKERNEL -Dpdp11 -I. -I${H}
  CFLAGS=	-O ${DEFS}
  
  CPP=	/lib/cpp -P ${DEFS}
--- 22,28 ----
  U=	../pdpuba
  MB=	../pdpmba
  
! DEFS=	-DKERNEL ${OPTS} -I. -I${H}
  CFLAGS=	-O ${DEFS}
  
  CPP=	/lib/cpp -P ${DEFS}
***************
*** 42,48 ****
  CONF=	scb.o libc_bcmp.o libc_bcopy.o libc_bzero.o libc_ffs.o \
  	libc_insque.o libc_ldiv.o libc_lmul.o libc_lrem.o libc_remque.o \
  	libc_strlen.o mch_backup.o mch_click.o mch_copy.o mch_csv.o \
! 	mch_dump.o mch_dzpdma.o mch_fpsim.o mch_profile.o mch_start.o \
  	mch_trap.o mch_vars.o mch_xxx.o conf.o ioconf.o boot.o
  
  BASE=	br.o dh.o dhu.o dhv.o dkbad.o dr.o dz.o init_sysent.o kern_clock.o \
--- 42,48 ----
  CONF=	scb.o libc_bcmp.o libc_bcopy.o libc_bzero.o libc_ffs.o \
  	libc_insque.o libc_ldiv.o libc_lmul.o libc_lrem.o libc_remque.o \
  	libc_strlen.o mch_backup.o mch_click.o mch_copy.o mch_csv.o \
! 	mch_dump.o mch_dzpdma.o mch_profile.o mch_start.o \
  	mch_trap.o mch_vars.o mch_xxx.o conf.o ioconf.o boot.o
  
  BASE=	br.o dh.o dhu.o dhv.o dkbad.o dr.o dz.o init_sysent.o kern_clock.o \
***************
*** 51,57 ****
  	subr_rmap.o subr_xxx.o sys_inode.o sys_pipe.o trap.o tty.o \
  	tty_conf.o tty_subr.o tty_tb.o tty_tty.o ufs_alloc.o ufs_bio.o \
  	ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o ufs_namei.o \
! 	ufs_subr.o vm_sched.o vm_swp.o vm_text.o xp.o
  OV1=	sys_generic.o ufs_syscalls.o mem.o
  OV2=	kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o
  OV3=	clock.o cons.o kern_pdp.o kern_rtp.o kern_time.o \
--- 51,57 ----
  	subr_rmap.o subr_xxx.o sys_inode.o sys_pipe.o trap.o tty.o \
  	tty_conf.o tty_subr.o tty_tb.o tty_tty.o ufs_alloc.o ufs_bio.o \
  	ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o ufs_namei.o \
! 	ufs_subr.o vm_sched.o vm_text.o xp.o
  OV1=	sys_generic.o ufs_syscalls.o mem.o
  OV2=	kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o
  OV3=	clock.o cons.o kern_pdp.o kern_rtp.o kern_time.o \
***************
*** 58,66 ****
  	kern_xxx.o machdep2.o quota_sys.o subr_prf.o sys_process.o \
  	syscalls.o ufs_mount.o
  OV4=	hk.o init_main.o kern_prot.o tty_pty.o quota_kern.o quota_subr.o \
! 	quota_ufs.o subr_log.o vm_swap.o vm_proc.o toy.o
  OV5=	ht.o tm.o ts.o
  OV6=	tmscp.o
  
  KERNOBJ=${CONF} ${BASE} ${OV1} ${OV2} ${OV3} ${OV4} ${OV5} \
  	${OV6} ${OV7} ${OV8} ${OV9} ${OV10} ${OV11} ${OV12} \
--- 58,67 ----
  	kern_xxx.o machdep2.o quota_sys.o subr_prf.o sys_process.o \
  	syscalls.o ufs_mount.o
  OV4=	hk.o init_main.o kern_prot.o tty_pty.o quota_kern.o quota_subr.o \
! 	quota_ufs.o subr_log.o vm_swp.o vm_swap.o vm_proc.o toy.o
  OV5=	ht.o tm.o ts.o
  OV6=	tmscp.o
+ OV7=	mch_fpsim.o
  
  KERNOBJ=${CONF} ${BASE} ${OV1} ${OV2} ${OV3} ${OV4} ${OV5} \
  	${OV6} ${OV7} ${OV8} ${OV9} ${OV10} ${OV11} ${OV12} \
*** /usr/src/sys/conf/Make.unix.old	Sat Jul 11 23:14:10 1992
--- /usr/src/sys/conf/Make.unix	Sat Dec 26 17:01:08 1992
***************
*** 22,28 ****
  U=	../pdpuba
  MB=	../pdpmba
  
! DEFS=	-DKERNEL -Dpdp11 -I. -I${H}
  CFLAGS=	-O ${DEFS}
  
  CPP=	/lib/cpp -P ${DEFS}
--- 22,28 ----
  U=	../pdpuba
  MB=	../pdpmba
  
! DEFS=	-DKERNEL ${OPTS} -I. -I${H}
  CFLAGS=	-O ${DEFS}
  
  CPP=	/lib/cpp -P ${DEFS}
*** /usr/src/sys/conf/README.old	Sat Nov 30 08:33:16 1991
--- /usr/src/sys/conf/README	Fri Jan  1 17:58:11 1993
***************
*** 38,48 ****
  overwrite your old version of that file.  Therefore, if you want to return
  to the old version of your system, you'll have to recover the file before
  you try and remake the old system.  To make this easy, config saves a copy
! in the kernel directory.  Also, since several application programs use
! localopts.h, you should recompile all source directories after reconfiguring
! your system.  (The real solution is to split localopts.h into two parts, one
! for the kernel and one for everyone else, and put the kernel's part in the
! kernel directory.)
  	The directory VAX.compile contains a C preprocessor that defines
  "pdp11" and a C compiler that knows where to find said preprocessor.  If you
  compile and install VAX.compile/cpp as VAX.compile/CPP and VAX.compile/cc.c
--- 38,53 ----
  overwrite your old version of that file.  Therefore, if you want to return
  to the old version of your system, you'll have to recover the file before
  you try and remake the old system.  To make this easy, config saves a copy
! in the kernel directory.
! 
! Almost no applications depend on localopts.h now, pstat.c, mkfs.c and sa.c 
! are the only ones which come to mind.  'pstat' and 'mkfs' need the 
! EXTERNALITIMES define and the accounting program 'sa' needs the LINEHZ 
! definition.  ALL other options have either been deleted (obsolete) or made
! standard.  The few remaining options have been moved into the kernel Makefile
! as "-Dxxx" flags to the compiler.  If EXTERNALITIMES changes you will need
! to recompile anything which looks at the kernel's incore inode table.
! 
  	The directory VAX.compile contains a C preprocessor that defines
  "pdp11" and a C compiler that knows where to find said preprocessor.  If you
  compile and install VAX.compile/cpp as VAX.compile/CPP and VAX.compile/cc.c
*** /usr/src/sys/conf/checksys.c.old	Sat Mar 30 21:39:12 1991
--- /usr/src/sys/conf/checksys.c	Fri Jan  1 16:10:53 1993
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)checksys.c	1.2 (2.10BSD Berkeley) 1/27/90
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)checksys.c	1.3 (2.11BSD GTE) 1/1/93
   */
  
  /*
***************
*** 27,67 ****
  #define	KB(val)		((u_int)(val * 1024))
  
  #define	N_END		0
! #define	N_BSIZE		1
! #define	N_NBUF		2
! #define	N_PROC		5
! #define	N_NINODE	10
! #define	N_CLIST		15
! #define	N_NOKA5		16
! #define	N_RAM		17
! #define	N_XITDESC	18
! #define	N_QUOTDESC	19
! #define	N_NAMECACHE	20
! #define	N_IOSIZE	21
  
  struct nlist nl[] = {
  	{ "_end" },			/*  0 */
! 	{ "_bsize" },			/*  1 */
! 	{ "_nbuf" },			/*  2 */
! 	{ "_buf" },			/*  3 */
! 	{ "_nproc" },			/*  4 */
! 	{ "_proc" },			/*  5 */
! 	{ "_ntext" },			/*  6 */
! 	{ "_text" },			/*  7 */
! 	{ "_nfile" },			/*  8 */
! 	{ "_file" },			/*  9 */
! 	{ "_ninode" },			/* 10 */
! 	{ "_inode" },			/* 11 */
! 	{ "_ncallou" },			/* 12 */
! 	{ "_callout" },			/* 13 */
! 	{ "_ucb_cli" },			/* 14 */
! 	{ "_nclist" },			/* 15 */
! 	{ "_noka5" },			/* 16 */
! 	{ "_ram_siz" },			/* 17 */
! 	{ "_xitdesc" },			/* 18 */
! 	{ "_quotdes" },			/* 19 */
! 	{ "_namecac" },			/* 20 */
! 	{ "__iosize" },			/* 21 */
  	{ "" },
  };
  
--- 27,63 ----
  #define	KB(val)		((u_int)(val * 1024))
  
  #define	N_END		0
! #define	N_NBUF		1
! #define	N_PROC		4
! #define	N_NINODE	9
! #define	N_CLIST		14
! #define	N_RAM		15
! #define	N_XITDESC	16
! #define	N_QUOTDESC	17
! #define	N_NAMECACHE	18
! #define	N_IOSIZE	19
  
  struct nlist nl[] = {
  	{ "_end" },			/*  0 */
! 	{ "_nbuf" },			/*  1 */
! 	{ "_buf" },			/*  2 */
! 	{ "_nproc" },			/*  3 */
! 	{ "_proc" },			/*  4 */
! 	{ "_ntext" },			/*  5 */
! 	{ "_text" },			/*  6 */
! 	{ "_nfile" },			/*  7 */
! 	{ "_file" },			/*  8 */
! 	{ "_ninode" },			/*  9 */
! 	{ "_inode" },			/* 10 */
! 	{ "_ncallou" },			/* 11 */
! 	{ "_callout" },			/* 12 */
! 	{ "_ucb_cli" },			/* 13 */
! 	{ "_nclist" },			/* 14 */
! 	{ "_ram_siz" },			/* 15 */
! 	{ "_xitdesc" },			/* 16 */
! 	{ "_quotdes" },			/* 17 */
! 	{ "_namecac" },			/* 18 */
! 	{ "__iosize" },			/* 19 */
  	{ "" },
  };
  
***************
*** 201,210 ****
  
  	(void)nlist(argv[1], nl);
  
- 	if (!nl[N_NOKA5].n_type) {
- 		puts("\"noka5\" not found in namelist.");
- 		exit(-1);
- 	}
  	if (!nl[N_NINODE].n_type) {
  		puts("\"ninode\" not found in namelist.");
  		exit(-1);
--- 197,202 ----
***************
*** 211,231 ****
  	}
  	ninode = getval(N_NINODE);
  	if (!texterrs)
! 		if (getval(N_NOKA5)) {
! 			if (nl[N_END].n_value >= 0120000) {
! 				printf("Data extends into the remapping area (0120000-0140000, KDSD5)\nby %u bytes; undefine NOKA5 or reduce data size.\n", nl[N_END].n_value - 0120000);
! 				errs++;
  			}
  		}
! 		else {
! 			if (nl[N_PROC].n_value >= 0120000) {
! 				printf("The remapping area (0120000-0140000, KDSD5)\n\tcontains data other than the proc, text and file tables.\n\tReduce other data by %u bytes.\n", nl[N_PROC].n_value - 0120000);
! 				errs++;
! 			}
! 			if (nl[N_END].n_value < 0120000)
! 				printf("Data ends %u bytes below the remapping area (0120000-0140000, KDSD5)\nyou may define NOKA5.\n", 0120000 - nl[N_END].n_value);
! 		}
! 	totsize += (getval(N_NBUF) * getval(N_BSIZE));
  	if (nl[N_CLIST].n_value)
  		totsize += cround(getval(N_CLIST) * (long)sizeof(struct cblock));
  	if (nl[N_RAM].n_type)
--- 203,215 ----
  	}
  	ninode = getval(N_NINODE);
  	if (!texterrs)
! 		{
! 		if (nl[N_PROC].n_value >= 0120000) {
! 			printf("The remapping area (0120000-0140000, KDSD5)\n\tcontains data other than the proc, text and file tables.\n\tReduce other data by %u bytes.\n", nl[N_PROC].n_value - 0120000);
! 			errs++;
  			}
  		}
! 	totsize += (getval(N_NBUF) * MAXBSIZE);
  	if (nl[N_CLIST].n_value)
  		totsize += cround(getval(N_CLIST) * (long)sizeof(struct cblock));
  	if (nl[N_RAM].n_type)
*** /usr/src/sys/conf/config.old	Thu Nov 19 21:04:42 1992
--- /usr/src/sys/conf/config	Sun Jan  3 13:47:58 1993
***************
*** 18,25 ****
  if mkdir ../$MACHINE; then
  	echo "Creating ../$MACHINE."
  	chmod 775 ../$MACHINE
- else
- 	exit 1
  fi
  
  # read in specification file
--- 18,23 ----
***************
*** 26,43 ****
  eval `awk '/^#/ || /^$/ || /^	/ {next} $1 != "" { printf "%s=\\"%s\\"\\n", $1, $2 }' $MACHINE`
  
  if [ ! "$MAXUSERS" ]; then
! 	echo "$0: maxusers not set in $MACHINE."
  	exit 1
  fi
  
  if [ ! "$TIMEZONE" ]; then
! 	echo "$0: timezone not set in $MACHINE."
! 	exit 1
  fi
  
  if [ ! "$DST" ]; then
! 	echo "$0: dst flag not set in $MACHINE."
! 	exit 1
  fi
  
  cat << EOF > $LO
--- 24,39 ----
  eval `awk '/^#/ || /^$/ || /^	/ {next} $1 != "" { printf "%s=\\"%s\\"\\n", $1, $2 }' $MACHINE`
  
  if [ ! "$MAXUSERS" ]; then
! 	MAXUSERS=1
  	exit 1
  fi
  
  if [ ! "$TIMEZONE" ]; then
! 	TIMEZONE=480
  fi
  
  if [ ! "$DST" ]; then
! 	DST=1
  fi
  
  cat << EOF > $LO
***************
*** 44,80 ****
  /*
   * This file is generated by the configuration script sys/conf/config.
   *
!  * It contains a list of kernel options, used when compiling the kernel
!  * as well as in a few of the application programs.
!  *
!  * All defines previously found in the whoami.h file have been moved
!  * into this file, as well as several originally found in device header
!  * files.  Do not hand edit unless you know what you're doing.  (You
!  * probably shouldn't hand edit anyway...)  See sys/conf/GENERIC for a
!  * list of available options and explanation as to what an option does,
!  * and sys/conf/README for more information.
   */
  
  EOF
  
  case $PDP11 in
- 	23|24|34)
- 		KERN_NONSEP=YES
- 		NETFIX=:splfix.mtps
- 		SPLFIX=:splfix.mtps;;
  	GENERIC)
- #		if [ $NONFP = NO ]; then
- #			echo "NONFP changed; should be set for GENERIC kernels."
- #			NONFP=YES
- #		fi
- #		eventually: KERN_NONSEP=YES
  		KERN_NONSEP=NO
  		NETFIX=:splfix.movb
  		SPLFIX=:splfix.movb;;
- 	35|40|60)
- 		KERN_NONSEP=YES
- 		NETFIX=:splfix.movb
- 		SPLFIX=:splfix.movb;;
  	53|73|83|84|93|94)
  		KERN_NONSEP=NO
  		NETFIX=:splfix.movb+mfps
--- 40,57 ----
  /*
   * This file is generated by the configuration script sys/conf/config.
   *
!  * It contains a list the kernel options not prepended to the Makefile
!  * as -Dxxxx commands to the compiler.  MAXMEM was moved to param.h leaving
!  * only LINEHZ and EXTERNALITIMES to be placed in localopts.h
   */
  
  EOF
  
  case $PDP11 in
  	GENERIC)
  		KERN_NONSEP=NO
  		NETFIX=:splfix.movb
  		SPLFIX=:splfix.movb;;
  	53|73|83|84|93|94)
  		KERN_NONSEP=NO
  		NETFIX=:splfix.movb+mfps
***************
*** 85,130 ****
  		SPLFIX=:splfix.spl;;
  	*)
  		echo "$0: unrecognized PDP11 type $PDP11."
! 		echo 'use GENERIC, 23, 24, 34, 35, 40, 44, 45, 50, 53, 55,'
! 		echo '	60, 70, 73, 83, 84, 93, 94'
  		exit 1;;
  esac
  
  if [ $NKL -lt 1 ]; then
! 	echo "$0: NKL must be at least one (for the console)."
! 	exit 1
  fi
  
  # Copy in the standard configuration files, boot program,
! # makefiles, and cpu-dependent files.  Modify as necessary.
  
  if [ $MACHINE = VAX ]; then
  	echo "Copying standard VAX files to ../$MACHINE."
! 	cp VAX.compile/VAX.c VAX.compile/Makefile ../$MACHINE
  else
  	echo "Copying standard files to ../$MACHINE."
  	if [ $NEC = 0 ]; then
! 		if [ $UCB_NET = YES ]; then
  			cp spl/$NETFIX ../$MACHINE/NETSPLFIX
  		fi
  		cp spl/$SPLFIX ../$MACHINE/SPLFIX
  	else
! 		if [ $UCB_NET = YES ]; then
  			cp spl_3com/$NETFIX ../$MACHINE/NETSPLFIX
  		fi
  		cp spl_3com/$SPLFIX ../$MACHINE/SPLFIX
  	fi
- 	if [ $UCB_NET = YES ]; then
- 		cp Make.nsunix ../$MACHINE/Makefile
- 		cp Make.sys Make.net Make.pdpnet Make.pdpuba Make.pdp \
- 			Make.pdpmba ../$MACHINE
- 	elif [ $KERN_NONSEP = NO ]; then
- 		cp Make.sunix ../$MACHINE/Makefile
- 		cp Make.sys Make.pdpuba Make.pdp Make.pdpmba ../$MACHINE
- 	else
- 		cp Make.unix ../$MACHINE/Makefile
- 		cp Make.sys Make.pdpuba Make.pdp Make.pdpmba ../$MACHINE
- 	fi
  	cp boot/${BOOTDEV}boot.s ../$MACHINE/boot.s
  fi
  
--- 62,94 ----
  		SPLFIX=:splfix.spl;;
  	*)
  		echo "$0: unrecognized PDP11 type $PDP11."
! 		echo 'use GENERIC, 44, 70, 73'
  		exit 1;;
  esac
  
  if [ $NKL -lt 1 ]; then
! 	NKL=1
  fi
  
  # Copy in the standard configuration files, boot program,
! # makefiles, and cpu-dependent files.
  
  if [ $MACHINE = VAX ]; then
  	echo "Copying standard VAX files to ../$MACHINE."
! 	cp VAX.compile/VAX.c ../$MACHINE
  else
  	echo "Copying standard files to ../$MACHINE."
  	if [ $NEC = 0 ]; then
! 		if [ $INET = YES ]; then
  			cp spl/$NETFIX ../$MACHINE/NETSPLFIX
  		fi
  		cp spl/$SPLFIX ../$MACHINE/SPLFIX
  	else
! 		if [ $INET = YES ]; then
  			cp spl_3com/$NETFIX ../$MACHINE/NETSPLFIX
  		fi
  		cp spl_3com/$SPLFIX ../$MACHINE/SPLFIX
  	fi
  	cp boot/${BOOTDEV}boot.s ../$MACHINE/boot.s
  fi
  
***************
*** 131,138 ****
  sed	-e "s/%ROOTDEV%/$ROOTDEV/" \
  	-e "s/%SWAPDEV%/$SWAPDEV/" \
  	-e "s/%PIPEDEV%/$PIPEDEV/" \
- 	-e "s/%NSWAP%/$NSWAP/" \
- 	-e "s/%SWAPLO%/$SWAPLO/" \
  	-e "s/%DUMPDEV%/$DUMPDEV/" \
  	-e "s/%DUMPLO%/$DUMPLO/" \
  	-e "s/%DUMPROUTINE%/$DUMPROUTINE/" < ioconf.c > ../$MACHINE/ioconf.c
--- 95,100 ----
***************
*** 139,230 ****
  
  sed	-e "s/%TIMEZONE%/$TIMEZONE/" \
  	-e "s/%DST%/$DST/" \
  	-e "s/%MAXUSERS%/$MAXUSERS/" < param.c > ../$MACHINE/param.c
  
  echo "Setting configuration options for $MACHINE."
  
! if [ $IDENT != GENERIC ]; then
! 	echo "#define $IDENT"		>> $LO
! fi
! echo "#define PDP11	$PDP11"		>> $LO
! echo "#define MAXMEM	$MAXMEM"	>> $LO
  echo "#define LINEHZ	$LINEHZ"	>> $LO
- if [ $NONFP = YES -a $FPSIM = NO ]; then
- 	echo NONFP is YES and FPSIM is NO.  You have to provide some form of
- 	echo floating point support!!!!
- 	exit 1
- fi
- if [ $NONFP = YES ]; then
- 	echo "#define NONFP 1"		>> $LO
- fi
  if [ $FPSIM = YES ]; then
! 	echo "#define FPSIM 1"		>> $LO
  fi
- echo "#ifdef KERNEL"			>> $LO
- echo "#define NBUF	$NBUF"		>> $LO
  
  if [ $KERN_NONSEP = YES ]; then
! 	echo "#define KERN_NONSEP"	>> $LO
  fi
  
- if [ $UNIBUS_MAP = YES ]; then
- 	echo "#define UNIBUS_MAP 1"	>> $LO
- fi
- if [ $Q22 = YES ]; then
- 	echo "#define Q22 1"		>> $LO
- fi
- if [ $VIRUS_VFORK = YES ]; then
- 	echo "#define VIRUS_VFORK 1"	>> $LO
- fi
  if [ $EXTERNALITIMES = YES ]; then
  	echo "#define EXTERNALITIMES 1"	>> $LO
  fi
  if [ $CGL_RTP = YES ]; then
! 	echo "#define CGL_RTP 1"	>> $LO
  fi
  if [ $UCB_METER = YES ]; then
! 	echo "#define UCB_METER 1"	>> $LO
  fi
! if [ $UCB_RUSAGE = YES ]; then
! 	echo "#define UCB_RUSAGE 1"	>> $LO
! fi
! if [ $NOKA5 = YES ]; then
! 	echo "#define NOKA5 1"		>> $LO
! fi
! if [ $UCB_NET = YES ]; then
! 	echo "#define UCB_NET 1"	>> $LO
! 	echo "#define INET 1"		>> $LO
! 	echo "#define TCP_COMPAT_42"	>> $LO
  	echo "#define NLOOP	1"	> ../$MACHINE/loop.h
  else
  	echo "#define NLOOP	0"	> ../$MACHINE/loop.h
  fi
  if [ $BADSECT = YES ]; then
! 	echo "#define BADSECT 1"	>> $LO
  fi
  if [ $CHECKSTACK = YES ]; then
! 	echo "#define CHECKSTACK 1"	>> $LO
  fi
  if [ $DIAGNOSTIC = YES ]; then
! 	echo "#define DIAGNOSTIC 1"	>> $LO
! 	echo "#define ICMPPRINTFS"	>> $LO
  fi
  if [ $QUOTA = YES ]; then
! 	echo "#define QUOTA 1"		>> $LO
  fi
- if [ $UCB_FRCSWAP = YES ]; then
- 	echo "#define UCB_FRCSWAP 1"	>> $LO
- fi
  if [ $UCB_CLIST = YES ]; then
! 	echo "#define UCB_CLIST 1"	>> $LO
  fi
  if [ $PROFILE = YES ]; then
! 	echo "#define PROFILE 1"	>> $LO
  fi
- if [ "$PDP11" = 70 ]; then
- 	echo "#define IDLE_DISPLAY 1"   >> $LO
- fi
- echo "#endif /* KERNEL */"		>> $LO
  
  echo "Creating device header files."
  
--- 101,154 ----
  
  sed	-e "s/%TIMEZONE%/$TIMEZONE/" \
  	-e "s/%DST%/$DST/" \
+ 	-e "s/%NBUF%/$NBUF/" \
  	-e "s/%MAXUSERS%/$MAXUSERS/" < param.c > ../$MACHINE/param.c
  
  echo "Setting configuration options for $MACHINE."
  
! OPTS="-D${IDENT}"
  echo "#define LINEHZ	$LINEHZ"	>> $LO
  if [ $FPSIM = YES ]; then
! 	OPTS="$OPTS -DFPSIM"
  fi
  
  if [ $KERN_NONSEP = YES ]; then
! 	OPTS="$OPTS -DKERN_NONSEP"
  fi
  
  if [ $EXTERNALITIMES = YES ]; then
  	echo "#define EXTERNALITIMES 1"	>> $LO
  fi
  if [ $CGL_RTP = YES ]; then
! 	OPTS="$OPTS -DCGL_RTP"
  fi
  if [ $UCB_METER = YES ]; then
! 	OPTS="$OPTS -DUCB_METER"
  fi
! if [ $INET = YES ]; then
! 	OPTS="$OPTS -DINET"
  	echo "#define NLOOP	1"	> ../$MACHINE/loop.h
  else
  	echo "#define NLOOP	0"	> ../$MACHINE/loop.h
  fi
  if [ $BADSECT = YES ]; then
! 	OPTS="$OPTS -DBADSECT"
  fi
  if [ $CHECKSTACK = YES ]; then
! 	OPTS="$OPTS -DCHECKSTACK"
  fi
  if [ $DIAGNOSTIC = YES ]; then
! 	OPTS="$OPTS -DDIAGNOSTIC -DICMPPRINTFS"
  fi
  if [ $QUOTA = YES ]; then
! 	OPTS="$OPTS -DQUOTA"
  fi
  if [ $UCB_CLIST = YES ]; then
! 	OPTS="$OPTS -DUCB_CLIST"
  fi
  if [ $PROFILE = YES ]; then
! 	OPTS="$OPTS -DPROFILE"
  fi
  
  echo "Creating device header files."
  
***************
*** 231,236 ****
--- 155,163 ----
  echo "#define NCSS	$NCSS"		> ../$MACHINE/css.h
  echo "#define NDE	$NDE"		> ../$MACHINE/de.h
  echo "#define NDH	$NDH"		> ../$MACHINE/dh.h
+ if [ $CS02 = YES ]; then
+ 	echo "#define CS02 	1"	>> ../$MACHINE/dh.h
+ fi
  echo "#define NDM	$NDM"		>> ../$MACHINE/dh.h
  echo "#define NDN	$NDN"		> ../$MACHINE/dn.h
  echo "#define NDHU	$NDHU"		> ../$MACHINE/dhu.h
***************
*** 312,317 ****
--- 239,266 ----
  fi
  if [ $XP_PROBE = YES ]; then
  	echo "#define XP_PROBE 1"	>> ../$MACHINE/xp.h
+ fi
+ 
+ echo "Creating Makefile for $MACHINE".
+ if [ -s ../$MACHINE/Makefile ]; then
+ 	echo "Saving ../$MACHINE/Makefile to ../$MACHINE/Makefile.old"
+ 	cp -p ../$MACHINE/Makefile ../$MACHINE/Makefile.old
+ fi
+ 
+ echo "OPTS=$OPTS" > ../$MACHINE/Makefile
+ 
+ if [ $MACHINE = VAX ]; then
+    cat VAX.compile/Makefile >> ../$MACHINE/Makefile
+ elif [ $INET = YES ]; then
+      cat Make.nsunix >> ../$MACHINE/Makefile
+      cp Make.sys Make.net Make.pdpnet Make.pdpuba \
+ 		Make.pdp Make.pdpmba ../$MACHINE
+ elif [ $KERN_NONSEP = NO ]; then
+      cat Make.sunix >> ../$MACHINE/Makefile
+      cp Make.sys Make.pdpuba Make.pdp Make.pdpmba ../$MACHINE
+ else
+      cat Make.unix >> ../$MACHINE/Makefile
+      cp Make.sys Make.pdpuba Make.pdp Make.pdpmba ../$MACHINE
  fi
  
  # save copy of localopts.h
*** /usr/src/sys/conf/ioconf.c.old	Sun Jan 24 07:26:27 1988
--- /usr/src/sys/conf/ioconf.c	Thu Dec 24 00:49:13 1992
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)ioconf.c	1.1 (2.10BSD Berkeley) 12/1/86
   */
  
  #include "param.h"
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)ioconf.c	2.0 (2.11BSD GTE) 12/24/92
   */
  
  #include "param.h"
***************
*** 12,19 ****
  dev_t	rootdev = %ROOTDEV%,
  	swapdev = %SWAPDEV%,
  	pipedev = %PIPEDEV%;
- daddr_t swplo = (daddr_t)%SWAPLO%;
- int	nswap = %NSWAP%;
  
  dev_t	dumpdev = %DUMPDEV%;
  daddr_t	dumplo = (daddr_t)%DUMPLO%;
--- 12,17 ----
*** /usr/src/sys/conf/param.c.old	Thu May 31 14:13:10 1990
--- /usr/src/sys/conf/param.c	Fri Jan  1 16:07:32 1993
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #define	MAXUSERS %MAXUSERS%
+ #define	NBUF %NBUF%
  
  int	hz = LINEHZ;
  struct	timezone tz = { %TIMEZONE%, %DST% };
***************
*** 46,52 ****
  int	nfile = NFILE;
  #define NCALL (16 + MAXUSERS)
  int	ncallout = NCALL;
- int	bsize = MAXBSIZE;
  int	nbuf = NBUF;
  
  #define NCLIST (20 + 8 * MAXUSERS)
--- 47,52 ----
***************
*** 75,87 ****
  	int ucb_clist = 1;
  #else
  	struct cblock	cfree[NCLIST];
! 	int ucb_clist;
! #endif
! 
! #ifdef NOKA5
! 	int noka5 = 1;
! #else
! 	int noka5;
  #endif
  
  #define CMAPSIZ	NPROC			/* size of core allocation map */
--- 75,81 ----
  	int ucb_clist = 1;
  #else
  	struct cblock	cfree[NCLIST];
! 	int ucb_clist = 0;
  #endif
  
  #define CMAPSIZ	NPROC			/* size of core allocation map */
