Subject: kernel 'config', autoconfig, documentation changes (#96, 8 of 12) Index: sys,doc,etc,pdpif,.../many 2.11BSD Description: This is part 8 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/pdp/DEFS.h /usr/src/sys/pdp/conf.c /usr/src/sys/pdp/cpu.h /usr/src/sys/pdp/genassym.c /usr/src/sys/pdp/iopage.h /usr/src/sys/pdp/libc_ldiv.s /usr/src/sys/pdp/libc_lrem.s /usr/src/sys/pdp/machdep.c /usr/src/sys/pdp/machdep2.c /usr/src/sys/pdp/machparam.h /usr/src/sys/pdp/mch_backup.s /usr/src/sys/pdp/mch_click.s /usr/src/sys/pdp/mch_copy.s /usr/src/sys/pdp/mch_cpu.h /usr/src/sys/pdp/mch_csv.s /usr/src/sys/pdp/mch_dump.s /usr/src/sys/pdp/mch_fpsim.s /usr/src/sys/pdp/mch_profile.s /usr/src/sys/pdp/mch_start.s /usr/src/sys/pdp/mch_trap.s /usr/src/sys/pdp/mch_xxx.s /usr/src/sys/pdp/net_csv.s /usr/src/sys/pdp/net_mac.h /usr/src/sys/pdp/net_scb.s /usr/src/sys/pdp/net_xxx.s /usr/src/sys/pdp/scb.s /usr/src/sys/pdp/seg.h /usr/src/sys/pdp/trap.c References to UCB_NET have been replaced with INET. References to PDP11 have been removed. Those references which were related to the GENERIC kernel have been replaced with "#if defined(GENERIC)". The practice of defining all machine registers (PDP1170_xxx, PDP1144_yyy, etc) and then attempting to select the appropriate set based on "PDP11" has been done away with. This greatly reduced the size of several of the .h files (the extra defines were never used!). In conf.c the bdevsw[] table has been expanded to hold the 'd_psize' (partition size) member. This is used by the kernel to determine the amount of swap space at boot time. References to NOKA5 have been removed since SEG5 is presumed to always be used for data. References to NONFP have been removed because hardware FP is standard (the emulator does not work). References to UCB_RUSAGE have been removed because that feature is now standard. References to Q22 have been replace with run time checks for a Unibus Map. References to IDLE_DISPLAY have been removed because that feature is now standard. The delay() routine was added to the networking code so that network routines do not have to use the DELAY macro (which generates verbose code). The routine nextiv() was added to the kernel. This routine allocates the next available interrupt vector. The floating point simulator was modified to at least pass thru the assembler without errors. It still is not known to work. The initialization of the 'swapmap' was moved from machdep2.c to init_main.c because swap space determination is now done dynamically. The powerup logic has been repaired. There were two bugs. The delay was not long enough for devices to complete selftest, and the stack pointer was used to make a 'jsr' call when the registers (the stack pointer) had not been initialized. The preassignment of vectors for the DEQNA and DEQTA have been removed. The appropriate network drivers (if_qe.c and if_qt.c) now allocate their vectors dynamically at start up time. *** /usr/src/sys/pdp/DEFS.h.old Thu Jan 5 21:39:45 1989 --- /usr/src/sys/pdp/DEFS.h Sat Dec 26 17:30:48 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)DEFS.h 1.1 (2.10BSD Berkeley) 2/10/87 */ #ifndef _DEFS_ --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)DEFS.h 1.2 (2.11BSD GTE) 12/24/92 */ #ifndef _DEFS_ *************** *** 25,40 **** # define HIPRI 0340 #endif - #ifdef UCB_NET # define NET 02 # define NETPRI 0100 - #endif - /* * adapt to any 11 at boot */ ! #if PDP11 == GENERIC # undef NONSEPARATE /* Enable support for separate I&D if found */ #endif --- 25,37 ---- # define HIPRI 0340 #endif # define NET 02 # define NETPRI 0100 /* * adapt to any 11 at boot */ ! #ifdef GENERIC # undef NONSEPARATE /* Enable support for separate I&D if found */ #endif *************** *** 43,49 **** # define mtpd mtpi #endif ! #if PDP11 == GENERIC || defined(SUPERVISOR) || defined(NONSEPARATE) /* * GENERIC: movb instruction are available on all PDP-11s. * --- 40,46 ---- # define mtpd mtpi #endif ! #if defined(GENERIC) || defined(SUPERVISOR) || defined(NONSEPARATE) /* * GENERIC: movb instruction are available on all PDP-11s. * *************** *** 53,68 **** # define SPLHIGH movb $HIPRI,PS # define SPL7 movb $0340,PS # define SPLLOW clrb PS ! # ifdef UCB_NET ! # define SPLNET movb $NETPRI,PS ! # endif #else # define SPLHIGH spl HIGH # define SPL7 spl 7 # define SPLLOW spl 0 ! # ifdef UCB_NET ! # define SPLNET spl NET ! # endif #endif --- 50,61 ---- # define SPLHIGH movb $HIPRI,PS # define SPL7 movb $0340,PS # define SPLLOW clrb PS ! # define SPLNET movb $NETPRI,PS #else # define SPLHIGH spl HIGH # define SPL7 spl 7 # define SPLLOW spl 0 ! # define SPLNET spl NET #endif *** /usr/src/sys/pdp/conf.c.old Sun Dec 22 17:55:07 1991 --- /usr/src/sys/pdp/conf.c Wed Dec 23 20:45:18 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)conf.c 2.0 (2.11BSD Berkeley) 9/22/91 */ #include "param.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)conf.c 2.1 (2.11BSD Berkeley) 12/23/92 */ #include "param.h" *************** *** 23,33 **** --- 23,35 ---- #include "rk.h" #if NRK > 0 int rkopen(), rkstrategy(); + daddr_t rksize(); #define rkclose nulldev #else #define rkopen nodev #define rkclose nodev #define rkstrategy nodev + #define rksize NULL #endif #include "tm.h" *************** *** 43,48 **** --- 45,51 ---- #include "hk.h" #if NHK > 0 int hkopen(), hkstrategy(), hkroot(); + daddr_t hksize(); #define hkclose nulldev #else #define hkopen nodev *************** *** 49,59 **** --- 52,64 ---- #define hkclose nodev #define hkroot nulldev #define hkstrategy nodev + #define hksize NULL #endif #include "xp.h" #if NXPD > 0 int xpopen(), xpstrategy(), xproot(); + daddr_t xpsize(); #define xpclose nulldev #else #define xpopen nodev *************** *** 60,70 **** --- 65,77 ---- #define xpclose nodev #define xproot nulldev #define xpstrategy nodev + #define xpsize NULL #endif #include "br.h" #if NBR > 0 int bropen(), brstrategy(), brroot(); + daddr_t brsize(); #define brclose nulldev #else #define bropen nodev *************** *** 71,76 **** --- 78,84 ---- #define brclose nodev #define brroot nulldev #define brstrategy nodev + #define brsize NULL #endif #include "ht.h" *************** *** 86,91 **** --- 94,100 ---- #include "rl.h" #if NRL > 0 int rlopen(), rlstrategy(), rlroot(); + daddr_t rlsize(); #define rlclose nulldev #else #define rlroot nulldev *************** *** 92,97 **** --- 101,107 ---- #define rlopen nodev #define rlclose nodev #define rlstrategy nodev + #define rlsize NULL #endif #include "ts.h" *************** *** 117,122 **** --- 127,133 ---- #include "si.h" #if NSI > 0 int siopen(), sistrategy(), siroot(); + daddr_t sisize(); #define siclose nulldev #else #define siopen nodev *************** *** 123,133 **** --- 134,146 ---- #define siclose nodev #define siroot nulldev #define sistrategy nodev + #define sisize NULL #endif #include "ra.h" #if NRAC > 0 int rastrategy(), raroot(), raopen(); + daddr_t rasize(); #define raclose nulldev #else #define raopen nodev *************** *** 134,139 **** --- 147,153 ---- #define raclose nodev #define raroot nulldev #define rastrategy nodev + #define rasize nodev #endif #include "rx.h" *************** *** 159,189 **** struct bdevsw bdevsw[] = { /* ht = 0 */ ! htopen, htclose, htstrategy, nulldev, B_TAPE, /* tm = 1 */ ! tmopen, tmclose, tmstrategy, nulldev, B_TAPE, /* ts = 2 */ ! tsopen, tsclose, tsstrategy, nulldev, B_TAPE, /* ram = 3 */ ! ramopen, ramclose, ramstrategy, nulldev, 0, /* hk = 4 */ ! hkopen, hkclose, hkstrategy, hkroot, 0, /* ra = 5 */ ! raopen, raclose, rastrategy, raroot, 0, /* rk = 6 */ ! rkopen, rkclose, rkstrategy, nulldev, 0, /* rl = 7 */ ! rlopen, rlclose, rlstrategy, rlroot, 0, /* rx = 8 */ ! rxopen, rxclose, rxstrategy, nulldev, 0, /* si = 9 */ ! siopen, siclose, sistrategy, siroot, 0, /* xp = 10 */ ! xpopen, xpclose, xpstrategy, xproot, 0, /* br = 11 */ ! bropen, brclose, brstrategy, brroot, 0, /* tmscp = 12 (tu81/tk50) */ ! tmscpopen, tmscpclose, tmscpstrategy, nulldev, B_TAPE, }; int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]); --- 173,216 ---- struct bdevsw bdevsw[] = { /* ht = 0 */ ! htopen, htclose, htstrategy, nulldev, NULL, ! B_TAPE, /* tm = 1 */ ! tmopen, tmclose, tmstrategy, nulldev, NULL, ! B_TAPE, /* ts = 2 */ ! tsopen, tsclose, tsstrategy, nulldev, NULL, ! B_TAPE, /* ram = 3 */ ! ramopen, ramclose, ramstrategy, nulldev, NULL, ! 0, /* hk = 4 */ ! hkopen, hkclose, hkstrategy, hkroot, hksize, ! 0, /* ra = 5 */ ! raopen, raclose, rastrategy, raroot, rasize, ! 0, /* rk = 6 */ ! rkopen, rkclose, rkstrategy, nulldev, rksize, ! 0, /* rl = 7 */ ! rlopen, rlclose, rlstrategy, rlroot, rlsize, ! 0, /* rx = 8 */ ! rxopen, rxclose, rxstrategy, nulldev, NULL, ! 0, /* si = 9 */ ! siopen, siclose, sistrategy, siroot, sisize, ! 0, /* xp = 10 */ ! xpopen, xpclose, xpstrategy, xproot, xpsize, ! 0, /* br = 11 */ ! bropen, brclose, brstrategy, brroot, brsize, ! 0, /* tmscp = 12 (tu81/tk50) */ ! tmscpopen, tmscpclose, tmscpstrategy, nulldev, NULL, ! B_TAPE, }; int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]); *** /usr/src/sys/pdp/cpu.h.old Fri Jan 9 01:44:20 1987 --- /usr/src/sys/pdp/cpu.h Sat Dec 26 17:49:21 1992 *************** *** 3,152 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)cpu.h 1.1 (2.10BSD Berkeley) 12/1/86 */ ! #if PDP11 == 44 ! ! #define PDP1144_CMER ((physadr) 0177744) ! #define PDP1144_CCR ((physadr) 0177746) ! #define PDP1144_CMR ((physadr) 0177750) ! #define PDP1144_CHR ((physadr) 0177752) ! #define PDP1144_CDR ((physadr) 0177754) ! ! /* bits in cache memory error register */ ! #define CME_CMPE 0100000 /* cache memory parity error */ ! /* bits 14-8 are unused */ ! #define CME_PEHI 0000200 /* parity error high byte */ ! #define CME_PELO 0000100 /* parity error low byte */ ! #define CME_TPE 0000040 /* tag parity error */ ! /* bits 4-0 are unused */ ! #define CME_BITS \ ! "\10\20CMPE\10PEHI\7PELO\6TPE" ! ! /* bits in cache control register */ ! /* bits 15-14 are unused */ ! #define CCR_VSIU 0020000 /* valid store in use (read only) */ ! #define CCR_VCIP 0010000 /* valid clear in progress (read only) */ ! /* bit 11 is unused */ ! #define CCR_WWPT 0002000 /* write wrong parity tag */ ! #define CCR_UCB 0001000 /* unconditional cache bypass */ ! #define CCR_FC 0000400 /* flush cache (write only) */ ! #define CCR_PEA 0000200 /* parity error abort */ ! #define CCR_WWPD 0000100 /* write wrong parity data */ ! /* bits 5-4 are unused */ ! #define CCR_FMHI 0000010 /* force miss high */ ! #define CCR_FMLO 0000004 /* force miss low */ ! /* bit 1 is unused */ ! #define CCR_DCPI 0000001 /* disable cache parity interrupt */ ! #define CCR_BITS \ ! "\10\16VSIU\15VCIP\13WWPT\12UCB\11FC\10PEA\7WWPD\4FMHI\3FMLO\1DCPI" ! ! /* bits in cache maintenance register */ ! #define CMR_CMP1 0100000 /* compare 1 (write only) */ ! #define CMR_CMP2 0040000 /* compare 2 (write only) */ ! #define CMR_CMP3 0020000 /* compare 3 (write only) */ ! #define CMR_V 0010000 /* valid (write only) */ ! #define CMR_HPB 0004000 /* high parity bit (write only) */ ! #define CMR_LPB 0002000 /* low parity bit (write only) */ ! #define CMR_TPB 0001000 /* tag parity bit */ ! #define CMR_HIT 0000400 /* hit */ ! /* bits 7-5 are unused */ ! #define CMR_ESA 0000020 /* enable stop action */ ! #define CMR_AM 0000010 /* address matched */ ! #define CMR_EHA 0000004 /* enable halt action */ ! #define CMR_HODO 0000002 /* hit on destination only */ ! #define CMR_TDAR 0000001 /* tag data from address match register */ ! #define CMR_BITS \ ! "\10\20CMP1\17CMP2\16CMP3\15V\14HPB\13LPB\12TPB\11H\5ESA\4AM\3EHA\2HODO\1TDAR" ! ! #endif PDP11 == 44 ! ! #if PDP11 == 60 ! ! #define PDP1160_MSR ((physadr) 0177744) ! #define PDP1160_CCR ((physadr) 0177746) ! #define PDP1160_HMR ((physadr) 0177752) ! ! /* bits in memory system register */ ! #define MSR_CPUAB 0100000 /* cpu abort ! /* bits 14-8 are unused */ ! #define MSR_PEHI 0000200 /* high byte parity error */ ! #define MSR_PELO 0000100 /* low byte parity error */ ! #define MSR_TPE 0000040 /* tag parity error */ ! /* bits 4-0 are unused */ ! #define MSR_BITS \ ! "\10\20CPUAB\10PEHI\7PELO\6TPE" ! ! /* bits in cache control register */ ! /* bits 15-8 are unused */ ! #define CCR_CPEA 0000200 /* cache parity error abort */ ! #define CCR_WWP 0000100 /* write wrong parity */ ! /* bits 5-4 are unused */ ! #define CCR_FM1 0000010 /* force miss 1 */ ! #define CCR_FM2 0000004 /* force miss 2 */ ! /* bit 1 is unused */ ! #define CCR_DT 0000001 /* disable traps */ ! #define CCR_BITS \ ! "\10\10CPEA\7WWP\4FM1\3FM2\1DT" ! ! #endif PDP11 == 60 ! ! #if PDP11 == 70 ! #define PDP1170_LEAR ((physadr) 0177740) - #define PDP1170_HEAR ((physadr) 0177742) - #define PDP1170_MSER ((physadr) 0177744) - #define PDP1170_CCR ((physadr) 0177746) - #define PDP1170_CMR ((physadr) 0177750) - #define PDP1170_HMR ((physadr) 0177752) - #define PDP1170_LSR ((physadr) 0177760) - #define PDP1170_USR ((physadr) 0177762) - #define PDP1170_SID ((physadr) 0177764) - #define PDP1170_CPUER ((physadr) 0177766) - #define PDP1170_MBR ((physadr) 0177770) - - /* bits in memory system error register */ - #define MSER_CPUAB 0100000 /* cpu abort */ - #define MSER_CPUABAE 0040000 /* cpu abort after error */ - #define MSER_UPE 0020000 /* UNIBUS parity error */ - #define MSER_UMPE 0010000 /* UNIBUS multiple parity error */ - #define MSER_CPUER 0004000 /* cpu error */ - #define MSER_UE 0002000 /* UNIBUS error */ - #define MSER_CPUUA 0001000 /* cpu UNIBUS abort */ - #define MSER_EM 0000400 /* error in maintenance */ - #define MSER_DMG1 0000200 /* data memory group 1 */ - #define MSER_DMG0 0000100 /* data memory group 0 */ - #define MSER_AMG1 0000040 /* address memory group 1 */ - #define MSER_AMG0 0000020 /* address memory group 0 */ - #define MSER_MMOW 0000010 /* main memory odd word */ - #define MSER_MMEW 0000004 /* main memory even word */ - #define MSER_MMAPE 0000002 /* main memory address parity error */ - #define MSER_MMT 0000001 /* main memory timeout */ - #define MSER_BITS \ - "\10\20CPUAB\17CPUABAE\16UPE\15UMPE\14CPUER\13UE\12CPUUA\11EM\10DMG1\ - \7DMG0\6AMG1\5AMG0\4MMOW\3MMER\2MMAPE\1MMT" - - /* bits in cache control register */ - /* bits 15-6 are unused */ - #define CCR_FRG1 0000040 /* force replacement group 1 */ - #define CCR_FRG0 0000020 /* force replacement group 0 */ - #define CCR_FMG1 0000010 /* force miss group 1 */ - #define CCR_FMG0 0000004 /* force miss group 0 */ - #define CCR_DUT 0000002 /* disable UNIBUS traps */ - #define CCR_DT 0000001 /* disable traps */ - #define CCR_BITS \ - "\10\6FRG1\5FRG0\4FMG1\3FMG0\2DUT\1DT" - - /* bits in cpu error register */ - /* bits 15-8 are unused */ - #define CPUER_ILH 0000200 /* illegal halt */ - #define CPUER_OAE 0000100 /* odd address error */ - #define CPUER_NXM 0000040 /* nonexistent memory */ - #define CPUER_UTIMO 0000020 /* UNIBUS timeout */ - #define CPUER_YZSL 0000010 /* yellow zone stack limit */ - #define CPUER_RZSL 0000004 /* red zone stack limit */ - #define CPUER_BITS \ - "\10\10ILH\7OAE\6NXM\5UIMO\4YZSL\3RZSL" - - #endif PDP11 == 70 --- 3,15 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)cpu.h 1.2 (2.11BSD GTE) 12/26/92 */ ! /* ! * Define others as needed. The old practice of defining _everything_ ! * for _all_ models and then attempting to 'ifdef' the mess on a particular ! * cputype was simply too cumbersome (and didn't work when moving kernels ! * between cpu types). ! */ #define PDP1170_LEAR ((physadr) 0177740) *** /usr/src/sys/pdp/genassym.c.old Mon Jul 4 12:36:18 1988 --- /usr/src/sys/pdp/genassym.c Sat Dec 26 21:48:13 1992 *************** *** 47,52 **** --- 47,53 ---- printf("#define U_AR0 %o\n",&u->u_ar0); printf("#define U_CUROV %o\n",&u->u_ovdata.uo_curov); + printf("#define U_FPERR %o\n",&u->u_fperr); printf("#define U_FPREGS %o\n",&u->u_fps.u_fpregs[0]); printf("#define U_FPSR %o\n",&u->u_fps.u_fpsr); printf("#define U_OVBASE %o\n",&u->u_ovdata.uo_ovbase); *** /usr/src/sys/pdp/iopage.h.old Fri Jan 9 01:44:49 1987 --- /usr/src/sys/pdp/iopage.h Sat Dec 26 17:29:29 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)iopage.h 1.1 (2.10BSD Berkeley) 12/1/86 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)iopage.h 1.2 (2.11BSD GTE) 12/26/92 */ /* *************** *** 15,31 **** #define PIR ((u_short *) 0177772) #define CPUERR ((u_short *) 0177766) - #if PDP11 == 70 || PDP11 == GENERIC #define SYSSIZEHI ((u_short *) 0177762) #define SYSSIZELO ((u_short *) 0177760) - #endif - #if PDP11 == 44 || PDP11 == 70 || PDP11 == GENERIC #define MEMSYSCTRL ((u_short *) 0177746) #define MEMSYSERR ((u_short *) 0177744) #define MEMERRHI ((u_short *) 0177742) #define MEMERRLO ((u_short *) 0177740) - #endif /* Memory control registers (one per memory board) */ #define MEMSYSMCR ((u_short *) 0172100) --- 15,27 ---- *** /usr/src/sys/pdp/libc_ldiv.s.old Fri Sep 2 20:42:42 1988 --- /usr/src/sys/pdp/libc_ldiv.s Sat Dec 26 17:14:00 1992 *************** *** 5,11 **** */ #ifdef LIBC_SCCS ! <@(#)ldiv.s 2.3 (Berkeley) 8/23/88\0> .even #endif LIBC_SCCS --- 5,11 ---- */ #ifdef LIBC_SCCS ! <@(#)ldiv.s 2.4 (GTE) 12/26/92\0> .even #endif LIBC_SCCS *************** *** 18,24 **** */ #include "DEFS.h" ! #if !defined(KERNEL) && !defined(NONFP) /* * Ldiv for floating point hardware. Check for divide by zero. Don't want * floating divide trap in integer math. --- 18,24 ---- */ #include "DEFS.h" ! #if !defined(KERNEL) /* * Ldiv for floating point hardware. Check for divide by zero. Don't want * floating divide trap in integer math. *** /usr/src/sys/pdp/libc_lrem.s.old Fri Sep 2 20:42:54 1988 --- /usr/src/sys/pdp/libc_lrem.s Sat Dec 26 17:13:42 1992 *************** *** 5,11 **** */ #ifdef LIBC_SCCS ! <@(#)lrem.s 2.3 (Berkeley) 8/23/88\0> .even #endif LIBC_SCCS --- 5,11 ---- */ #ifdef LIBC_SCCS ! <@(#)lrem.s 2.4 (GTE) 12/26/92\0> .even #endif LIBC_SCCS *************** *** 18,24 **** */ #include "DEFS.h" ! #if !defined(KERNEL) && !defined(NONFP) /* * Lrem for floating point hardware. Check for divide by zero. Don't want * floating point divide trap in integer math. --- 18,24 ---- */ #include "DEFS.h" ! #if !defined(KERNEL) /* * Lrem for floating point hardware. Check for divide by zero. Don't want * floating point divide trap in integer math. *** /usr/src/sys/pdp/machdep.c.old Thu Jun 6 20:04:53 1991 --- /usr/src/sys/pdp/machdep.c Sun Jan 3 00:42:07 1993 *************** *** 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" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)machdep.c 2.1 (2.11BSD) 1/3/93 */ #include "param.h" *************** *** 146,153 **** regs[RPS] = scp->sc_ps; } - #ifdef UNIBUS_MAP - #define UMAPSIZ 10 struct mapent _ubmap[UMAPSIZ]; --- 146,151 ---- *************** *** 262,265 **** bp->b_flags &= ~B_UBAREMAP; } } - #endif /* UNIBUS_MAP */ --- 260,262 ---- *** /usr/src/sys/pdp/machdep2.c.old Sun Nov 17 09:20:10 1991 --- /usr/src/sys/pdp/machdep2.c Sun Jan 3 00:39:35 1993 *************** *** 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" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)machdep2.c 2.1 (2.11BSD) 1/1/93 */ #include "param.h" *************** *** 41,49 **** u_short _iosize = 2 * (1928 + 1096 + 128); /* enough for 2 TMSCP and 2 MSCP */ #endif - #ifndef NOKA5 segm seg5; /* filled in by initialization */ - #endif /* * Machine dependent startup code --- 41,47 ---- *************** *** 62,71 **** printf("\n%s\n", version); - #ifdef NOKA5 - if (&end > SEG5) - panic("_end > SEG5"); - #else saveseg5(seg5); /* must be done before clear() is called */ /* * REMAP_AREA is the start of possibly-mapped area, for consistency --- 60,65 ---- *************** *** 74,80 **** */ if (REMAP_AREA > SEG5) panic("remapped area > SEG5"); - #endif /* * Zero and free all of core: --- 68,73 ---- *************** *** 84,109 **** * heralded by the beginning of the I/O page (some people have dz's * at 0160000). On systems with a Unibus map, the last 256K of the * 4M address space is off limits since 017000000 to 017777777 is the ! * actual 18 bit Unibus address space. 896 is btoc(64K - 8K), 3968 ! * is btoc(256K - 8K), 61440 is btoc(4M - 256K), and 65408 is btoc(4M ! * - 8K). The 16 bit entry included only for completeness, don't use ! * it. * ! * If we're not on a UNIBUS machine and Q22 isn't defined we ! * artificially limit ourselves to 256K-8K to avoid problems of ! * 18-bit DMA disk or tape peripherals attached to 22-bit Q-BUS ! * machines. See extended notes in /sys/conf/GENERIC. */ - #define MAXCLICK_16 896 /* 16 bit UNIBUS or QBUS */ - #define MAXCLICK_18 3968 /* 18 bit UNIBUS or QBUS */ #define MAXCLICK_22U 61440 /* 22 bit UNIBUS (UNIBUS mapping) */ #define MAXCLICK_22 65408 /* 22 bit QBUS */ - #ifdef Q22 maxclick = ubmap ? MAXCLICK_22U : MAXCLICK_22; ! #else ! maxclick = ubmap ? MAXCLICK_22U : MAXCLICK_18; ! #endif i = freebase = *ka6 + USIZE; UISD[0] = ((stoc(1) - 1) << 8) | RW; for (;;) { --- 77,97 ---- * heralded by the beginning of the I/O page (some people have dz's * at 0160000). On systems with a Unibus map, the last 256K of the * 4M address space is off limits since 017000000 to 017777777 is the ! * actual 18 bit Unibus address space. 61440 is btoc(4M - 256K), ! * and 65408 is btoc(4M - 8K). * ! * Previous cautions about 18bit devices on a 22bit Qbus were misguided. ! * Since the GENERIC kernel was built with Q22 defined the limiting ! * effect on memory size was not achieved, thus an 18bit controller ! * could not be used to load the distribution. ALSO, the kernel ! * plus associated data structures do not leave enough room in 248kb ! * to run the programs necessary to do _anything_. */ #define MAXCLICK_22U 61440 /* 22 bit UNIBUS (UNIBUS mapping) */ #define MAXCLICK_22 65408 /* 22 bit QBUS */ maxclick = ubmap ? MAXCLICK_22U : MAXCLICK_22; ! i = freebase = *ka6 + USIZE; UISD[0] = ((stoc(1) - 1) << 8) | RW; for (;;) { *************** *** 230,243 **** printf("\n"); /* - * free up the swap map; the decrement is because you can't put - * zero into a resource map, therefore we offset everything by - * one. - */ - mfree(swapmap, nswap, (memaddr)1); - swplo--; - - /* * Initialize callouts */ callfree = callout; --- 218,223 ---- *************** *** 296,303 **** } #endif - #ifdef UNIBUS_MAP - /* * Re-initialize the Unibus map registers to statically map * the clists and buffers. Free the remaining registers for --- 276,281 ---- *************** *** 362,368 **** } #endif NRAC } - #endif UNIBUS_MAP int waittime = -1; --- 340,345 ---- *** /usr/src/sys/pdp/machparam.h.old Wed Jan 8 22:48:06 1992 --- /usr/src/sys/pdp/machparam.h Thu Dec 24 16:59:37 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)machparam.h 1.1 (2.10BSD Berkeley) 12/1/86 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)machparam.h 1.2 (2.11BSD GTE) 12/24/92 */ /* *************** *** 141,147 **** #define hiint(long) (((int *)&(long))[0]) #define loint(long) (((int *)&(long))[1]) - #ifdef UCB_NET /* * SUPERADD is used to distinguish a supervisor-mode address from a * kernel mode address to insure uniqueness over both address spaces. --- 141,146 ---- *************** *** 149,154 **** #define SUPERADD(add) ((int)(add)|01) #define KERNELADD(add) ((int)(add)&~01) #define ISSUPERADD(add) ((int)(add)&01) - #endif #endif ENDIAN --- 148,152 ---- *** /usr/src/sys/pdp/mch_backup.s.old Mon Jul 4 12:54:22 1988 --- /usr/src/sys/pdp/mch_backup.s Sat Dec 26 17:14:30 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_backup.s 1.1 (2.10BSD Berkeley) 2/10/87 */ #include "DEFS.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_backup.s 1.2 (2.11BSD GTE) 12/26/92 */ #include "DEFS.h" *************** *** 159,170 **** u0: / jmp, swab u5: / single op - #ifndef NONFP f5: / movei, movfi ff1: / ldfps ff2: / stfps ff3: / stst - #endif /* !NONFP */ mov r1,r0 br setreg --- 159,168 ---- *************** *** 244,250 **** t17: / floating point instructions - #ifndef NONFP clrb bflg mov r1,r0 swab r0 --- 242,247 ---- *************** *** 282,288 **** br f1 / movof ff0: / cfcc, setf, setd, seti, setl - #endif /* !NONFP */ u1: / br u2: / br --- 279,284 ---- *************** *** 313,319 **** asl r0 2: - #ifndef NONFP tstb fflg beq 3f asl r0 --- 309,314 ---- *************** *** 322,328 **** beq 3f asl r0 3: - #endif /* !NONFP */ bisb r0,r2 rts pc --- 317,322 ---- *** /usr/src/sys/pdp/mch_click.s.old Sat Jun 2 16:26:02 1990 --- /usr/src/sys/pdp/mch_click.s Fri Jan 1 16:17:57 1993 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_click.s 1.1 (2.10BSD Berkeley) 2/10/87 */ #include "DEFS.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_click.s 1.2 (2.11BSD GTE) 1/1/93 */ #include "DEFS.h" *************** *** 23,29 **** */ ENTRY(copy) jsr r5, csv ! #ifdef UCB_NET mov PS,-(sp) / have to lock out interrupts... bit $0340,(sp) / Are we currently at spl0? bne 1f --- 23,29 ---- */ ENTRY(copy) jsr r5, csv ! #ifdef INET mov PS,-(sp) / have to lock out interrupts... bit $0340,(sp) / Are we currently at spl0? bne 1f *************** *** 30,40 **** SPLNET / No, lock out network interrupts. 1: #endif - #if !defined(NOKA5) || defined(QUOTA) mov KDSA5,-(sp) / saveseg5(sp) mov KDSD5,-(sp) - #endif - mov 10(r5),r3 / r3 = count beq 3f / (exit early if zero) mov 4(r5),KDSA5 / seg5 = (src, 1 click read only) --- 30,37 ---- *************** *** 71,81 **** clr _kdsa6 mov r4,sp / back to normal stack 3: - #if !defined(NOKA5) || defined(QUOTA) mov (sp)+,KDSD5 / restorseg5(sp) mov (sp)+,KDSA5 ! #endif ! #ifdef UCB_NET mov (sp)+,PS / back to normal priority #endif jmp cret --- 68,76 ---- clr _kdsa6 mov r4,sp / back to normal stack 3: mov (sp)+,KDSD5 / restorseg5(sp) mov (sp)+,KDSA5 ! #ifdef INET mov (sp)+,PS / back to normal priority #endif jmp cret *************** *** 92,101 **** mov r4, sp / back to normal stack mov KDSA5, -(sp) / save seg5 and seg6 so we can come mov r0, -(sp) / back and finish later - #ifndef NOKA5 mov _seg5+SE_DESC, KDSD5 / normalseg5(); mov _seg5+SE_ADDR, KDSA5 / (restore all mapping) - #endif jsr pc, _runrtp / switch context and run rtpp / Now continue where we left off. mov (sp)+, r0 / KDSA6 --- 87,94 ---- *************** *** 130,139 **** mov (r0)+,(r1)+ sob r2,2b - #ifndef NOKA5 mov _seg5+SE_DESC, KDSD5 / normalseg5(); mov _seg5+SE_ADDR, KDSA5 / (restore all mapping) - #endif jmp cret #endif CGL_RTP --- 123,130 ---- *************** *** 148,157 **** */ ENTRY(clear) jsr r5, csv - #if !defined(NOKA5) || defined(QUOTA) mov KDSA5,-(sp) / saveseg5(sp) mov KDSD5,-(sp) - #endif mov 4(r5),KDSA5 / point KDSA5 at source mov $RW,KDSD5 / 64 bytes, read-write mov 6(r5),r3 / count --- 139,146 ---- *************** *** 174,192 **** inc KDSA5 / next click sob r3,1b 3: - #if !defined(NOKA5) || defined(QUOTA) mov (sp)+,KDSD5 / restore seg5 mov (sp)+,KDSA5 / restore seg5 - #endif jmp cret #ifdef CGL_RTP clrpreempt: mov KDSA5, -(sp) - #ifndef NOKA5 mov _seg5+SE_DESC, KDSD5 / normalseg5(); mov _seg5+SE_ADDR, KDSA5 / (restore all mapping) - #endif jsr pc, _runrtp / switch context and run rtpp /* * Now continue where we left off. --- 163,177 ---- *************** *** 197,203 **** #endif CGL_RTP ! #ifdef UCB_NET /* * copyv(fromaddr, toaddr, count) * virtual_addr fromaddr, --- 182,188 ---- #endif CGL_RTP ! #ifdef INET /* * copyv(fromaddr, toaddr, count) * virtual_addr fromaddr, *************** *** 270,276 **** 4: clr r0 / clear r0 and r1 (why?) rts pc / and return ! #endif UCB_NET /* --- 255,261 ---- 4: clr r0 / clear r0 and r1 (why?) rts pc / and return ! #endif /* *** /usr/src/sys/pdp/mch_copy.s.old Mon Jul 4 12:58:07 1988 --- /usr/src/sys/pdp/mch_copy.s Thu Dec 24 17:11:52 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_copy.s 1.1 (2.10BSD Berkeley) 4/10/88 */ #include "DEFS.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_copy.s 1.2 (2.11BSD GTE) 12/24/92 */ #include "DEFS.h" *************** *** 268,284 **** rts pc ! #ifdef UCB_NET /* * Kernel/Network copying routines. * * NOTE: ! * The cp(to|from)net functions operate atomically, at high ipl. ! * This is done mostly out of paranoia. If the cp(to|from)net ! * routines start taking up too much time at high IPL, then this ! * parnoia should probably be reconsidered. ! * ! * The m[ft]sd functions also operate at high ipl. This is done mostly * because it's simpler to do a ``mov $10340,PS'' than ``bic $30000,PS; * bis $10000,PS''. But these functions will never take up enough time * to cause anyone any problems. --- 268,279 ---- rts pc ! #ifdef INET /* * Kernel/Network copying routines. * * NOTE: ! * The m[ft]sd functions operate at high ipl. This is done mostly * because it's simpler to do a ``mov $10340,PS'' than ``bic $30000,PS; * bis $10000,PS''. But these functions will never take up enough time * to cause anyone any problems. *************** *** 286,351 **** * WARNING: * All functions assume that the segments in supervisor space * containing the source or target variables are never remapped. - */ - - #ifdef notdef /* not currently used */ - /* - * void - * cptonet(kfrom, nto, len) - * caddr_t kfrom; source address in kernel space - * caddr_t nto; destination address in supervisor space - * int len; number of bytes to copy * - * Copy words from the kernel to the network. Len must be even and both - * kfrom and nto must begin on an even word boundary. - */ - ENTRY(cptonet) - mov r2,-(sp) - mov PS,-(sp) - mov $10340,PS / set previous mode to supervisor - mov 6(sp),r0 / kfrom - mov 10(sp),r1 / nto - mov 12(sp),r2 / len - asr r2 / len/2 - 1: - mov (r0)+,-(sp) - mtpd (r1)+ - sob r2,1b - - mov (sp)+,PS - mov (sp)+,r2 - rts pc - - /* * void - * cpfromnet(nfrom, kto, len) - * caddr_t nfrom; source address in supervisor space - * caddr_t kto; destination address in kernel space - * int len; number of bytes to copy - * - * Copy words from the network to the kernel. Len must be even and both - * nfrom and kto must begin on an even word boundary. - */ - ENTRY(cpfromnet) - mov r2,-(sp) - mov PS,-(sp) - mov $10340,PS / set previous mode to supervisor - mov 6(sp),r0 / nfrom - mov 10(sp),r1 / kto - mov 12(sp),r2 / len - asr r2 / len/2 - 1: - mfpd (r0)+ - mov (sp)+,(r1)+ - sob r2,1b - - mov (sp)+,PS - mov (sp)+,r2 - rts pc - #endif /* notdef */ - - /* - * void * mtsd(addr, word) * caddr_t addr; destination address in supervisor space * int word word to store --- 281,288 ---- *************** *** 378,384 **** mov (sp)+,r0 / return value mov (sp)+,PS / restore psw rts pc / return ! #endif /* UCB_NET */ /* --- 315,321 ---- mov (sp)+,r0 / return value mov (sp)+,PS / restore psw rts pc / return ! #endif /* *** /usr/src/sys/pdp/mch_cpu.h.old Tue Feb 24 06:41:25 1987 --- /usr/src/sys/pdp/mch_cpu.h Sat Dec 26 17:49:56 1992 *************** *** 3,123 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_cpu.h 1.1 (2.10BSD Berkeley) 2/10/87 */ ! #define PDP1144_CMER 0177744 ! #define PDP1144_CCR 0177746 ! #define PDP1144_CMR 0177750 ! #define PDP1144_CHR 0177752 ! #define PDP1144_CDR 0177754 ! ! /* bits in cache memory error register */ ! #define CME_CMPE 0100000 /* cache memory parity error */ ! /* bits 14-8 are unused */ ! #define CME_PEHI 0000200 /* parity error high byte */ ! #define CME_PELO 0000100 /* parity error low byte */ ! #define CME_TPE 0000040 /* tag parity error */ ! /* bits 4-0 are unused */ ! ! /* bits in cache control register */ ! /* bits 15-14 are unused */ ! #define CCR_VSIU 0020000 /* valid store in use (read only) */ ! #define CCR_VCIP 0010000 /* valid clear in progress (read only) */ ! /* bit 11 is unused */ ! #define CCR_WWPT 0002000 /* write wrong parity tag */ ! #define CCR_UCB 0001000 /* unconditional cache bypass */ ! #define CCR_FC 0000400 /* flush cache (write only) */ ! #define CCR_PEA 0000200 /* parity error abort */ ! #define CCR_WWPD 0000100 /* write wrong parity data */ ! /* bits 5-4 are unused */ ! #define CCR_FMHI 0000010 /* force miss high */ ! #define CCR_FMLO 0000004 /* force miss low */ ! /* bit 1 is unused */ ! #define CCR_DCPI 0000001 /* disable cache parity interrupt */ ! ! /* bits in cache maintenance register */ ! #define CMR_CMP1 0100000 /* compare 1 (write only) */ ! #define CMR_CMP2 0040000 /* compare 2 (write only) */ ! #define CMR_CMP3 0020000 /* compare 3 (write only) */ ! #define CMR_V 0010000 /* valid (write only) */ ! #define CMR_HPB 0004000 /* high parity bit (write only) */ ! #define CMR_LPB 0002000 /* low parity bit (write only) */ ! #define CMR_TPB 0001000 /* tag parity bit */ ! #define CMR_HIT 0000400 /* hit */ ! /* bits 7-5 are unused */ ! #define CMR_ESA 0000020 /* enable stop action */ ! #define CMR_AM 0000010 /* address matched */ ! #define CMR_EHA 0000004 /* enable halt action */ ! #define CMR_HODO 0000002 /* hit on destination only */ ! #define CMR_TDAR 0000001 /* tag data from address match register */ ! ! #define PDP1160_MSR 0177744 ! #define PDP1160_CCR 0177746 ! #define PDP1160_HMR 0177752 ! ! /* bits in memory system register */ ! #define MSR_CPUAB 0100000 /* cpu abort ! /* bits 14-8 are unused */ ! #define MSR_PEHI 0000200 /* high byte parity error */ ! #define MSR_PELO 0000100 /* low byte parity error */ ! #define MSR_TPE 0000040 /* tag parity error */ ! /* bits 4-0 are unused */ ! ! /* bits in cache control register */ ! /* bits 15-8 are unused */ ! #define CCR_CPEA 0000200 /* cache parity error abort */ ! #define CCR_WWP 0000100 /* write wrong parity */ ! /* bits 5-4 are unused */ ! #define CCR_FM1 0000010 /* force miss 1 */ ! #define CCR_FM2 0000004 /* force miss 2 */ ! /* bit 1 is unused */ ! #define CCR_DT 0000001 /* disable traps */ ! ! #define PDP1170_LEAR 0177740 ! #define PDP1170_HEAR 0177742 ! #define PDP1170_MSER 0177744 ! #define PDP1170_CCR 0177746 ! #define PDP1170_CMR 0177750 ! #define PDP1170_HMR 0177752 ! #define PDP1170_LSR 0177760 ! #define PDP1170_USR 0177762 ! #define PDP1170_SID 0177764 ! #define PDP1170_CPUER 0177766 ! #define PDP1170_MBR 0177770 ! ! /* bits in memory system error register */ ! #define MSER_CPUAB 0100000 /* cpu abort */ ! #define MSER_CPUABAE 0040000 /* cpu abort after error */ ! #define MSER_UPE 0020000 /* UNIBUS parity error */ ! #define MSER_UMPE 0010000 /* UNIBUS multiple parity error */ ! #define MSER_CPUER 0004000 /* cpu error */ ! #define MSER_UE 0002000 /* UNIBUS error */ ! #define MSER_CPUUA 0001000 /* cpu UNIBUS abort */ ! #define MSER_EM 0000400 /* error in maintenance */ ! #define MSER_DMG1 0000200 /* data memory group 1 */ ! #define MSER_DMG0 0000100 /* data memory group 0 */ ! #define MSER_AMG1 0000040 /* address memory group 1 */ ! #define MSER_AMG0 0000020 /* address memory group 0 */ ! #define MSER_MMOW 0000010 /* main memory odd word */ ! #define MSER_MMEW 0000004 /* main memory even word */ ! #define MSER_MMAPE 0000002 /* main memory address parity error */ ! #define MSER_MMT 0000001 /* main memory timeout */ ! ! /* bits in cache control register */ ! /* bits 15-6 are unused */ ! #define CCR_FRG1 0000040 /* force replacement group 1 */ ! #define CCR_FRG0 0000020 /* force replacement group 0 */ ! #define CCR_FMG1 0000010 /* force miss group 1 */ ! #define CCR_FMG0 0000004 /* force miss group 0 */ ! #define CCR_DUT 0000002 /* disable UNIBUS traps */ ! #define CCR_DT 0000001 /* disable traps */ ! ! /* bits in cpu error register */ ! /* bits 15-8 are unused */ ! #define CPUER_ILH 0000200 /* illegal halt */ ! #define CPUER_OAE 0000100 /* odd address error */ ! #define CPUER_NXM 0000040 /* nonexistent memory */ ! #define CPUER_UTIMO 0000020 /* UNIBUS timeout */ ! #define CPUER_YZSL 0000010 /* yellow zone stack limit */ ! #define CPUER_RZSL 0000004 /* red zone stack limit */ --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_cpu.h 1.2 (2.11BSD GTE) 12/26/92 */ ! #define PDP1170_LEAR 0177740 /* See comments in pdp/cpu.h */ *** /usr/src/sys/pdp/mch_csv.s.old Mon Jul 4 13:00:18 1988 --- /usr/src/sys/pdp/mch_csv.s Thu Dec 24 17:13:31 1992 *************** *** 5,11 **** */ #if defined(LIBC_SCCS) && !defined(KERNEL) && !defined(SUPERVISOR) ! <@(#)csv.s 2.3 (Berkeley) 4/3/88\0> .even #endif --- 5,11 ---- */ #if defined(LIBC_SCCS) && !defined(KERNEL) && !defined(SUPERVISOR) ! <@(#)csv.s 2.4 (2.11BSD GTE) 12/24/92\0> .even #endif *************** *** 275,281 **** */ cmp r4,__ovno / current overlay same as old overlay? beq 1b / lucked out! ! #if defined(KERNEL) && defined(UCB_NET) cmp 2(r5),$Kretu / must always restore overlays if returning beq 3f / from SKcall #endif --- 275,281 ---- */ cmp r4,__ovno / current overlay same as old overlay? beq 1b / lucked out! ! #if defined(KERNEL) && defined(INET) cmp 2(r5),$Kretu / must always restore overlays if returning beq 3f / from SKcall #endif *** /usr/src/sys/pdp/mch_dump.s.old Sat Jul 4 00:22:11 1992 --- /usr/src/sys/pdp/mch_dump.s Thu Dec 24 17:14:48 1992 *************** *** 3,10 **** * All rights reserved. The Berkeley software License Agreement * 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" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_dump.s 1.3 (2.11BSD GTE) 12/24/92 */ #include "DEFS.h" #include "../machine/mch_iopage.h" *************** *** 29,35 **** mov KDSA5,(r0)+ rts pc ! #ifdef UCB_NET SPACE(GLOBAL, suprsav, 32) --- 28,34 ---- mov KDSA5,(r0)+ rts pc ! #ifdef INET SPACE(GLOBAL, suprsav, 32) *** /usr/src/sys/pdp/mch_fpsim.s.old Thu Jan 5 21:42:12 1989 --- /usr/src/sys/pdp/mch_fpsim.s Sat Dec 26 23:38:19 1992 *************** *** 17,26 **** * RIGHTS, APPROPRIATE COPYRIGHT LEGENDS MAY BE PLACED ON THE * DERIVATIVE WORK IN ADDITION TO THAT SET FORTH ABOVE. * ! * @(#)mch_fpsim.s 1.1 (2.10BSD Berkeley) 6/12/88 */ #include "DEFS.h" - #include "../machine/reg.h" /* * Kernel floating point simulator --- 17,25 ---- * RIGHTS, APPROPRIATE COPYRIGHT LEGENDS MAY BE PLACED ON THE * DERIVATIVE WORK IN ADDITION TO THAT SET FORTH ABOVE. * ! * @(#)mch_fpsim.s 1.2 (2.11BSD GTE) 12/26/92 */ #include "DEFS.h" /* * Kernel floating point simulator *************** *** 31,36 **** --- 30,36 ---- m.ext = 200 / long mode bit m.lngi = 100 / long integer mode + _u = 140000 / XXX uar0 = _u + U_AR0 / u.u_ar0 fec = _u + U_FPERR + F_FEC / u.u_fperr.f_fec fea = _u + U_FPERR + F_FEA / u.u_fperr.f_fea *************** *** 72,90 **** sr1 = -102 / int sr1; sr0 = -104 / int sr0; ! / make copies of all the registers - see reg.h for the offsets mov $sr0,r1 add r5,r1 ! mov uar0,r0 ! mov R0.*2(r0),(r1)+ / r0 ! mov R1.*2(r0),(r1)+ / r1 ! mov R2.*2(r0),(r1)+ / r2 ! mov R3.*2(r0),(r1)+ / r3 ! mov R4.*2(r0),(r1)+ / r4 ! mov R5.*2(r0),(r1)+ / r5 ! mov R6.*2(r0),(r1)+ / sp (r6) ! mov PC.*2(r0),(r1)+ / pc (r7) ! mov RPS.*2(r0),(r1)+ / psw / get the offending instruction mov spc(r5),r1 --- 72,88 ---- sr1 = -102 / int sr1; sr0 = -104 / int sr0; ! / make copies of all the registers - see trap.c (regloc) for the offsets mov $sr0,r1 add r5,r1 ! mov $_regloc,r3 / see trap.c ! mov $9.,r4 / r0,1,2,3,4,5,sp,pc,psw ! 1: ! movb (r3)+,r2 / fetch next register offset from u_ar0 ! asl r2 / make word index ! add uar0,r2 / add in u_ar0 ! mov (r2),(r1)+ / save register ! sob r4,1b / get the offending instruction mov spc(r5),r1 *************** *** 222,239 **** ret: / restore all the new register values - / see reg.h for the offsets. mov $sr0,r1; add r5,r1 ! mov uar0,r0 ! mov (r1)+,R0.*2(r0) / r0 ! mov (r1)+,R1.*2(r0) / r1 ! mov (r1)+,R2.*2(r0) / r2 ! mov (r1)+,R3.*2(r0) / r3 ! mov (r1)+,R4.*2(r0) / r4 ! mov (r1)+,R5.*2(r0) / r5 ! mov (r1)+,R6.*2(r0) / sp (r6) ! mov (r1)+,PC.*2(r0) / pc (r7) ! mov (r1)+,RPS.*2(r0) / psw bit $020,sps(r5) / Check to see if T bit was set. bne 1f mov spc(r5),r1 / Check the next instruction --- 220,235 ---- ret: / restore all the new register values mov $sr0,r1; add r5,r1 ! mov $_regloc,r3 ! mov $9.,r4 ! 1: ! movb (r3)+,r2 ! asl r2 ! add uar0,r0 ! mov (r1)+,(r0) ! sob r4,1b ! bit $020,sps(r5) / Check to see if T bit was set. bne 1f mov spc(r5),r1 / Check the next instruction *************** *** 559,569 **** .globl _grow, nofault PS = 177776 - mfpi = 6500^tst - mtpi = 6600^tst - mfpd = 106500^tst - mtpd = 106600^tst - spl = 230 ffuword: mov $1f,trapins(r5) --- 555,560 ---- *** /usr/src/sys/pdp/mch_profile.s.old Sat Apr 30 19:36:30 1988 --- /usr/src/sys/pdp/mch_profile.s Thu Dec 24 17:15:58 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_profile.s 1.1 (2.10BSD Berkeley) 2/10/87 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_profile.s 1.2 (2.11BSD GTE) 12/24/92 */ /* *************** *** 49,55 **** br 2f / and we're done 1: mov $010340,PS / set previous mode to supervisor ! #ifdef UCB_NET mov SISA2, -(sp) / save supervisor mapping mov SISD2, -(sp) mov SISA3, -(sp) --- 49,55 ---- br 2f / and we're done 1: mov $010340,PS / set previous mode to supervisor ! #ifdef INET mov SISA2, -(sp) / save supervisor mapping mov SISD2, -(sp) mov SISA3, -(sp) *************** *** 62,68 **** mfpi 40000(r0) / and increment 040000[r0] inc (sp) / (the rtt will reset the PS mtpi 40000(r0) / properly) ! #ifdef UCB_NET mov (sp)+, SISD3 mov (sp)+, SISA3 mov (sp)+, SISD2 --- 62,68 ---- mfpi 40000(r0) / and increment 040000[r0] inc (sp) / (the rtt will reset the PS mtpi 40000(r0) / properly) ! #ifdef INET mov (sp)+, SISD3 mov (sp)+, SISA3 mov (sp)+, SISD2 *** /usr/src/sys/pdp/mch_start.s.old Fri Jul 3 23:21:46 1992 --- /usr/src/sys/pdp/mch_start.s Thu Dec 24 17:16:54 1992 *************** *** 3,10 **** * All rights reserved. The Berkeley software License Agreement * 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" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_start.s 1.3 (2.11BSD GTE) 12/24/92 */ #include "DEFS.h" *************** *** 33,39 **** mov $USIZE-1\<8|RW,KDSD6 / Get a stack pointer (_u + 64*USIZE) mov $_u+[USIZE*64.],sp ! #ifdef UCB_NET /* * Initial set up for SUPERVISOR space networking: set SUPERVISOR * space as split I&D, set stack pointer and map user area and I/O --- 32,38 ---- mov $USIZE-1\<8|RW,KDSD6 / Get a stack pointer (_u + 64*USIZE) mov $_u+[USIZE*64.],sp ! #ifdef INET /* * Initial set up for SUPERVISOR space networking: set SUPERVISOR * space as split I&D, set stack pointer and map user area and I/O *** /usr/src/sys/pdp/mch_trap.s.old Mon Jul 4 13:11:19 1988 --- /usr/src/sys/pdp/mch_trap.s Sat Dec 26 19:05:40 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_trap.s 1.1 (2.10BSD Berkeley) 6/12/88 */ #include "DEFS.h" #include "../machine/mch_iopage.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_trap.s 2.1 (2.11BSD GTE) 12/24/92 */ #include "DEFS.h" #include "../machine/mch_iopage.h" *************** *** 71,77 **** bic $!37,(sp) / code = nps & 037 bis $30000,PS / force previous mode = user jsr pc,(r0) / call trap_handler ! #ifdef UCB_NET /* * Check for scheduled network service requests. The network sets * _knetisr to schedule network activity at a later time when the --- 71,77 ---- bic $!37,(sp) / code = nps & 037 bis $30000,PS / force previous mode = user jsr pc,(r0) / call trap_handler ! #ifdef INET /* * Check for scheduled network service requests. The network sets * _knetisr to schedule network activity at a later time when the *************** *** 144,150 **** rtt / and return from the trap ... ! #ifdef UCB_NET /* * iothndlr is used to allow the network in supervisor mode to make calls * to the kernel. --- 144,150 ---- rtt / and return from the trap ... ! #ifdef INET /* * iothndlr is used to allow the network in supervisor mode to make calls * to the kernel. *************** *** 213,222 **** #ifdef UCB_METER inc _cnt+V_OVLY / cnt.v_ovly++ #endif - #ifdef UCB_RUSAGE add $1,_u+U_RU+RU_OVLY+2 / u.u_ru.ru_ovly++ adc _u+U_RU+RU_OVLY - #endif jsr pc,_choverl / and get choverlay to bring the overlay in tst (sp)+ / toss choverlay's paramter, mov (sp)+,r1 / restore r0 and r1, --- 213,220 ---- *************** *** 279,292 **** * since memory management is off (hence we are in "data" space). */ powrup: ! clr r0 ! 1: ! sob r0,1b / pause a bit mov $RB_POWRFAIL,r4 / and try to reboot ... ! mov _rootdev,r3 ! jsr pc,hardboot /*NOTREACHED*/ - #ifndef KERN_NONSEP .text - #endif --- 277,307 ---- * since memory management is off (hence we are in "data" space). */ powrup: ! /* ! * Not sure why these are necessary except that on a 44 it appears ! * that the first instruction or two of a power up trap do not ! * execute properly. ! */ ! nop;nop;nop ! /* ! * The nested loop below gives 38 seconds of delay on a 11/44 (30 sec ! * on a 11/93) for controllers to complete selftest after power comes ! * back up. ! */ ! mov $400.,r0 ! 2: ! clr r1 ! 3: nop ! sob r1,3b ! sob r0,2b mov $RB_POWRFAIL,r4 / and try to reboot ... ! mov _bootdev,r3 ! /* ! * 'jsr' can not be used because there is no stack at the moment (battery ! * backup preserves memory but not registers). 'hardboot' sets up a stack ! * if it needs one, so it is not necessary to do that here. ! */ ! jmp *$hardboot /*NOTREACHED*/ .text *** /usr/src/sys/pdp/mch_xxx.s.old Wed Jan 8 22:46:23 1992 --- /usr/src/sys/pdp/mch_xxx.s Fri Jan 1 16:13:27 1993 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_xxx.s 1.1 (2.10BSD Berkeley) 6/12/88 */ #include "DEFS.h" #include "../machine/mch_iopage.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)mch_xxx.s 1.2 (2.11BSD GTE) 1/1/93 */ #include "DEFS.h" #include "../machine/mch_iopage.h" *************** *** 50,70 **** * Sit and wait for something to happen ... */ - #ifdef IDLE_DISPLAY /* ! * If you have a console display it's amusing to define IDLE_DISPLAY. If ! * your system is mostly idle, you'll see a slowly rotating sequence of ! * lights on the console display. If the system is very active the display * will appear blurred. */ INT(LOCAL, rdisply, 0377) / idle pattern INT(LOCAL, wcount, 2) / rotate rdisply every wcount calls - #endif /* IDLE_DISPLAY */ ENTRY(idle) mov PS,-(sp) / save current SPL, indicate that no mov $1,_noproc / process is running - #ifdef IDLE_DISPLAY dec wcount / if (--wcount <= 0) { bgt 1f mov $2,wcount / wcount = 2 --- 50,66 ---- * Sit and wait for something to happen ... */ /* ! * If you have a console display it's amusing to see a slowly rotating ! * sequence of lights in the display. If the system is very active the display * will appear blurred. */ INT(LOCAL, rdisply, 0377) / idle pattern INT(LOCAL, wcount, 2) / rotate rdisply every wcount calls ENTRY(idle) mov PS,-(sp) / save current SPL, indicate that no mov $1,_noproc / process is running dec wcount / if (--wcount <= 0) { bgt 1f mov $2,wcount / wcount = 2 *************** *** 74,80 **** bis $1,rdisply / rdisply |= 1 1: / } mov rdisply,r0 / wait displays contents of r0 - #endif /* IDLE_DISPLAY */ SPLLOW / set SPL low so we can be interrupted wait / wait for something to happen mov (sp)+,PS / restore previous SPL --- 70,75 ---- *************** *** 124,130 **** mov r4,(r0)+ mov r5,(r0)+ / frame pointer, mov sp,(r0)+ / stack pointer, ! #ifdef UCB_NET mov PS,-(sp) / network stack pointer, mov $010340,PS mfpd sp --- 119,125 ---- mov r4,(r0)+ mov r5,(r0)+ / frame pointer, mov sp,(r0)+ / stack pointer, ! #ifdef INET mov PS,-(sp) / network stack pointer, mov $010340,PS mfpd sp *************** *** 152,158 **** SPL7 / can't let anything in till we / (at least) get a valid stack ... mov r0,KDSA6 / map new process' u structure in ! #ifdef UCB_NET mov r0,SDSA6 / map supervisor stack area to same #endif mov (r1)+,r2 / restore register variables --- 147,153 ---- SPL7 / can't let anything in till we / (at least) get a valid stack ... mov r0,KDSA6 / map new process' u structure in ! #ifdef INET mov r0,SDSA6 / map supervisor stack area to same #endif mov (r1)+,r2 / restore register variables *************** *** 160,166 **** mov (r1)+,r4 mov (r1)+,r5 / frame pointer, mov (r1)+,sp / stack pointer, ! #ifdef UCB_NET mov PS,-(sp) / network stack pointer, mov $010340,PS mov (r1)+,-(sp) --- 155,161 ---- mov (r1)+,r4 mov (r1)+,r5 / frame pointer, mov (r1)+,sp / stack pointer, ! #ifdef INET mov PS,-(sp) / network stack pointer, mov $010340,PS mov (r1)+,-(sp) *************** *** 302,308 **** jsr pc,_mapin / r0 = buffer pointer tst (sp)+ - #ifndef NONFP tst _fpp / do we have floating point hardware? beq 2f / nope, use regular clr instructions --- 297,302 ---- *************** *** 319,325 **** ldfps (sp)+ / restore floating point status br 4f 2: - #endif /* !NONFP */ mov $MAXBSIZE\/8.,r1 / clear 8 bytes per loop 3: clr (r0)+ --- 313,318 ---- *************** *** 333,342 **** #else ! #ifndef NOKA5 ! mov _seg5+SE_DESC,KDSD5 / normalseg5() - a noop if NOKA5 mov _seg5+SE_ADDR,KDSA5 - #endif rts pc #endif --- 326,333 ---- #else ! mov _seg5+SE_DESC,KDSD5 / normalseg5(); mov _seg5+SE_ADDR,KDSA5 rts pc #endif *************** *** 446,455 **** /*NOTREACHED*/ 9: clr _hasmap / indicate mapping clear ! #ifndef NOKA5 ! mov _seg5+SE_DESC,KDSD5 / normalseg5() - a noop if NOKA5 mov _seg5+SE_ADDR,KDSA5 - #endif rts pc #endif --- 437,444 ---- /*NOTREACHED*/ 9: clr _hasmap / indicate mapping clear ! mov _seg5+SE_DESC,KDSD5 / normalseg5(); mov _seg5+SE_ADDR,KDSA5 rts pc #endif *************** *** 483,492 **** mov $USIZE-1\<8|RW,KDSD6 / yep, map it in, *KDSD6 = (USIZE, RW) mov _kdsa6,KDSA6 / *KDSA6 = kdsa6 9: ! #ifndef NOKA5 ! mov _seg5+SE_DESC,KDSD5 / normalseg5() mov _seg5+SE_ADDR,KDSA5 - #endif rts pc /* --- 472,479 ---- mov $USIZE-1\<8|RW,KDSD6 / yep, map it in, *KDSD6 = (USIZE, RW) mov _kdsa6,KDSA6 / *KDSA6 = kdsa6 9: ! mov _seg5+SE_DESC,KDSD5 / normalseg5(); mov _seg5+SE_ADDR,KDSA5 rts pc /* *************** *** 509,515 **** mov (r0),KDSA6 / *KDSA6 = map[1].se_addr rts pc - #ifndef NONFP /* * savfp(fps) * struct fps *fps; --- 496,501 ---- *************** *** 574,582 **** stst *2(sp) / simple, no? 1: rts pc - #endif /* !NONFP */ - /* * scanc(size, str, table, mask) * u_int size; --- 560,566 ---- *************** *** 634,636 **** --- 618,632 ---- mov (sp)+,r2 / restore registers 3: rts pc / and return size + + /* + * nextiv() + * + * Decrement _lastiv by size of a vector (4) and return the new value. + * Placed here for centralized access and easy calling from the networking + * (via SKcall) and 'autoconfig' (via ucall). + */ + ENTRY(nextiv) + sub $4,_lastiv / adjust last interrupt vector + mov _lastiv,r0 / put in right place for return value + rts pc / return assigned vector *** /usr/src/sys/pdp/net_csv.s.old Mon Jul 4 13:30:03 1988 --- /usr/src/sys/pdp/net_csv.s Thu Dec 24 17:18:13 1992 *************** *** 5,11 **** */ #if defined(LIBC_SCCS) && !defined(KERNEL) && !defined(SUPERVISOR) ! <@(#)csv.s 2.3 (Berkeley) 4/3/88\0> .even #endif --- 5,11 ---- */ #if defined(LIBC_SCCS) && !defined(KERNEL) && !defined(SUPERVISOR) ! <@(#)csv.s 2.4 (2.11BSD GTE) 12/24/92\0> .even #endif *************** *** 275,281 **** */ cmp r4,__ovno / current overlay same as old overlay? beq 1b / lucked out! ! #if defined(KERNEL) && defined(UCB_NET) cmp 2(r5),$Kretu / must always restore overlays if returning beq 3f / from SKcall #endif --- 275,281 ---- */ cmp r4,__ovno / current overlay same as old overlay? beq 1b / lucked out! ! #if defined(KERNEL) && defined(INET) cmp 2(r5),$Kretu / must always restore overlays if returning beq 3f / from SKcall #endif *** /usr/src/sys/pdp/net_mac.h.old Sat Sep 8 16:41:08 1990 --- /usr/src/sys/pdp/net_mac.h Sun Jan 3 00:56:21 1993 *************** *** 6,19 **** * %W% (Berkeley) %G% */ - #ifdef UNIBUS_MAP - int netubaa(); - #define NETUBAA(nregs) \ - SKcall(netubaa, sizeof(int), nregs) - #else - #define NETUBAA(nregs) (0) - #endif UNIBUS_MAP - struct socket *asoqremque(); #define ASOQREMQUE(so, n) \ KScall(asoqremque, sizeof(struct socket *) + sizeof(int), so, n) --- 6,11 ---- *** /usr/src/sys/pdp/net_scb.s.old Fri Sep 2 20:46:30 1988 --- /usr/src/sys/pdp/net_scb.s Tue Oct 13 21:03:26 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)net_scb.s 1.1 (2.10BSD Berkeley) 4/3/88 */ #include "acc.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)net_scb.s 1.2 (2.11BSD GTE) 10/13/92 */ #include "acc.h" *************** *** 12,17 **** --- 12,18 ---- #include "ec.h" #include "il.h" #include "qe.h" + #include "qt.h" #include "sri.h" #include "vv.h" *************** *** 49,54 **** --- 50,59 ---- #if NQE > 0 HANDLER(qeintr) + #endif + + #if NQT > 0 + HANDLER(qtintr) #endif #if NSRI > 0 *** /usr/src/sys/pdp/net_xxx.s.old Tue Sep 27 13:53:15 1988 --- /usr/src/sys/pdp/net_xxx.s Thu Oct 15 21:22:28 1992 *************** *** 3,14 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)net_xxx.s 1.1 (2.10BSD Berkeley) 4/3/88 */ #include "DEFS.h" #include "../machine/mch_iopage.h" /* * badaddr(addr, len) --- 3,43 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)net_xxx.s 1.2 (2.11BSD GTE) 10/15/92 */ #include "DEFS.h" #include "../machine/mch_iopage.h" + /* + * delay(usec) + * long usec; + * + * Delay (approximately) usec micro-seconds. It really isn't very acurrate + * since we can be interrupted and take much longer than we intended, but + * that's alright - we just don't want to come home early ... + * + * Copied to the networking from the kernel (mch_xxx.s) so the network could + * do delays (if_qt.c). + */ + ENTRY(delay) + 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 + * below will perform correctly, otherwise the high byte must be + * increment. + */ + beq 1f + inc r0 / correct for looping + 1: + sob r1,1b / sit on our hands for a while ... + sob r0,1b + 2: + rts pc /* * badaddr(addr, len) *** /usr/src/sys/pdp/scb.s.old Sun Dec 22 16:39:39 1991 --- /usr/src/sys/pdp/scb.s Fri Jan 1 16:19:56 1993 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)scb.s 1.1 (2.10BSD Berkeley) 7/8/88 */ #include "DEFS.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)scb.s 1.3 (2.11BSD GTE) 1/1/93 */ #include "DEFS.h" *************** *** 25,31 **** #include "ht.h" #include "il.h" #include "lp.h" - #include "qe.h" #include "ra.h" #include "rk.h" #include "rl.h" --- 25,30 ---- *************** *** 41,52 **** /* * Reference the global symbol "_end" so that ld(1) will define it for us. - * Checksys needs this so it can verify that NOKA5 isn't defined if the - * kernel's data space extends into segment five. */ .globl _end - sup = 40000 /* current supervisor previous kernel */ br4 = 200 /* PS interrupt priority masks */ br5 = 240 --- 40,48 ---- *************** *** 84,90 **** TRAP(trap, br7+T_BUSFLT) /* bus error */ TRAP(trap, br7+T_INSTRAP) /* illegal instruction */ TRAP(trap, br7+T_BPTTRAP) /* bpt-trace trap */ ! #ifdef UCB_NET TRAP(iothndlr, br7+T_IOTTRAP) /* network uses iot */ #else TRAP(trap, br7+T_IOTTRAP) /* iot trap */ --- 80,86 ---- TRAP(trap, br7+T_BUSFLT) /* bus error */ TRAP(trap, br7+T_INSTRAP) /* illegal instruction */ TRAP(trap, br7+T_BPTTRAP) /* bpt-trace trap */ ! #ifdef INET TRAP(iothndlr, br7+T_IOTTRAP) /* network uses iot */ #else TRAP(trap, br7+T_IOTTRAP) /* iot trap */ *************** *** 209,218 **** DEVTRAP(410, ecxint, sup|br6) #endif - #if NQE > 0 /* DEQNA */ - DEVTRAP(400, qeintr, sup|br5) - #endif - #if NSRI > 0 /* SRI DR11-C ARPAnet IMP */ DEVTRAP(500, srixint, sup|br5) DEVTRAP(504, srirint, sup|br5) --- 205,210 ---- *************** *** 222,228 **** /* * End of floating vectors. Endvec should be past vector space if NONSEP, * should be at least 450. ! */ SETDOT(1000) CONST(GLOBAL, endvec, .) --- 214,221 ---- /* * End of floating vectors. Endvec should be past vector space if NONSEP, * should be at least 450. ! * ! */ SETDOT(1000) CONST(GLOBAL, endvec, .) *************** *** 237,243 **** ova: .=.+40 /* overlay addresses */ ovd: .=.+40 /* overlay descriptors */ ! .text TEXTZERO: / base of system program text #ifndef KERN_NONSEP --- 230,253 ---- ova: .=.+40 /* overlay addresses */ ovd: .=.+40 /* overlay descriptors */ ! /* ! * FLASH! for overlaid programs /boot kindly lets us know where our ! * load image stops by depositing a value at the end of the overlay tables. ! * Needless to say this had been clobbering something all along, but the ! * effect was rather nasty (crash) when the 'last interrupt vector' location ! * was overwritten! Not sure whether to fix /boot or leave room here, so ! * for now just add a "pad" word. ! */ ! INT(LOCAL, physend, 0) ! ! /* ! * _lastiv is used for assigning vectors to devices which have programmable ! * vectors. Usage is to decrement _lastiv by 4 before use. The routine ! * _nextiv (in mch_xxx.s) will do this, returning the assigned vector in r0. ! */ ! INT(GLOBAL, _lastiv, endvec) ! ! .text TEXTZERO: / base of system program text #ifndef KERN_NONSEP *** /usr/src/sys/pdp/seg.h.old Sat Jun 2 16:30:40 1990 --- /usr/src/sys/pdp/seg.h Fri Jan 1 16:20:56 1993 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)seg.h 1.1 (2.10BSD Berkeley) 12/1/86 */ #ifndef _SEG_ --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)seg.h 1.2 (2.11BSD GTE) 1/1/93 */ #ifndef _SEG_ *************** *** 157,168 **** #endif /* restore normal kernel map for seg5. */ - #ifdef NOKA5 - # define normalseg5() - #else extern segm seg5; /* prototype KDSA5, KDSD5 */ ! # define normalseg5() restorseg5(seg5) ! #endif /* restore the previous contents of KDSA5/KDSD5. */ #ifdef SUPERVISOR --- 157,164 ---- #endif /* restore normal kernel map for seg5. */ extern segm seg5; /* prototype KDSA5, KDSD5 */ ! #define normalseg5() restorseg5(seg5) /* restore the previous contents of KDSA5/KDSD5. */ #ifdef SUPERVISOR *** /usr/src/sys/pdp/trap.c.old Fri Feb 7 15:20:32 1992 --- /usr/src/sys/pdp/trap.c Sat Dec 26 19:05:02 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)trap.c 1.1 (2.10BSD Berkeley) 6/12/88 */ #include "param.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)trap.c 1.2 (2.11BSD GTE) 12/24/92 */ #include "param.h" *************** *** 20,26 **** extern int fpp; ! #ifdef UCB_NET extern int netoff; #endif --- 20,26 ---- extern int fpp; ! #ifdef INET extern int netoff; #endif *************** *** 101,107 **** if (USERMODE(ps)) dev |= USER; else ! #ifdef UCB_NET if (SUPVMODE(ps)) dev |= SUPV; else --- 101,107 ---- if (USERMODE(ps)) dev |= USER; else ! #ifdef INET if (SUPVMODE(ps)) dev |= SUPV; else *************** *** 109,117 **** savemap(kernelmap); /* guarantee normal kernel mapping */ syst = u.u_ru.ru_stime; p = u.u_procp; - #ifndef NONFP u.u_fpsaved = 0; - #endif u.u_ar0 = &r0; switch(minor(dev)) { --- 109,115 ---- *************** *** 140,149 **** printf("aps = %o\n", &ps); printf("pc = %o, ps = %o\n", pc, ps); printf("__ovno = %d\n", ov); - #if PDP11 == 44 || PDP11 == 70 || PDP11 == GENERIC if ((cputype == 70) || (cputype == 44)) printf("cpuerr = %o\n", *CPUERR); - #endif printf("trap type %o\n", dev); splx(i); panic("trap"); --- 138,145 ---- *************** *** 200,206 **** i = SIGEMT; break; - #ifndef NONFP /* * Since the floating exception is an imprecise trap, a user * generated trap may actually come from kernel mode. In this --- 196,201 ---- *************** *** 207,213 **** * case, a signal is sent to the current process to be picked * up later. */ ! #ifdef UCB_NET case T_ARITHTRAP+SUPV: #endif case T_ARITHTRAP: --- 202,208 ---- * case, a signal is sent to the current process to be picked * up later. */ ! #ifdef INET case T_ARITHTRAP+SUPV: #endif case T_ARITHTRAP: *************** *** 216,222 **** stst(&u.u_fperr); /* save error code and address */ u.u_code = pdpfec[(unsigned)u.u_fperr.f_fec & 0xf]; break; - #endif /* * If the user SP is below the stack segment, grow the stack --- 211,216 ---- *************** *** 238,244 **** break; } - #if PDP11 == 44 || PDP11 == 70 || PDP11 == GENERIC /* * The code here is a half-hearted attempt to do something with * all of the PDP11 parity registers. In fact, there is little --- 232,237 ---- *************** *** 246,252 **** */ case T_PARITYFLT: case T_PARITYFLT + USER: ! #ifdef UCB_NET case T_PARITYFLT + SUPV: #endif printf("parity\n"); --- 239,245 ---- */ case T_PARITYFLT: case T_PARITYFLT + USER: ! #ifdef INET case T_PARITYFLT + SUPV: #endif printf("parity\n"); *************** *** 262,268 **** } panic("parity"); /*NOTREACHED*/ - #endif /* * Allow process switch --- 255,260 ---- *************** *** 269,275 **** */ case T_SWITCHTRAP + USER: goto out; ! #ifdef UCB_NET case T_BUSFLT+SUPV: case T_INSTRAP+SUPV: case T_BPTTRAP+SUPV: --- 261,267 ---- */ case T_SWITCHTRAP + USER: goto out; ! #ifdef INET case T_BUSFLT+SUPV: case T_INSTRAP+SUPV: case T_BPTTRAP+SUPV: *************** *** 321,337 **** curpri = setpri(p); if (runrun) { setrq(u.u_procp); - #ifdef UCB_RUSAGE u.u_ru.ru_nivcsw++; - #endif swtch(); } if (u.u_prof.pr_scale) addupc(pc, &u.u_prof, (int) (u.u_ru.ru_stime - syst)); - #ifndef NONFP if (u.u_fpsaved) restfp(&u.u_fps); - #endif } /* --- 313,325 ---- *************** *** 356,364 **** #endif syst = u.u_ru.ru_stime; - #ifndef NONFP u.u_fpsaved = 0; - #endif u.u_ar0 = &r0; u.u_error = 0; opc = pc - 2; /* opc now points at syscall */ --- 344,350 ---- *************** *** 400,416 **** curpri = setpri(u.u_procp); if (runrun) { setrq(u.u_procp); - #ifdef UCB_RUSAGE u.u_ru.ru_nivcsw++; - #endif swtch(); } if (u.u_prof.pr_scale) addupc(pc, &u.u_prof, (int)(u.u_ru.ru_stime - syst)); - #ifndef NONFP if (u.u_fpsaved) restfp(&u.u_fps); - #endif } /* --- 386,398 ----