*** /old/src/sys/pdp/machdep.c	Thu Apr  5 16:15:25 1990
--- /usr/src/sys/pdp/machdep.c	Thu Jun  6 20:04:53 1991
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)machdep.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.
   *
!  *	@(#)machdep.c	2.0 (2.11BSD) 6/6/91
   */
  
  #include "param.h"
***************
*** 144,162 ****
  	regs[R0] = scp->sc_r0;
  	regs[R7] = scp->sc_pc;
  	regs[RPS] = scp->sc_ps;
- }
- 
- physstrat(bp, strat, prio)
- 	register struct buf *bp;
- 	int (*strat)(), prio;
- {
- 	register int s;
- 
- 	(*strat)(bp);
- 	s = splbio();
- 	while ((bp->b_flags & B_DONE) == 0)
- 		sleep((caddr_t)bp, prio);
- 	splx(s);
  }
  
  #ifdef UNIBUS_MAP
--- 144,149 ----
*** /old/src/sys/pdp/machdep2.c	Thu May 31 14:00:35 1990
--- /usr/src/sys/pdp/machdep2.c	Sun Nov 17 09:20:10 1991
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)machdep.c	1.2 (2.10BSD Berkeley) 1/26/90
   */
  
  #include "param.h"
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)machdep.c	2.0 (2.11BSD) 4/20/91
   */
  
  #include "param.h"
***************
*** 27,32 ****
--- 27,34 ----
  #include "ram.h"
  #include "msgbuf.h"
  #include "namei.h"
+ #include "ra.h"
+ #include "tms.h"
  
  #ifdef QUOTA
  #include "quota.h"
***************
*** 33,38 ****
--- 35,45 ----
  #endif
  
  size_t	physmem;	/* total amount of physical memory (for savecore) */
+ #if	NRAC > 0 || NTMSCP > 0
+ memaddr	_iostart, _iobase;
+ ubadr_t	_ioumr;
+ u_short	_iosize = 2 * (1928 + 1096 + 128);  /* enough for 2 TMSCP and 2 MSCP */
+ #endif
  
  #ifndef	NOKA5
  segm	seg5;		/* filled in by initialization */
***************
*** 172,177 ****
--- 179,192 ----
  	maxmem -= B;
  	}
  
+ #if	NRAC > 0 || NTMSCP > 0
+ {
+ 	if ((_iobase = malloc(coremap, btoc(_iosize))) == 0)
+ 		panic("_iobase");
+ 	maxmem -= btoc(_iosize);
+ }
+ #endif	NRAC
+ 
  #define B	(size_t)(((long)nbuf * (MAXBSIZE)) / ctob(1))
  	if ((bpaddr = malloc(coremap, B)) == 0)
  		panic("buffers");
***************
*** 282,298 ****
  #endif
  
  #ifdef UNIBUS_MAP
- extern bool_t ubmap;
  
  /*
   * Re-initialize the Unibus map registers to statically map
   * the clists and buffers.  Free the remaining registers for
!  * physical I/O.
   */
  ubinit()
  {
  	register int i, ub_nreg;
  	long paddr;
  
  	if (!ubmap)
  		return;
--- 297,313 ----
  #endif
  
  #ifdef UNIBUS_MAP
  
  /*
   * Re-initialize the Unibus map registers to statically map
   * the clists and buffers.  Free the remaining registers for
!  * physical I/O.  At this time the [T]MSCP arena is also mapped.
   */
  ubinit()
  {
  	register int i, ub_nreg;
  	long paddr;
+ 	register struct ubmap *ubp;
  
  	if (!ubmap)
  		return;
***************
*** 325,332 ****
  #else
  	mfree(ub_map, 31 - ub_nreg - 1, 1 + ub_nreg);
  #endif
  }
! #endif
  
  int waittime = -1;
  
--- 340,368 ----
  #else
  	mfree(ub_map, 31 - ub_nreg - 1, 1 + ub_nreg);
  #endif
+ 
+ /*
+  * this early in the system's life there had better be a UMR or two
+  * available!!  N.B. This was moved from where the [T]MSCP memory was 
+  * allocated because at that point the UMR map was not initialized.
+ */
+ 
+ #if	NRAC > 0 || NTMSCP > 0
+ 	_iostart = _iobase;
+ 	i = (int)btoub(_iosize);
+ 	ub_nreg = malloc(ub_map, i);
+ 	_ioumr = (ubadr_t)ub_nreg << 13;
+ 	ubp = &UBMAP[ub_nreg];
+ 	paddr = ctob((ubadr_t)_iostart);
+ 	while (i--) {
+ 		ubp->ub_lo = loint(paddr);
+ 		ubp->ub_hi = hiint(paddr);
+ 		ubp++;
+ 		paddr += (ubadr_t)UBPAGE;
+ 	}
+ #endif	NRAC
  }
! #endif	UNIBUS_MAP
  
  int waittime = -1;
  
***************
*** 346,352 ****
  	if ((howto&RB_NOSYNC)==0 && waittime < 0 && bfreelist[0].b_forw) {
  		waittime = 0;
  		printf("syncing disks... ");
! 		(void) splnet();
  		/*
  		 * Release inodes held by texts before update.
  		 */
--- 382,388 ----
  	if ((howto&RB_NOSYNC)==0 && waittime < 0 && bfreelist[0].b_forw) {
  		waittime = 0;
  		printf("syncing disks... ");
! 		(void) _splnet();
  		/*
  		 * Release inodes held by texts before update.
  		 */
***************
*** 363,374 ****
  			if (nbusy == 0)
  				break;
  			printf("%d ", nbusy);
! 			DELAY(40000L * iter);
  		  }
  		}
  		printf("done\n");
  	}
! 	(void)splhigh();
  	if (howto & RB_HALT) {
  		printf("halting\n");
  		halt();
--- 399,410 ----
  			if (nbusy == 0)
  				break;
  			printf("%d ", nbusy);
! 			delay(40000L * iter);
  		  }
  		}
  		printf("done\n");
  	}
! 	(void) _splhigh();
  	if (howto & RB_HALT) {
  		printf("halting\n");
  		halt();
***************
*** 420,422 ****
--- 456,484 ----
  		}
  	}
  }
+ 
+ #if	NRAC > 0 || NTMSCP > 0
+ memaddr
+ _ioget(size)
+ 	u_int size;
+ 	{
+ 	register memaddr base;
+ 	register u_int csize;
+ 
+ 	csize = btoc(size);
+ 	size = ctob(csize);
+ 	if (size > _iosize)
+ 		return(0);
+ 	_iosize -= size;
+ 	base = _iobase;
+ 	_iobase += csize;
+ 	return(base);
+ 	}
+ 
+ ubadr_t
+ _iomap(addr)
+ 	register memaddr addr;
+ 	{
+ 	return(((ubadr_t)(addr - _iostart) << 6) + _ioumr);
+ 	}
+ #endif NRAC
*** /old/src/sys/pdp/machparam.h	Sun May 27 20:28:40 1990
--- /usr/src/sys/pdp/machparam.h	Wed Jan  8 22:48:06 1992
***************
*** 125,139 ****
  #define	USERMODE(ps)	(((ps) & PSL_USERSET) == PSL_USERSET)
  #define	BASEPRI(ps)	(((ps) & PSL_IPL) == 0)
  
- /*
-  * Very crude attempt to define the relative DELAY loop speeds of various
-  * processors.
-  */
- #ifdef PDP==44 || PDP==53 || PDP==70 || PDP==73 || PDP==83 || PDP==84
  #define	DELAY(n)	{ long N = ((long)(n))<<1; while (--N > 0); }
- #else
- #define	DELAY(n)	{ long N = (n); while (--N > 0); }
- #endif
  
  /*
   * Treat ps as byte, to allow restoring value from mfps/movb
--- 125,131 ----
***************
*** 141,151 ****
   */
  #define	PS_LOBYTE	((char *)0177776)
  #define	splx(ops)	(*PS_LOBYTE = ((char)(ops)))
- #define	SPLX(ops) { \
- 	if (BASEPRI(ops) && netisr) \
- 		netintr(); \
- 	splx(ops); \
- }
  
  /*
   * high int of a long
--- 133,138 ----
*** /old/src/sys/pdp/mch_dump.s	Fri Aug  4 14:59:46 1989
--- /usr/src/sys/pdp/mch_dump.s	Sat Jul  4 00:22:11 1992
***************
*** 4,9 ****
--- 4,10 ----
   * specifies the terms and conditions for redistribution.
   *
   *	@(#)mch_dump.s	1.1 (2.10BSD Berkeley) 2/10/87
+  *			1.2 (2.11BSD GTE) 7/03/92
   */
  #include "DEFS.h"
  #include "../machine/mch_iopage.h"
***************
*** 153,163 ****
  	 * reg 5 -- is used as an interation counter when mapping is enabled 
  	 */
  
! 	clr	r4			/ clear UB map used indicator
! 	cmp	_cputype,$44.		/ is a 44?
! 	beq	1f			/ yes, skip next
! 	cmp	_cputype,$70.		/ is a 70?
! 	bne	2f			/ not a 70 either, no UBMAP
  1:
  	/*
  	 * This section of code initializes the Unibus map registers and
--- 154,161 ----
  	 * reg 5 -- is used as an interation counter when mapping is enabled 
  	 */
  
! 	movb	_ubmap,r4		/ UB map used indicator
! 	beq	2f			/ no UBMAP - br
  1:
  	/*
  	 * This section of code initializes the Unibus map registers and
***************
*** 167,173 ****
  	 * Kernal I space 7 points to the I/O page.
  	 */
  
- 	inc	r4			/ indicate that UB mapping is needed
  	mov	$UBMR0,r1		/ point to  map register 0
  	clr	r2			/ init for low map reg
  	clr	r3			/ init for high map reg
--- 165,170 ----
***************
*** 241,253 ****
  	 * reg 5 -- is used as an interation counter when mapping is enabled
  	 */
  
! 	cmp	_cputype,$44.		/ is a 44?
! 	beq	1f			/ yes, skip next
! 	cmp	_cputype,$70.		/ is a 70?
! 	bne	2f			/ not a 70 either, no UBMAP
! 1:
! /	tst	_ubmap			/ unibus map present?
! /	beq	2f			/ no, skip map init
  
  	/*
  	 * This section of code initializes the Unibus map registers and
--- 238,245 ----
  	 * reg 5 -- is used as an interation counter when mapping is enabled
  	 */
  
! 	movb	_ubmap,setmap		/ unibus map present?
! 	beq	2f			/ no, skip map init
  
  	/*
  	 * This section of code initializes the Unibus map registers and
***************
*** 259,265 ****
  	 * Kernal I space 7 points to the I/O page.
  	 */
  
- 	inc	setmap			/ indicate that UB mapping is needed
  	mov	$UBMR0,r0		/ point to  map register 0
  	clr	r2			/ init for low map reg
  	clr	r3			/ init for high map reg
--- 251,256 ----
*** /old/src/sys/pdp/mch_start.s	Mon Jul  4 13:07:21 1988
--- /usr/src/sys/pdp/mch_start.s	Fri Jul  3 23:21:46 1992
***************
*** 4,9 ****
--- 4,10 ----
   * specifies the terms and conditions for redistribution.
   *
   *	@(#)mch_start.s	1.1 (2.10BSD Berkeley) 6/11/88
+  *			1.2 (2.11BSD GTE) 7/03/92
   */
  
  #include "DEFS.h"
***************
*** 15,20 ****
--- 16,22 ----
  	bit	$1,SSR0			/ is memory management enabled?
  	beq	.			/ better be !!!
  
+ 	mov	r0,_cputype		/ save cpu type passed by boot
  	/*
  	 * The following two instructions change the contents of the "sys"
  	 * instruction vector (034-037) to read:
***************
*** 64,69 ****
--- 66,73 ----
  	beq	1f
  	mov	$RB_SINGLE,r4		/   r4 = RB_SINGLE
  1:
+ 	mov	r1,_bootcsr		/ save boot controller csr
+ 	mov	r3,_bootdev		/ save boot device major,unit
  	mov	r4,_boothowto		/ save boot flags
  	mov	$_initflags+6,r2	/ get a pointer to the \0 in _initflags
  	mov	r4,r1			/ r1 = boot options
***************
*** 99,105 ****
   * Icode is copied out to process 1 to exec /etc/init.
   * If the exec fails, process 1 exits.
   */
! .globl	_initflags, _szicode, _boothowto
  
  ENTRY(icode)
  	mov	$argv-_icode,-(sp)
--- 103,109 ----
   * Icode is copied out to process 1 to exec /etc/init.
   * If the exec fails, process 1 exits.
   */
! .globl	_initflags, _szicode, _boothowto, _bootcsr, _bootdev
  
  ENTRY(icode)
  	mov	$argv-_icode,-(sp)
***************
*** 120,125 ****
--- 124,133 ----
  	_szicode-_icode
  _boothowto:
  	0				/ boot flags passed by boot
+ _bootdev:
+ 	0				/ boot major#,unit
+ _bootcsr:
+ 	0				/ csr of booting controller
  .text
  
  
***************
*** 131,136 ****
--- 139,149 ----
   * on any processor but still take advantage of hardware that is present.
   * This is also a plus for a site which wants to maintain one kernel for a
   * number of different processors.
+  *
+  * Might as well use the cpu type from /boot after all the hoops it jumped
+  * thru to figure it out.  No sense in duplicating that code here in the
+  * kernel.  /boot also stuffed the right bits into the MSCR register to 
+  * disable cache and unibus traps.
   */
  hardprobe:
  	mov	$1f,nofault
***************
*** 141,154 ****
  	/*
  	 * Test for SSR3 and UNIBUS map capability.  If there is no SSR3, the
  	 * first test of SSR3 will trap and we skip past the separate I/D test.
  	 */
! 	mov	$cputest,nofault
! #ifdef UNIBUS_MAP
  	bit	$40,SSR3
  	beq	1f
  	incb	_ubmap
  1:
- #endif
  
  #ifdef NONSEPARATE
  	/*
--- 154,166 ----
  	/*
  	 * Test for SSR3 and UNIBUS map capability.  If there is no SSR3, the
  	 * first test of SSR3 will trap and we skip past the separate I/D test.
+ 	 * 2.11BSD will be _seriously_ upset if I/D is not available!
  	 */
! 	mov	$2f,nofault
  	bit	$40,SSR3
  	beq	1f
  	incb	_ubmap
  1:
  
  #ifdef NONSEPARATE
  	/*
***************
*** 159,211 ****
  	bic	$1,SSR3
  #else
  	bit	$1,SSR3			/ Test for separate I/D capability
! 	beq	cputest
  	incb	_sep_id
  #endif
! 
! 	/*
! 	 * Try to find out what kind of cpu this is.  Defaults are 40 for
! 	 * nonseparate and 45 for separate.  Cputype will be one of: 24,
! 	 * 40, 60, 45, 44, 70, 73.
! 	 */
! cputest:
! #ifndef NONSEPARATE
! 	tstb	_sep_id
! 	beq	nonsepcpu
! 
! 	tstb	_ubmap			/ sep_id: 44, 45, 70, 73
! 	bne	1f
! 
! 	mov	$cpudone,nofault	/ sep_id && !ubmap: 45 or 73
! 	tst	*$PDP1170_MSER		/ mem sys err reg implies 73
! 	mov	$73.,_cputype
! 	bis	$CCR_DT,*$PDP1170_CCR	/ disable cache traps
! 	br	cpudone
! 1:
! 	mov	$1f,nofault		/ sep_id && ubmap: 44 or 70
! 	mfpt				/ if mfpt instruction exists, this is
! 	mov	$44.,_cputype		/   a 44
! 	bis	$CCR_DCPI,*$PDP1144_CCR	/ Disable cache parity interrupts.
! 	br	cpudone
! 1:
! 	mov	$70.,_cputype
! 	bis	$CCR_DUT|CCR_DT,*$PDP1170_CCR / Disable UNIBUS and nonfatal
! 	br	cpudone			/   traps.
! 
! nonsepcpu:
! #endif !NONSEPARATE
! 	tstb	_ubmap			/ !sep_id: 24, 40, 60
! 	bne	1f
! 
! 	mov	$cpudone,nofault	/ !sep_id && !ubmap: 40, 60
! 	tst	PDP1160_MSR
! 	mov	$60.,_cputype
! 	bis	$CCR_DT,*$PDP1160_CCR	/ Disable cache parity error traps.
! 	br	cpudone
! 1:
! 	mov	$24.,_cputype		/ !sepid && ubmap: 24
! 
! cpudone:
  		/ Test for stack limit register; set it if present.
  	mov	$1f,nofault
  	mov	$intstk-256.,STACKLIM
--- 171,180 ----
  	bic	$1,SSR3
  #else
  	bit	$1,SSR3			/ Test for separate I/D capability
! 	beq	2f
  	incb	_sep_id
  #endif
! 2:
  		/ Test for stack limit register; set it if present.
  	mov	$1f,nofault
  	mov	$intstk-256.,STACKLIM
*** /old/src/sys/pdp/mch_vars.s	Sat Sep  8 11:02:01 1990
--- /usr/src/sys/pdp/mch_vars.s	Sat Jul  4 00:26:50 1992
***************
*** 12,17 ****
--- 12,18 ----
  
  INT(GLOBAL, _fpp, 0)			/ we have a floating point processor
  INT(GLOBAL, _ubmap, 0)			/ we have a unibus map
+ INT(GLOBAL, _cputype, 0)		/ cpu type
  CHAR(GLOBAL, _sep_id, 0)		/ we have a separate I&D CPU
  
  #ifdef ENABLE34
***************
*** 19,25 ****
  #endif
  .even
  
- 
  /*
   * Define _ka6 and give it a reasonable initial value
   */
--- 20,25 ----
***************
*** 29,36 ****
  #	else
  		INT(GLOBAL, _ka6, KISA6)
  #	endif
- 
- 	INT(GLOBAL, _cputype, 40.)
  #else
  #	ifdef ENABLE34
  		INT(GLOBAL, _ka6, DEC_KDSA6)
--- 29,34 ----
***************
*** 37,46 ****
  #	else
  		INT(GLOBAL, _ka6, KDSA6)
  #	endif
- 
- 	INT(GLOBAL, _cputype, 45.)
  #endif
- 
  
  SPACE(GLOBAL, intstk, INTSTK)		/ temp stack while KDSA6 is unmapped
  CONST(GLOBAL, eintstk, intstk+INTSTK)	/ top of interuupt stack
--- 35,41 ----
*** /old/src/sys/pdp/mch_xxx.s	Wed Aug 15 20:31:32 1990
--- /usr/src/sys/pdp/mch_xxx.s	Wed Jan  8 22:46:23 1992
***************
*** 16,26 ****
   * happen between a pair of spl's in C.  We use noop rather than inserting
   * meaningless instructions between the spl's to prevent any future C
   * optimizer `improvements' from causing problems.
!  */
! ENTRY(noop)
! 	rts	pc			/ do absolutely nothing
! 
! /*
   * delay(usec)
   *	long	usec;
   *
--- 16,22 ----
   * happen between a pair of spl's in C.  We use noop rather than inserting
   * meaningless instructions between the spl's to prevent any future C
   * optimizer `improvements' from causing problems.
!  *
   * delay(usec)
   *	long	usec;
   *
***************
*** 32,37 ****
--- 28,34 ----
  	mov	2(sp),r0		/ r0 = hiint(usec)
  	mov	4(sp),r1		/ r1 = loint(usec)
  	ashc	$1,r0			/ sob's ~= 1/2 micro second,
+ 	beq	2f			/ oops, got passed a delay of 0L-leave
  	tst	r1
  	/*
  	 * If the low int of the loop counter is zero, the double sob loop
***************
*** 43,49 ****
  1:
  	sob	r1,1b			/ sit on our hands for a while ...
  	sob	r0,1b
! 9:
  	rts	pc
  
  /*
--- 40,47 ----
  1:
  	sob	r1,1b			/ sit on our hands for a while ...
  	sob	r0,1b
! 2:
! ENTRY(noop)
  	rts	pc
  
  /*
***************
*** 182,262 ****
  	SPLLOW				/ release interrupts and transfer back
  	mov	$1,r0			/   to setjmp return with a return
  	jmp	*(r1)+			/   value of 1
- 
- 
- #if PDP11 == GENERIC || PDP11 == 40
- /*
-  * s = spl<foo>()
-  *	int	s;
-  *
-  * spl's for machines (like 11/40) without spl or m[tf]ps instructions.
-  *
-  * Note that in the Berkeley system, calls to spl's except splx are
-  * substituted in line in the assembly code on machines with the spl
-  * instruction or mtps/mfps.  Splx is done by macros in param.h. See the
-  * makefile, :splfix.spl, :splfix.mtps, :splfix.movb and param.h.  Calls
-  * to __spl# (_spl# in C) are always expanded in-line and do not return
-  * the previous priority.
-  */
- ENTRY(spl0)
- 	movb	PS,r0
- 	clrb	PS
- 	rts	pc
- 
- ENTRY(spl1)
- ENTRY(splsoftclock)
- 	movb	PS,r0
- 	movb	$40,PS
- 	rts	pc
- 
- ENTRY(spl2)
- ENTRY(splnet)
- 	movb	PS,r0
- 	movb	$100,PS
- 	rts	pc
- 
- ENTRY(spl3)
- 	movb	PS,r0
- 	movb	$140,PS
- 	rts	pc
- 
- ENTRY(spl4)
- 	movb	PS,r0
- 	movb	$200,PS
- 	rts	pc
- 
- /*
-  * splimp() needs to be spl6 if the 3com ethernet board is present,
-  * as it interrupts at 6.
-  */
- #include "ec.h"
- 
- ENTRY(spl5)
- ENTRY(splbio)
- ENTRY(spltty)
- #if NEC == 0
- ENTRY(splimp)
- #endif
- 	movb	PS,r0
- 	movb	$240,PS
- 	rts	pc
- 
- ENTRY(spl6)
- ENTRY(splclock)
- #if NEC != 0
- ENTRY(splimp)
- #endif
- 	movb	PS,r0
- 	movb	$300,PS
- 	rts	pc
- 
- ENTRY(spl7)
- ENTRY(splhigh)
- 	movb	PS,r0
- 	movb	$HIPRI,PS
- 	rts	pc
- #endif
- 
  
  /*
   * struct uprof {			/ profile arguments
--- 180,185 ----
*** /old/src/sys/pdp/scb.s	Tue Aug 14 14:06:37 1990
--- /usr/src/sys/pdp/scb.s	Sun Dec 22 16:39:39 1991
***************
*** 16,21 ****
--- 16,22 ----
  #include "de.h"
  #include "dh.h"
  #include "dhu.h"
+ #include "dhv.h"
  #include "dn.h"
  #include "dr.h"
  #include "dz.h"
***************
*** 378,386 ****
  	HANDLER(dmintr)
  #endif
  
! #if NDHU > 0				/* DHU, DHV */
  	HANDLER(dhurint)
  	HANDLER(dhuxint)
  #endif
  
  #if NDN > 0				/* DN11 */
--- 379,392 ----
  	HANDLER(dmintr)
  #endif
  
! #if NDHU > 0				/* DHU */
  	HANDLER(dhurint)
  	HANDLER(dhuxint)
+ #endif
+ 
+ #if NDHV > 0				/* DHV */
+ 	HANDLER(dhvrint)
+ 	HANDLER(dhvxint)
  #endif
  
  #if NDN > 0				/* DN11 */
*** /old/src/sys/pdp/trap.c	Fri Aug  4 14:44:16 1989
--- /usr/src/sys/pdp/trap.c	Fri Feb  7 15:20:32 1992
***************
*** 94,100 ****
  	 * futher traps will be handled by looping in place.
  	 */
  	if (once_thru) {
! 		(void)splhigh();
  		for(;;);
  	}
  
--- 94,100 ----
  	 * futher traps will be handled by looping in place.
  	 */
  	if (once_thru) {
! 		(void) _splhigh();
  		for(;;);
  	}
  
***************
*** 254,260 ****
  			for(i = 0; i < 4; i++)
  				printf("%o ", MEMERRLO[i]);
  			printf("\n");
! 			MEMERRLO[2] = -1;
  			if (dev & USER) {
  				i = SIGBUS;
  				break;
--- 254,260 ----
  			for(i = 0; i < 4; i++)
  				printf("%o ", MEMERRLO[i]);
  			printf("\n");
! 			MEMERRLO[2] = MEMERRLO[2];
  			if (dev & USER) {
  				i = SIGBUS;
  				break;
***************
*** 355,362 ****
  	cnt.v_syscall++;
  #endif
  
- 	if (!USERMODE(ps))
- 		panic("syscall");
  	syst = u.u_ru.ru_stime;
  #ifndef NONFP
  	u.u_fpsaved = 0;
--- 355,360 ----
*** /old/src/sys/pdpdist/disktab	Wed Dec  5 19:25:33 1990
--- /usr/src/sys/pdpdist/disktab	Sun Jul 12 00:04:08 1992
***************
*** 31,50 ****
  # Drives on xp
  #
  
- # RM02/03:
- #
- # File system free list parameters (m/n):
- # RM02:
- # CPU	23	24	34	40	44	45	53	55
- # DISK
- # RM02	11/80	10/80	8/80	8/80	6/80	7/80	6/80	7/80
- # RM03	16/80	15/80	12/80	12/80	8/80	11/80	8/80	11/80
- #
- # CPU	60	70	73	83	84
- # DISK
- # RM02	7/80	5/80	6/80	6/80	5/80
- # RM03	11/80	7/80	9/80	9/80	7/80
- #
  rm02|RM02|rm03|RM03|DEC RM02/03:\
  	:ty=removable:ns#32:nt#5:nc#823:sf:\
  	:b0=/mdec/rm03uboot:\
--- 31,36 ----
***************
*** 57,72 ****
  	:ph#131522:bh#1024:fh#1024:
  
  # RM05:
- #
- # File system free list parameters (m/n):
- # CPU	23	24	34	40	44	45	53	55
- # DISK
- # RM05	16/304	15/304	12/304	12/304	8/304	11/304	8/304	11/304
- #
- # CPU	60	70	73	83	84
- # DISK
- # RM05	11/304	7/304	8/304	8/304	7/304
- #
  rm05|RM05|cdc9766|CDC9766|9766|DEC RM05, CDC 9766:\
  	:ty=removable:ns#32:nt#19:nc#823:sf:\
  	:b0=/mdec/rm05uboot:\
--- 43,48 ----
***************
*** 78,83 ****
--- 54,60 ----
  	:pf#152000:bf#1024:ff#1024:\
  	:pg#165826:bg#1024:fg#1024:\
  	:ph#500226:bh#1024:fh#1024:
+ 
  9775|CDC 9775:\
  	:ty=winchester:ns#32:nt#40:nc#842:sf:\
  	:pa#10240:ba#1024:fa#1024:\
***************
*** 90,107 ****
  	:ph#1072640:bh#1024:fh#1024:
  
  # EATON BR1537 or 1711 controller.  The CSR set looks like an RP03,
! # that's about all.  m/n are probably wrong for anything except
! # 44, 70 and 84.
  #
- # File system free list parameters (m/n):
- # CPU	23	24	34	40	44	45	53	55
- # DISK
- # BR	16/304	15/304	12/304	12/304	7/304	11/304	8/304	11/304
- #
- # CPU	60	70	73	83	84
- # DISK
- # BR	11/304	5/304	7/304	7/304	6/304
- #
  br1538d|BR1538D|EATON 1538D, 1711:\
  	:ty=removable:ns#32:nt#19:nc#815:so:\
  	:b0=/mdec/bruboot:\
--- 67,74 ----
  	:ph#1072640:bh#1024:fh#1024:
  
  # EATON BR1537 or 1711 controller.  The CSR set looks like an RP03,
! # that's about all.
  #
  br1538d|BR1538D|EATON 1538D, 1711:\
  	:ty=removable:ns#32:nt#19:nc#815:so:\
  	:b0=/mdec/bruboot:\
***************
*** 111,127 ****
  	:pd#232256:bd#4096:fd#1024:\
  	:ph#495520:bh#1024:fh#1024:
  
- # RP04/05/06:
- #
- # File system free list parameters (m/n):
- # CPU		23	24	34	40	44	45	53	55
- # DISK
- # RP04/05/06	11/209	10/209	8/209	8/209	6/209	7/209	6/209	7/209
- #
- # CPU		60	70	73	83	84
- # DISK
- # RP04/05/06	7/209	5/209	6/209	6/209	5/209
- #
  rp04|RP04|rp05|RP05|DEC RP04/05:\
  	:ty=removable:ns#22:nt#19:nc#411:sf:\
  	:b0=/mdec/hpuboot:\
--- 78,83 ----
***************
*** 129,134 ****
--- 85,91 ----
  	:pb#8778:bb#1024:fb#1024:\
  	:pc#153258:bc#1024:fc#1024:\
  	:pg#171650:bg#1024:fg#1024:
+ 
  rp06|RP06|DEC RP06:\
  	:ty=removable:ns#22:nt#19:nc#815:sf:\
  	:b0=/mdec/hpuboot:\
***************
*** 139,155 ****
  	:pe#322130:be#1024:fe#1024:\
  	:pg#171798:bg#1024:fg#1024:\
  	:ph#340522:bh#1024:fh#1024:
! 160|fuji|fuji160|Fujitsu 160:\
  	:ty=winchester:ns#32:nt#10:nc#823:sf:\
  	:b0=/mdec/si94uboot:\
  	:pa#9600:ba#1024:fa#1024:\
  	:pb#9600:bb#1024:fb#1024:\
  	:pc#244002:bc#1024:fc#1024:\
! 	:pd#125440:bd#1024:fd#1024:\
! 	:pe#118562:be#1024:fe#1024:\
! 	:pf#59520:bf#1024:ff#1024:\
! 	:pg#59042:bg#1024:fg#1024:\
  	:ph#263202:bh#1024:fh#1024:
  diva|DIVA|9300|Diva Comp V, Ampex 9300 (in direct mode):\
  	:ty=winchester:ns#33:nt#19:nc#815:sf:\
  	:b0=/mdec/dvhpuboot:\
--- 96,114 ----
  	:pe#322130:be#1024:fe#1024:\
  	:pg#171798:bg#1024:fg#1024:\
  	:ph#340522:bh#1024:fh#1024:
! 
! rm2x|160|fuji|fuji160|Fujitsu 160:\
  	:ty=winchester:ns#32:nt#10:nc#823:sf:\
  	:b0=/mdec/si94uboot:\
  	:pa#9600:ba#1024:fa#1024:\
  	:pb#9600:bb#1024:fb#1024:\
  	:pc#244002:bc#1024:fc#1024:\
! 	:pd#164800:bd#1024:fd#1024:\
! 	:pe#79360:be#1024:fe#1024:\
! 	:pf#39680:bf#1024:ff#1024:\
! 	:pg#39680:bg#1024:fg#1024:\
  	:ph#263202:bh#1024:fh#1024:
+ 
  diva|DIVA|9300|Diva Comp V, Ampex 9300 (in direct mode):\
  	:ty=winchester:ns#33:nt#19:nc#815:sf:\
  	:b0=/mdec/dvhpuboot:\
***************
*** 161,166 ****
--- 120,126 ----
  	:pf#156750:bf#1024:ff#1024:\
  	:pg#165996:bg#1024:fg#1024:\
  	:ph#510846:bh#1024:fh#1024:
+ 
  330|capricorn|Capricorn|Ampex Capricorn:\
  	:ty=winchester:ns#32:nt#16:nc#1024:sf:\
  	:pa#16384:ba#1024:fa#1024:\
***************
*** 171,176 ****
--- 131,137 ----
  	:pf#107008:bf#1024:ff#1024:\
  	:pg#179712:bg#1024:fg#1024:\
  	:ph#521728:bh#1024:fh#1024:
+ 
  si_eagle|SI_Eagle|2351|2351A|Fujitsu Eagle 2351A (48 sectors):\
  	:ty=winchester:ns#48:nt#20:nc#842:rm#3961:sf:\
  	:b0=/mdec/si51uboot:\
***************
*** 179,184 ****
--- 140,146 ----
  	:pc#474240:bc#1024:fc#1024:\
  	:pd#214080:bd#1024:fd#1024:\
  	:ph#803520:bh#1024:fh#1024:
+ 
  si9766|si9766|CDC 9766 on SI 9500 controller:\
  	:ty=removable:ns#32:nt#19:nc#823:sf:\
  	:b0=/mdec/si95uboot:\
***************
*** 191,210 ****
  	:pg#162786:bg#1024:fg#1024:\
  	:ph#497344:bh#1024:fh#1024:
  
- #
- # Disks for rk
- #
- # RK06/07:
- #
- # File system free list parameters (m/n):
- # CPU		23	24	34	40	44	45	53	55
- # DISK
- # RK06/07	8/33	7/33	6/33	6/33	4/33	5/33	4/33	5/33
- #
- # CPU		60	70	73	83	84
- # DISK
- # RK06/07	5/33	3/33	4/33	4/33	3/33
- #
  rk06|RK06|DEC RK06:\
  	:ty=removable:ns#22:nt#3:nc#411:sf:\
  	:b0=/mdec/hkuboot:\
--- 153,158 ----
***************
*** 223,265 ****
  	:pe#8316:be#1024:fe#1024:\
  	:pg#26978:bg#1024:fg#1024:\
  	:ph#53642:bh#1024:fh#1024:
! #
! # Disks for rl
! #
! # RL01/02:
! #
! # File system free list parameters (m/n):
! # CPU		23	24	34	40	44	45	53	55
! # DISK
! # RL01/2	7/10	6/10	6/10	6/10	4/10	5/10	4/10	5/10
! #
! # CPU		60	70	73	83	84
! # DISK
! # RL01/2	5/10	3/10	4/10	4/10	3/10
! #
  rl01|RL01|DEC RL01:\
  	:ty=removable:se#256:ns#40:nt#2:nc#256:\
  	:b0=/mdec/rluboot:\
  	:ph#20480:bh#1024:fh#1024:
  rl02|RL02|DEC RL02:\
  	:ty=removable:se#256:ns#40:nt#2:nc#512:\
  	:b0=/mdec/rluboot:\
  	:ph#40960:bh#1024:fh#1024:
  
- #
- # Disks for rk
- #
- # RK05:
- #
- # File system free list parameters (m/n):
- # CPU	23	24	34	40	44	45	53	55
- # DISK
- # RK05	4/12	4/12	3/12	3/12	2/12	3/12	2/12	3/12
- #
- # CPU	60	70	73	83	84
- # DISK
- # RK05	3/12	2/12	2/12	2/12	2/12
- #
  rk05|RK05|DEC RK05:\
  	:ty=removable:ns#12:nt#2:nc#203:bt=rkuboot:\
  	:b0=/mdec/rkuboot:\
--- 171,187 ----
  	:pe#8316:be#1024:fe#1024:\
  	:pg#26978:bg#1024:fg#1024:\
  	:ph#53642:bh#1024:fh#1024:
! 
  rl01|RL01|DEC RL01:\
  	:ty=removable:se#256:ns#40:nt#2:nc#256:\
  	:b0=/mdec/rluboot:\
  	:ph#20480:bh#1024:fh#1024:
+ 
  rl02|RL02|DEC RL02:\
  	:ty=removable:se#256:ns#40:nt#2:nc#512:\
  	:b0=/mdec/rluboot:\
  	:ph#40960:bh#1024:fh#1024:
  
  rk05|RK05|DEC RK05:\
  	:ty=removable:ns#12:nt#2:nc#203:bt=rkuboot:\
  	:b0=/mdec/rkuboot:\
***************
*** 268,286 ****
  #
  # Disks on a UDA50
  #
! 
! # RA60:
  #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RA60	21/84	21/84	17/84	17/84	12/84	15/84	12/84	15/84
  #
! # CPU	60	70	73	83	84
! # DISK
! # RA60	15/84	10/84	12/84	12/84	10/84
! #
! ra60|RA60|DEC RA60 Removable:\
  	:ty=removable:ns#42:nt#4:nc#2382:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
--- 190,211 ----
  #
  # Disks on a UDA50
  #
! # 7/11/92 - A new and more uniform partitioning scheme is present in the
! # MSCP driver.  For compatibility reasons the RA60, RA80, RA81, RD52 and
! # RD53 old style partitions were kept.  RC25 and RD51 drives use the new
! # method.  In the "complete" (as of this date at least) list added below
! # the RA60,80,81,82,RD52,53 entries are commented out.  If the new partition
! # setup is desired the ra.c driver has a table with entries for the old style
! # partition layout, simply delete the line with the drive type and edit this
! # file to delete the old entry and uncomment the new one, then reinstall this
! # file in /etc.  NOTE:  the RD54 partition sizes are the _same_ - all that is
! # needed is to use the 'g' partition rather than the 'c' partition.
  #
! # All NEW partition tables use 'c' as the whole drive now, more in keeping
! # with the 4BSD style.
  #
! 
! ra60|RA60|DEC RA60 Removable|OLD STYLE PARTITIONS:\
  	:ty=removable:ns#42:nt#4:nc#2382:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
***************
*** 291,308 ****
  	:pg#156570:bg#1024:fg#1024:\
  	:ph#399176:bh#1024:fh#1024:
  
! # RA80:
! #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RA80	16/217	16/217	13/217	13/217	9/217	11/217	9/217	11/217
! #
! # CPU	60	70	73	83	84
! # DISK
! # RA80	11/217	7/217	9/217	9/217	7/217
! #
! ra80|RA80|DEC RA80 Winchester:\
  	:ty=winchester:ns#31:nt#14:nc#559:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
--- 216,222 ----
  	:pg#156570:bg#1024:fg#1024:\
  	:ph#399176:bh#1024:fh#1024:
  
! ra80|RA80|DEC RA80 Winchester|OLD STYLE PARTITIONS:\
  	:ty=winchester:ns#31:nt#14:nc#559:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
***************
*** 310,327 ****
  	:pc#186888:bc#1024:fc#1024:\
  	:ph#236212:bh#1024:fh#1024:
  
! # RA81:
! #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RA81	26/357	26/357	21/357	21/357	14/357	18/357	14/357	17/357
! #
! # CPU	60	70	73	83	84
! # DISK
! # RA81	18/357	12/357	14/357	14/357	12/357
! #
! ra81|RA81|DEC RA81 Winchester:\
  	:ty=winchester:ns#51:nt#14:nc#1248:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
--- 224,230 ----
  	:pc#186888:bc#1024:fc#1024:\
  	:ph#236212:bh#1024:fh#1024:
  
! ra81|RA81|DEC RA81 Winchester|OLD STYLE PARTITIONS:\
  	:ty=winchester:ns#51:nt#14:nc#1248:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
***************
*** 332,426 ****
  	:pf#324382:bf#1024:ff#1024:\
  	:pg#647466:bg#1024:fg#1024:\
  	:ph#890072:bh#1024:fh#1024:
! ra82|RA82|DEC RA82 Winchester:\
! 	:ty=winchester:ns#58:nt#15:nc#1435:so:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#16720:bb#1024:fb#1024:\
! 	:pc#303710:bc#1024:fc#1024:\
! 	:pd#303710:bd#1024:fd#1024:\
! 	:pe#303710:be#1024:fe#1024:\
! 	:pf#303710:bf#1024:ff#1024:\
! 	:ph#1247450:bh#1024:fh#1024:
! #
! # Disks on KLESI
! #
! # RC25:
! #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RC25	15/31	15/31	13/31	13/31	9/31	11/31	9/31	11/31
! #
! # CPU	60	70	73	83	84
! # DISK
! # RC25	11/31	7/31	9/31	9/31	7/31
! #
! rc25|RC25:\
! 	:ty=winchester:ns#42:nt#4:nc#302:so:bt=rauboot:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
! 	:pb#10032:bb#1024:fb#1024:\
! 	:pc#24884:bc#1024:fc#1024:\
! 	:ph#50800:bh#1024:fh#1024:
! #
! #  Disks on RQDX Q-bus controllers
! #
! # RX50:
! #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RX50	1/5	1/5	1/5	1/5	1/5	1/5	1/5	1/5
! #
! # CPU	60	70	73	83	84
! # DISK
! # RX50	1/5	1/5	1/5	1/5	1/5
! #
! rx50|RX50|DEC RX50 floppy disk unit:\
! 	:ty=removable:ns#10:nt#1:nc#80:\
! 	:b0=/mdec/rauboot:\
! 	:ph#1638:bh#1024:fh#1024:
  
! #
! # RD51:
! #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RD51	1/36	1/36	1/36	1/36	1/36	1/36	1/36	1/36
! #
! # CPU	60	70	73	83	84
! # DISK
! # RD51	1/36	1/36	1/36	1/36	1/36
! #
! rd51|RD51|DEC RD51:\
! 	:ty=winchester:ns#18:nt#4:nc#300:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#9700:ba#1024:fa#1024:\
! 	:pe#7460:be#1024:fe#1024:\
! 	:pf#2240:bf#1024:ff#1024:\
! 	:pg#11868:bg#1024:fg#1024:\
! 	:ph#21568:bh#1024:fh#1024:
! #
! # RD52 and RD53:
! #
! # Note that interleaving factors are determined by controller (RQDX2 or
! # RQDX3) rather than disk type.  The names in the entries below are
! # combined with the controller so that newfs(8) can use the right
! # partition sizes and also look up the correct m/n numbers internally.
! #
! # File system free list parameters (m/n):
! # CPU		23	24	34	40	44	45	53	55
! # DISK
! # RQDX2*	2/36	2/36	2/36	2/36	2/36	2/36	2/36	2/36
! # RQDX3*	7/36	7/36	7/36	7/36	7/36	7/36	7/36	7/36
! #
! # CPU		60	70	73	83	84
! # DISK
! # RQDX2*	2/36	2/36	2/36	2/36	2/36
! # RQDX3*	7/36	7/36	7/36	7/36	7/36
! #
! rd52-rqdx2|RD52-RQDX2|rd52-rqdx3|RD52-RQDX3|DEC RD52:\
  	:ty=winchester:ns#18:nt#7:nc#480:so:\
  	:b0=/mdec/rauboot:\
  	:pa#9700:ba#1024:fa#1024:\
--- 235,254 ----
  	:pf#324382:bf#1024:ff#1024:\
  	:pg#647466:bg#1024:fg#1024:\
  	:ph#890072:bh#1024:fh#1024:
! 
! ra81x|RA81X|Extended DEC RA81 Winchester|OLD STYLE PARTITIONS:\
! 	:ty=winchester:ns#51:nt#14:nc#1815:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
! 	:pb#33440:bb#1024:fb#1024:\
! 	:pc#193282:bc#1024:fc#1024:\
! 	:pd#15884:bd#1024:fd#1024:\
! 	:pe#307200:be#1024:fe#1024:\
! 	:pf#728952:bf#1024:ff#1024:\
! 	:pg#1052036:bg#1024:fg#1024:\
! 	:ph#1294642:bh#1024:fh#1024:
  
! rd52|RD52|DEC RD52|OLD STYLE PARTITIONS:\
  	:ty=winchester:ns#18:nt#7:nc#480:so:\
  	:b0=/mdec/rauboot:\
  	:pa#9700:ba#1024:fa#1024:\
***************
*** 431,437 ****
  	:pf#2240:bf#1024:ff#1024:\
  	:pg#50748:bg#1024:fg#1024:\
  	:ph#60448:bh#1024:fh#1024:
! rd53-rqdx2|RD53-RQDX2|rd53-rqdx3|RD53-RQDX3|DEC RD53:\
  	:ty=winchester:ns#18:nt#8:nc#963:so:\
  	:b0=/mdec/rauboot:\
  	:pa#9700:ba#1024:fa#1024:\
--- 259,266 ----
  	:pf#2240:bf#1024:ff#1024:\
  	:pg#50748:bg#1024:fg#1024:\
  	:ph#60448:bh#1024:fh#1024:
! 
! rd53|RD53||DEC RD53|OLD STYLE PARTITIONS:\
  	:ty=winchester:ns#18:nt#8:nc#963:so:\
  	:b0=/mdec/rauboot:\
  	:pa#9700:ba#1024:fa#1024:\
***************
*** 442,466 ****
  	:pf#2240:bf#1024:ff#1024:\
  	:pg#128940:bg#1024:fg#1024:\
  	:ph#138640:bh#1024:fh#1024:
! rd54-rqdx3|RD54-RQDX3|DEC RD54:\
! 	:ty=winchester:ns#17:nt#15:nc#1226:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
  	:pb#16720:bb#1024:fb#1024:\
! 	:pc#278564:bc#1024:fc#1024:\
! 	:ph#311168:bh#1024:fh#1024:
! #
! # RX02 floppy disk drives
! #
! # File system free list parameters (m/n):
! # CPU	23	24	34	40	44	45	53	55
! # DISK
! # RX02	1/7	1/7	1/7	1/7	1/7	1/7	1/7	1/7
! #
! # CPU	60	70	73	83	84
! # DISK
! # RX02	1/7	1/7	1/7	1/7	1/7
! #
  rx02|RX02|DEC RX02:\
  	:ty=removable:se#128/256:ns#26:nt#1:nc#77:\
  	:pa#250:ba#1024:fa#1024:\
--- 271,588 ----
  	:pf#2240:bf#1024:ff#1024:\
  	:pg#128940:bg#1024:fg#1024:\
  	:ph#138640:bh#1024:fh#1024:
! 
! rc25|RC25|rcf25|RCF25|DEC RC25 and RC25F:\
! 	:ty=removable:ns#42:nt#4:nc#2382:so:\
  	:b0=/mdec/rauboot:\
  	:pa#15884:ba#1024:fa#1024:\
+ 	:pb#8360:bb#1024:fb#1024:\
+ 	:pc#50902:bc#1024:fc#1024:\
+ 	:pg#26658:bg#1024:fg#1024:
+ 
+ rd31|RD31|DEC RD31:\
+ 	:ty=winchester:ns#17:nt#4:nc#615:so:\
+ 	:b0=/mdec/rauboot:\
+ 	:pa#15884:ba#1024:fa#1024:\
+ 	:pb#8360:bb#1024:fb#1024:\
+ 	:pc#41560:bc#1024:fc#1024:\
+ 	:pg#17316:bg#1024:fg#1024:
+ 
+ rd32|RD32|DEC RD32:\
+ 	:ty=winchester:ns#17:nt#6:nc#820:so:\
+ 	:b0=/mdec/rauboot:\
+ 	:pa#15884:ba#1024:fa#1024:\
+ 	:pb#8360:bb#1024:fb#1024:\
+ 	:pc#83236:bc#1024:fc#1024:\
+ 	:pg#58992:bg#1024:fg#1024:
+ 
+ rd33|RD33|DEC RD33:\
+ 	:ty=winchester:ns#17:nt#7:nc#1170:so:\
+ 	:b0=/mdec/rauboot:\
+ 	:pa#15884:ba#1024:fa#1024:\
+ 	:pb#8360:bb#1024:fb#1024:\
+ 	:pc#138565:bc#1024:fc#1024:\
+ 	:pg#114321:bg#1024:fg#1024:
+ 
+ rd51|RD51|DEC RD51:\
+ 	:ty=winchester:ns#18:nt#4:nc#300:so:\
+ 	:b0=/mdec/rauboot:\
+ 	:pa#15884:ba#1024:fa#1024:\
+ 	:pb#5716:bb#1024:fb#1024:\
+ 	:pc#21600:bc#1024:fc#1024:
+ 
+ # rd52|RD52|DEC RD52|NEW STYLE PARTITIONS:\
+ # 	:ty=winchester:ns#18:nt#7:nc#480:so:\
+ # 	:b0=/mdec/rauboot:\
+ # 	:pa#15884:ba#1024:fa#1024:\
+ # 	:pb#8360:bb#1024:fb#1024:\
+ # 	:pc#60480:bc#1024:fc#1024:\
+ # 	:pg#36236:bg#1024:fg#1024:
+ 
+ # rd53|RD53|DEC RD53|NEW STYLE PARTITIONS:\
+ # 	:ty=winchester:ns#17:nt#8:nc#1024:so:\
+ # 	:b0=/mdec/rauboot:\
+ # 	:pa#15884:ba#1024:fa#1024:\
+ # 	:pb#8360:bb#1024:fb#1024:\
+ # 	:pc#138672:bc#1024:fc#1024:\
+ # 	:pg#114428:bg#1024:fg#1024:\
+ 
+ rd54|RD54|DEC RD54:\
+ 	:ty=winchester:ns#17:nt#15:nc#1221:so:\
+ 	:b0=/mdec/rauboot:\
+ 	:pa#15884:ba#1024:fa#1024:\
  	:pb#16720:bb#1024:fb#1024:\
! 	:pc#311200:bc#1024:fc#1024:\
! 	:pg#278596:bg#1024:fg#1024:
! 
! rx23|RX23|DEC RX23:\
! 	:ty=removable:ns#18:nt#2:nc#80:\
! 	:b0=/mdec/rauboot:\
! 	:pa#2880:ba#1024:fa#512:\
! 	:pc#2880:bc#1024:fc#512:
! 
! rx26|RX26|DEC RX26:\
! 	:ty=removable:ns#36:nt#2:nc#80:\
! 	:b0=/mdec/rauboot:\
! 	:pa#5760:ba#1024:fa#512:\
! 	:pc#5760:bc#1024:fc#512:
! 
! rx33|RX33|DEC RX33:\
! 	:ty=removable:ns#15:nt#2:nc#80:\
! 	:b0=/mdec/rauboot:\
! 	:pa#2400:ba#1024:fa#512:\
! 	:pc#2400:bc#1024:fc#512:
! 
! rx50|RX50|DEC RX50:\
! 	:ty=removable:ns#10:nt#1:nc#80:\
! 	:b0=/mdec/rauboot:\
! 	:pa#800:ba#1024:fa#512:\
! 	:pc#800:bc#1024:fc#512:
! 
! # ra60|RA60|DEC RA60|NEW STYLE PARTITIONS:\
! # 	:ty=removable:ns#42:nt#4:nc#2382:so:\
! # 	:b0=/mdec/rauboot:\
! # 	:pa#15884:ba#1024:fa#1024:\
! # 	:pb#16720:bb#1024:fb#1024:\
! # 	:pc#400176:bc#1024:fc#1024:\
! # 	:pd#245048:bd#1024:fd#1024:\
! # 	:pe#122524:be#1024:fe#1024:\
! # 	:pg#367572:bg#1024:fg#1024:\
! 
! ra70|RA70|DEC RA70:\
!         :ty=winchester:ns#33:nt#11:nc#1507:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#547041:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#287301:be#1024:fe#1024:\
!         :pg#514437:bg#1024:fg#1024:
! 
! ra71|RA71|DEC RA71:\
!         :ty=winchester:ns#51:nt#14:nc#1915:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#1367310:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
!         :ph#515506:bh#1024:fh#1024:
! 
! ra72|RA72|DEC RA72:\
!         :ty=winchester:ns#51:nt#20:nc#1915:so:\
!         :pa#15884:ba#1024:fa#1024:\
! 	:b0=/mdec/rauboot:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#1953300:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
!         :ph#1101496:bh#1024:fh#1024:
! 
! ra73|RA73|DEC RA73:\
!         :ty=winchester:ns#70:nt#21:nc#2667:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#3920490:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
!         :ph#3068686:bh#1024:fh#1024:
! 
! # ra80|RA80|DEC RA80|NEW STYLE PARTITIONS:\
! # 	:ty=winchester:ns#31:nt#14:nc#546:so:\
! # 	:b0=/mdec/rauboot:\
! # 	:pa#15884:ba#1024:fa#1024:\
! # 	:pb#16720:bb#1024:fb#1024:\
! # 	:pc#237212:bc#1024:fc#1024:\
! # 	:pg#204608:bg#1024:fg#1024:
! 
! # ra81|RA81|DEC RA81|NEW STYLE PARTITIONS:\
! # 	:ty=winchester:ns#51:nt#14:nc#1248:so:\
! # 	:b0=/mdec/rauboot:\
! # 	:pa#15884:ba#1024:fa#1024:\
! # 	:pb#16720:bb#1024:fb#1024:\
! # 	:pc#891072:bc#1024:fc#1024:\
! # 	:pd#227136:bd#1024:fd#1024:\
! # 	:pe#409600:be#1024:fe#1024:\
! # 	:pf#182464:bf#1024:ff#1024:\
! # 	:pg#819200:bg#1024:fg#1024:\
! # 	:ph#39268:bh#1024:fh#1024:
! 
! ra82|RA82|DEC RA82:\
! 	:ty=winchester:ns#57:nt#15:nc#1423:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#16720:bb#1024:fb#1024:\
! 	:pc#1216665:bc#1024:fc#1024:\
! 	:pd#227136:bd#1024:fd#1024:\
! 	:pe#409600:be#1024:fe#1024:\
! 	:pf#182464:bf#1024:ff#1024:\
! 	:pg#819200:bg#1024:fg#1024:\
! 	:ph#364861:bh#1024:fh#1024:
! 
! ra90|RA90|DEC RA90:\
! 	:ty=winchester:ns#69:nt#13:nc#2649:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#16720:bb#1024:fb#1024:\
! 	:pc#2376153:bc#1024:fc#1024:\
! 	:pd#227136:bd#1024:fd#1024:\
! 	:pe#409600:be#1024:fe#1024:\
! 	:pf#182464:bf#1024:ff#1024:\
! 	:pg#819200:bg#1024:fg#1024:\
! 	:ph#1524349:bh#1024:fh#1024:
! 
! ra92|RA92|DEC RA92:\
! 	:ty=winchester:ns#69:nt#13:nc#3279:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#16720:bb#1024:fb#1024:\
! 	:pc#2940951:bc#1024:fc#1024:\
! 	:pd#227136:bd#1024:fd#1024:\
! 	:pe#409600:be#1024:fe#1024:\
! 	:pf#182464:bf#1024:ff#1024:\
! 	:pg#819200:bg#1024:fg#1024:\
! 	:ph#2089147:bh#1024:fh#1024:
! 
! rz22|RZ22|DEC RZ22:\
! 	:ty=winchester:ns#33:nt#4:nc#776:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#8360:bb#1024:fb#1024:\
! 	:pc#102432:bc#1024:fc#1024:\
! 	:pg#78188:bg#1024:fg#1024:
! 
! rz23|RZ23|DEC RZ23:\
! 	:ty=winchester:ns#33:nt#8:nc#776:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#8360:bb#1024:fb#1024:\
! 	:pc#204864:bc#1024:fc#1024:\
! 	:pg#180620:bg#1024:fg#1024:\
! 
! rz23l|RZ23L|DEC RZ23L:\
! 	:ty=winchester:ns#39:nt#4:nc#1524:so:\
! 	:b0=/mdec/rauboot:\
! 	:pa#15884:ba#1024:fa#1024:\
! 	:pb#8360:bb#1024:fb#1024:\
! 	:pc#237588:bc#1024:fc#1024:\
! 	:pg#213344:bg#1024:fg#1024:\
! 
! rz24|RZ24|DEC RZ24:\
!         :ty=winchester:ns#38:nt#8:nc#1348:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#409792:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#150052:be#1024:fe#1024:\
!         :pg#377188:bg#1024:fg#1024:
! 
! rz24l|RZ24L|DEC RZ24L:\
!         :ty=winchester:ns#65:nt#4:nc#1818:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#479350:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#219610:be#1024:fe#1024:\
!         :pg#446746:bg#1024:fg#1024:
! 
! rz25|RZ25|DEC RZ25:\
!         :ty=winchester:ns#62:nt#9:nc#1476:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#832527:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#130590:bf#1024:ff#1024:\
!         :pg#799923:bg#1024:fg#1024:
! 
! rz26|RZ26|DEC RZ26:\
!         :ty=winchester:ns#57:nt#14:nc#2570:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#2050860:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
! 	:ph#1199056:bh#1024:fh#1024:
! 
! rz55|RZ55|DEC RZ55:\
!         :ty=winchester:ns#36:nt#15:nc#1224:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#649040:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#389300:be#1024:fe#1024:\
!         :pg#616436:bg#1024:fg#1024:
! 
! rz56|RZ56|DEC RZ56:\
!         :ty=winchester:ns#54:nt#15:nc#1632:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#1299174:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
!         :ph#447370:bh#1024:fh#1024:
! 
! rz57|RZ57|DEC RZ57:\
!         :ty=winchester:ns#71:nt#15:nc#1854:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16720:bb#1024:fb#1024:\
!         :pc#1954050:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
!         :ph#1102246:bh#1024:fh#1024:
! 
! rz58|RZ58|DEC RZ58:\
!         :ty=winchester:ns#85:nt#15:nc#2112:so:\
! 	:b0=/mdec/rauboot:\
!         :pa#15884:ba#1024:fa#1024:\
!         :pb#16270:bb#1024:fb#1024:\
!         :pc#2698061:bc#1024:fc#1024:\
!         :pd#227136:bd#1024:fd#1024:\
!         :pe#409600:be#1024:fe#1024:\
!         :pf#182464:bf#1024:ff#1024:\
!         :pg#819200:bg#1024:fg#1024:\
!         :ph#1846257:bh#1024:fh#1024:
  rx02|RX02|DEC RX02:\
  	:ty=removable:se#128/256:ns#26:nt#1:nc#77:\
  	:pa#250:ba#1024:fa#1024:\
*** /old/src/sys/pdpdist/dtab	Mon Aug 27 15:44:40 1990
--- /usr/src/sys/pdpdist/dtab	Sun Dec 22 16:20:35 1991
***************
*** 5,11 ****
  # dr	? 172410 124	5	drintr		# dr11-w (b-bus emulator)
  # dr	? 172430 130	5	drintr		# dr11-w (gc-bus emulator)
  # dr	? 172450 134	5	drintr		# dr11-w (em-2 interface)
! # du	? 160020 310	5	dhurint	dhuxint	# dhv/dhu11 terminal mux
  # dm	? 170500 310	4	dmintr		# dm11 dh modem control
  # dh	? 160020 320	5	dhrint	dhxint	# dh11 terminal mux
  # dz	? 160100 310	5	dzrint	dzdma	# dz11 terminal mux
--- 5,12 ----
  # dr	? 172410 124	5	drintr		# dr11-w (b-bus emulator)
  # dr	? 172430 130	5	drintr		# dr11-w (gc-bus emulator)
  # dr	? 172450 134	5	drintr		# dr11-w (em-2 interface)
! # du	? 160020 310	5	dhurint	dhuxint	# dhu11 terminal mux
! # dhv	? 160020 310	5	dhvrint	dhvxint	# dhv terminal mux
  # dm	? 170500 310	4	dmintr		# dm11 dh modem control
  # dh	? 160020 320	5	dhrint	dhxint	# dh11 terminal mux
  # dz	? 160100 310	5	dzrint	dzdma	# dz11 terminal mux
*** /old/src/sys/pdpif/if_qe.c	Wed Dec 19 10:21:40 1990
--- /usr/src/sys/pdpif/if_qe.c	Wed Jul 22 20:27:46 1992
***************
*** 903,908 ****
--- 903,909 ----
  	register i;
   
  	addr->qe_csr = QE_RESET;
+ 	addr->qe_csr &= ~QE_RESET;
  	sc->timeout = 0;
  	qesetup( sc );
  	for (i = 0, rp = sc->tring; i < NXMT; rp++, i++) {
*** /old/src/sys/pdpstand/M.s	Fri Aug 19 12:03:46 1988
--- /usr/src/sys/pdpstand/M.s	Sat Jul  4 00:03:21 1992
***************
*** 1,12 ****
  /
  /	SCCS id	@(#)M.s	1.7 (Berkeley)	7/11/83
  /
  / Startup code for two-stage bootstrap with support for autoboot.
! / Supports 11/40, 11/45, 11/70, 11/23, 11/23+I/O map (11/24), 11/73
! / and similar machines.
  
- systrap = 104400	/ trap 0
- 
  /  The boot options and device are placed in the last SZFLAGS bytes
  /  at the end of core by the kernel if this is an autoboot.
  /  The first-stage boot will leave them in registers for us;
--- 1,10 ----
  /
  /	SCCS id	@(#)M.s	1.7 (Berkeley)	7/11/83
+ /		@(#)M.s	3.0 (2.11BSD)	7/03/92 (sms@wlv.iipo.gtegsc.com)
  /
  / Startup code for two-stage bootstrap with support for autoboot.
! / Supports 11/45, 11/70, 11/53, 11/73, 11/83, 11/84, 11/93, 11/94
  
  /  The boot options and device are placed in the last SZFLAGS bytes
  /  at the end of core by the kernel if this is an autoboot.
  /  The first-stage boot will leave them in registers for us;
***************
*** 14,21 ****
  ENDCORE=	160000		/ end of core, mem. management off
  SZFLAGS=	6		/ size of boot flags
  BOOTOPTS=	2		/ location of options, bytes below ENDCORE
! BOOTDEV=	4
! CHECKWORD=	6
  
  .globl	_end
  .globl	_main,_ubmapset
--- 12,19 ----
  ENDCORE=	160000		/ end of core, mem. management off
  SZFLAGS=	6		/ size of boot flags
  BOOTOPTS=	2		/ location of options, bytes below ENDCORE
! BOOTDEV=	4		/ makedev(major,unit)
! CHECKWORD=	6		/ ~BOOTOPTS
  
  .globl	_end
  .globl	_main,_ubmapset
***************
*** 54,127 ****
  	mov	r4,_bootopts
  	mov	r3,_bootdev
  	mov	r2,_checkword
  /clobber any boot flags left in memory
  	clr	ENDCORE-BOOTOPTS
  	clr	ENDCORE-BOOTDEV
  	clr	ENDCORE-CHECKWORD
  /
! / determine what kind of cpu we are running on
! / first, check switches. if they are 40, 24, 44, 45, 70, or 73
! / set appropriately
! /
  	clrb	_sep_id
  	clrb	_ubmap
! 	clrb	_haveCSW
! 	mov	$2f,nofault	/ check if we even have switches!
! 	tst	*$SWREG
! 	clr	nofault		/ apparently we do
! 	incb	_haveCSW
! 	mov	$40.,r0
! 	cmp	*$SWREG,$40
! 	beq	gotcha
! 	cmp	*$SWREG,$24
! 	bne	1f
! 	mov	$24.,r0
! 	incb	_ubmap
! 	jbr	gotcha
! 1:
! 	cmp	*$SWREG,$45
! 	bne	1f
! 	mov	$45.,r0
! 	incb	_sep_id
! 	jbr	gotcha
! 1:
! 	cmp	*$SWREG,$70
! 	bne	2f
! 	mov	$70.,r0
! 	incb	_sep_id
! 	incb	_ubmap
! 	jbr	gotcha
! /
! / if we can't find out from switches,
! / explore and see what we find
! /
! 2:
! 	mov	$40.,r0		/ assume 11/40
! 	mov	$2f,nofault
! 	mov	*$KDSA6,r1	/ then we have sep i/d 45, 70, 73
! 	incb	_sep_id
! 	mov	$45.,r0
! 	mov	$3f,nofault
! 	mov	*$UBMAP,r1	/ then we have a unibus map. 44 or 70
! 	incb	_ubmap
! 	mov	$70.,r0
! 	mov	$1f,nofault
! 	mfpt			/ if mfpt instruction exists, this is
! 	mov	$44.,r0		/   a 44
! 	br	1f
! 3:				/ br here with sep i/d, no ubmap. 45 or 73.
! 	mov	$1f,nofault
! 	mov	*$MSCR,r1	/ if no MSCR, 45 !
! 	mov	$73.,r0		/ sep i/d, no ubmap, MSCR. 73!
! 	br	1f
! 2:				/ br here if no sep. I/D. 23, 24, 34, 40, 60
! 	mov	$1f,nofault
! 	mov	*$UBMAP,r1	/ then we have a unibus map
! 	incb	_ubmap
! 	mov	$24.,r0		/ unibus map, no sep. I/D = 24
! 1:	clr	nofault
! gotcha:
! 	mov	r0,_cputype
  
  /
  /	Set kernel I space registers to physical 0 and I/O page
--- 52,71 ----
  	mov	r4,_bootopts
  	mov	r3,_bootdev
  	mov	r2,_checkword
+ 	mov	r1,_bootcsr		/ 'boot' will apply ADJcsr[] correction
  /clobber any boot flags left in memory
  	clr	ENDCORE-BOOTOPTS
  	clr	ENDCORE-BOOTDEV
  	clr	ENDCORE-CHECKWORD
  /
! / determine what kind of cpu we are running on.  this was totally rewritten
! / when support for the 93 and 94 was added.
! 
  	clrb	_sep_id
  	clrb	_ubmap
! 	jsr	pc,cpuprobe	/ fill in _cputype, _ubmap and _sep_id
! 				/ also sets MSCR bits
! 	clr	nofault
  
  /
  /	Set kernel I space registers to physical 0 and I/O page
***************
*** 150,159 ****
  / physical addressing is completely reworked, 3*64Kb is probably the
  / highest we'll ever see boot relocated.  This means that the maximum size
  / of any program boot can load is 192Kb.  That size includes text, data
! / and bss.  This is a problem for the current (9/87) networking kernels
! / which have the networking code and data space incorporated as part of
! / the main line kernel.  Which only adds more impetus to get the networking
! / put into supervisor space ...
  
  N	= 3			/ 3*64Kb = 192Kb
  
--- 94,100 ----
  / physical addressing is completely reworked, 3*64Kb is probably the
  / highest we'll ever see boot relocated.  This means that the maximum size
  / of any program boot can load is 192Kb.  That size includes text, data
! / and bss.
  
  N	= 3			/ 3*64Kb = 192Kb
  
***************
*** 166,172 ****
  /
  /	If 11/40 class processor, only need set the I space registers
  /
! 	tstb	_sep_id
  	jeq	1f
  
  /
--- 107,113 ----
  /
  /	If 11/40 class processor, only need set the I space registers
  /
! 	movb	_sep_id, _ksep
  	jeq	1f
  
  /
***************
*** 189,195 ****
  
  1:
  / enable map
- 	clrb	_ksep
  	tstb	_ubmap
  	beq	2f
  	jsr	pc,_ubmapset	/ 24, 44, 70 -> ubmap
--- 130,135 ----
***************
*** 199,223 ****
  	br	1f
  3:
  	mov	$65,SSR3	/ 44, 70 -> ubmap, I/D
- 	incb	_ksep
- 	mov	$3,MSCR		/ 44, 70: $1: disable cache parity traps
- 				/ 44:     $2: ignored
- 				/ 70:     $2: disable UNIBUS traps
  	br	1f
  2:
  	tstb	_sep_id		/ 23, 34, 40, 45, 60, 73 -> no ubmap
  	beq	1f
  	mov	$25,SSR3	/ 45, 73 -> no ubmap, I/D; maybe 22-bit
- 	incb	_ksep
  1:
  	mov	$30340,PS
! 	inc	SSR0
  
- 
  / copy program to user I space
  	mov	$_end,r0
! 	asr	r0
! 	bic	$100000,r0
  	clr	r1
  1:
  	mov	(r1),-(sp)
--- 139,157 ----
  	br	1f
  3:
  	mov	$65,SSR3	/ 44, 70 -> ubmap, I/D
  	br	1f
  2:
  	tstb	_sep_id		/ 23, 34, 40, 45, 60, 73 -> no ubmap
  	beq	1f
  	mov	$25,SSR3	/ 45, 73 -> no ubmap, I/D; maybe 22-bit
  1:
  	mov	$30340,PS
! 	inc	SSR0		/ turn on memory management
  
  / copy program to user I space
  	mov	$_end,r0
! 	clc
! 	ror	r0
  	clr	r1
  1:
  	mov	(r1),-(sp)
***************
*** 224,240 ****
  	mtpi	(r1)+
  	sob	r0,1b
  
  
- / continue execution in user space copy; return protocol uses
- / absolute address 140000.
- 	mov	$140004,sp
- 	tstb	_sep_id
- 	bne	1f
- 	clr	*$KISA6
- 	br	2f
- 1:
- 	clr	*$KDSA6
- 2:
  	mov	$140340,-(sp)
  	mov	$user,-(sp)
  	rtt
--- 158,166 ----
  	mtpi	(r1)+
  	sob	r0,1b
  
+ / continue execution in user space copy.  No sense in loading sp with
+ / anything special since the call to _main below overwrites low core.
  
  	mov	$140340,-(sp)
  	mov	$user,-(sp)
  	rtt
***************
*** 257,269 ****
  
  	jsr	pc,_main
  	mov	_cputype,r0
  	mov	_bootopts,r4
  	mov	r4,r2
  	com	r2		/ checkword
! 	systrap
  
  	br	user
  
  setseg:
  	mov	$8,r0
  1:
--- 183,255 ----
  
  	jsr	pc,_main
  	mov	_cputype,r0
+ 	mov	_bootcsr,r1	/ csr of boot controller (from ROMs)
+ 	mov	_bootdev,r3	/ makedev(major,unit) (from ROMs & bootblock)
  	mov	_bootopts,r4
  	mov	r4,r2
  	com	r2		/ checkword
! 	mov	$160000,-(sp)	/ set ksp to very top so that the trap
! 	mtpi	sp		/ puts the return address and psw at 157774,6
! 	sys	0		/ can't use "trap" because that's a label
  
  	br	user
  
+ cpuprobe:
+ 	mov	$1f,nofault	/ catch possible trap
+ 	tst	*$UBMAP		/ look for unibus map
+ 	incb	_ubmap		/ we've got one, note that and continue on
+ 1:
+ 	mov	$1f,nofault
+ 	tst	*$KDSA6		/ look for split I/D
+ 	incb	_sep_id
+ 1:
+ 	mov	$nomfpt,nofault	/ catch possible fault from instruction
+ 	mfpt			/ 23/24, 44, and KDJ-11 have this instruction
+ 	cmp	r0,$1		/ 44?
+ 	bne	1f		/ no - br
+ 	mov	$1,*$MSCR	/ disable cache parity traps
+ 	mov	$44.,_cputype
+ 	rts	pc
+ 1:
+ 	cmp	r0,$5		/ KDJ-11?
+ 	bne	2f		/ no - br
+ 	mov	*$MAINT,r0	/ get system maint register
+ 	ash	$-4,r0		/ move down and
+ 	bic	$177760,r0	/  isolate the module id
+ 	mov	$1,*$MSCR	/ disable cache parity traps
+ 	movb	j11typ(r0),r0	/ lookup cpu type
+ 	movb	_ubmap,r1	/ unibus?
+ 	beq	1f		/ nope - br
+ 	bis	$2,*$MSCR	/ disable unibus traps
+ 1:
+ 	add	r1,r0		/ bump the cpu type (93 -> 94, 83 ->84)
+ 	br	out
+ 2:
+ 	cmp	r0,$3		/ 23 or 24?
+ 	bne	nomfpt		/ mfpt returned other than 1,3,5 - HELP!
+ 	mov	$23.,r0		/ assume 23
+ 	movb	_ubmap,r1	/ add in...
+ 	add	r1,r0		/ the unibus flag (23 -> 24)
+ 	br	out
+ nomfpt:
+ 	tstb	_sep_id		/ split I/D present?
+ 	beq	2f		/ no - br
+ 	mov	$45.,r0		/ assume 45
+ 	tstb	_ubmap		/ is that correct?
+ 	beq	out		/ yes - br
+ 	mov	$3,*$MSCR	/ disable unibus and cache traps
+ 	mov	$70.,r0
+ 	br	out
+ 2:
+ 	mov	$40.,r0		/ assume 40
+ 	mov	$out,nofault
+ 	tst	*$MSCR		/ 60 has MSCR, 40 doesn't
+ 	mov	$60.,r0
+ 	mov	$1,*$MSCR
+ out:
+ 	mov	r0,_cputype
+ 	rts	pc
+ 
  setseg:
  	mov	$8,r0
  1:
***************
*** 343,360 ****
  
  trap:
  	mov	*$PS,-(sp)
- 	mov	r0,-(sp)
- 	mov	r1,-(sp)
  	tst	nofault
  	bne	3f
  	jsr	pc,_trap
  	mov	(sp)+,r1
  	mov	(sp)+,r0
  	tst	(sp)+
  	rtt
! 3:	mov	(sp)+,r1
! 	mov	(sp)+,r0
! 	tst	(sp)+
  	mov	nofault,(sp)
  	rtt
  
--- 329,344 ----
  
  trap:
  	mov	*$PS,-(sp)
  	tst	nofault
  	bne	3f
+ 	mov	r0,-(sp)
+ 	mov	r1,-(sp)
  	jsr	pc,_trap
  	mov	(sp)+,r1
  	mov	(sp)+,r0
  	tst	(sp)+
  	rtt
! 3:	tst	(sp)+
  	mov	nofault,(sp)
  	rtt
  
***************
*** 364,403 ****
  SSR2	= 177576
  SSR3	= 172516
  KISA0	= 172340
- KISA1	= 172342
  KISA6	= 172354
- KISA7	= 172356
  KISD0	= 172300
  KISD7	= 172316
  KDSA0	= 172360
  KDSA6	= 172374
- KDSA7	= 172376
  KDSD0	= 172320
- KDSD5	= 172332
- SISA0	= 172240
- SISA1	= 172242
- SISD0	= 172200
- SISD1	= 172202
  UISA0	= 177640
  UISD0	= 177600
  UDSA0	= 177660
  UDSD0	= 177620
  MSCR	= 177746	/ 11/44/60/70 memory system cache control register
  IO	= 177600
- SWREG	= 177570
  UBMAP	= 170200
  
  .data
  .globl	_cputype
! .globl	_ksep, _sep_id, _ubmap, _haveCSW
! .globl	_bootopts, _bootdev, _checkword
  
  nofault:	.=.+2	/ where to go on predicted trap
! _cputype:	.=.+2	/ cpu type (currently 40,45 or 70)
  _sep_id:	.=.+1	/ 1 if we have separate I and D
- _ubmap:		.=.+1	/ 1 if we have a unibus map
- _haveCSW:	.=.+1	/ 1 if we have a console switch register
  _ksep:		.=.+1	/ 1 if kernel mode has sep I/D enabled
  _bootopts:	.=.+2	/ flags if an autoboot
! _bootdev:	.=.+2	/ device to get unix from, if not RB_ASKNAME
  _checkword:	.=.+2	/ saved r2, complement of bootopts if an autoboot
--- 348,380 ----
  SSR2	= 177576
  SSR3	= 172516
  KISA0	= 172340
  KISA6	= 172354
  KISD0	= 172300
  KISD7	= 172316
  KDSA0	= 172360
  KDSA6	= 172374
  KDSD0	= 172320
  UISA0	= 177640
  UISD0	= 177600
  UDSA0	= 177660
  UDSD0	= 177620
  MSCR	= 177746	/ 11/44/60/70 memory system cache control register
+ MAINT	= 177750	/ KDJ-11 system maintenance register
  IO	= 177600
  UBMAP	= 170200
  
  .data
  .globl	_cputype
! .globl	_ksep, _sep_id, _ubmap
! .globl	_bootopts, _bootdev, _checkword, _bootcsr
  
  nofault:	.=.+2	/ where to go on predicted trap
! _cputype:	.=.+2	/ cpu type
  _sep_id:	.=.+1	/ 1 if we have separate I and D
  _ksep:		.=.+1	/ 1 if kernel mode has sep I/D enabled
+ _ubmap:		.=.+2	/ 1 if we have a unibus map
  _bootopts:	.=.+2	/ flags if an autoboot
! _bootdev:	.=.+2	/ device booted from
! _bootcsr:	.=.+2	/ csr of device booted from
  _checkword:	.=.+2	/ saved r2, complement of bootopts if an autoboot
+ j11typ:	.byte 0, 73., 83., 0, 53., 93.
