Subject: kernel 'config', autoconfig, documentation changes (#92, 4 of 12) Index: sys,doc,etc,pdpif,.../many 2.11BSD Description: This is part 4 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/autoconfig/brauto.c /usr/src/sys/autoconfig/cnauto.c /usr/src/sys/autoconfig/dhauto.c /usr/src/sys/autoconfig/dhuauto.c /usr/src/sys/autoconfig/dhvauto.c /usr/src/sys/autoconfig/dnauto.c /usr/src/sys/autoconfig/do_config.c /usr/src/sys/autoconfig/drauto.c /usr/src/sys/autoconfig/dzauto.c /usr/src/sys/autoconfig/hkauto.c /usr/src/sys/autoconfig/htauto.c /usr/src/sys/autoconfig/ivec.h /usr/src/sys/autoconfig/lpauto.c /usr/src/sys/autoconfig/raauto.c /usr/src/sys/autoconfig/read_nlist.c /usr/src/sys/autoconfig/rkauto.c /usr/src/sys/autoconfig/rlauto.c /usr/src/sys/autoconfig/rxauto.c /usr/src/sys/autoconfig/siauto.c /usr/src/sys/autoconfig/tmauto.c /usr/src/sys/autoconfig/tmsauto.c /usr/src/sys/autoconfig/tsauto.c /usr/src/sys/autoconfig/xpauto.c /usr/src/man/man8/autoconfig.8 'autoconfig' was changed to handle programmable vector devices. Changes were also made to dynamically allocate vectors. Also, the 'probe' routines were modified to accept the second parameter passed by autoconfig. At present this parameter is not used and is for future expansion. The notes in the 'Repeat-By:' section go into detail about the changes made to 'autoconfig'. *** /usr/src/sys/autoconfig/brauto.c.old Fri Aug 26 14:27:32 1988 --- /usr/src/sys/autoconfig/brauto.c Wed Dec 30 17:48:38 1992 *************** *** 7,14 **** * Can't seem to force an interrupt reliably, so... we just return * the fact that we exist. autoconfig has already checked for our CSR. */ ! brprobe(addr) struct brdevice *addr; { /* stuff(BR_IDE | BR_IDLE | BR_GO, (&(addr->brcs.w))); --- 7,15 ---- * Can't seem to force an interrupt reliably, so... we just return * the fact that we exist. autoconfig has already checked for our CSR. */ ! brprobe(addr, vector) struct brdevice *addr; + int vector; { /* stuff(BR_IDE | BR_IDLE | BR_GO, (&(addr->brcs.w))); *** /usr/src/sys/autoconfig/cnauto.c.old Sat Apr 30 19:02:10 1988 --- /usr/src/sys/autoconfig/cnauto.c Wed Dec 30 17:49:10 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)cauto.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. * ! * @(#)cauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 10,17 **** #include "../machine/autoconfig.h" #include "cons.h" ! cnprobe(addr) struct dldevice *addr; { stuff(grab(&(addr->dlxcsr)) | DLXCSR_TIE, &(addr->dlxcsr)); DELAY(35000L); --- 10,18 ---- #include "../machine/autoconfig.h" #include "cons.h" ! cnprobe(addr, vector) struct dldevice *addr; + int vector; { stuff(grab(&(addr->dlxcsr)) | DLXCSR_TIE, &(addr->dlxcsr)); DELAY(35000L); *** /usr/src/sys/autoconfig/dhauto.c.old Fri Apr 29 20:05:47 1988 --- /usr/src/sys/autoconfig/dhauto.c Wed Dec 30 17:49:48 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)dhauto.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. * ! * @(#)dhauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 14,21 **** #include "dhreg.h" #include "dmreg.h" ! dhprobe(addr) struct dhdevice *addr; { stuff(DH_TIE, &(addr->un.dhcsr)); DELAY(5L); --- 14,22 ---- #include "dhreg.h" #include "dmreg.h" ! dhprobe(addr,vector) struct dhdevice *addr; + int vector; { stuff(DH_TIE, &(addr->un.dhcsr)); DELAY(5L); *************** *** 29,36 **** return(ACP_IFINTR); } ! dmprobe(addr) struct dmdevice *addr; { stuff(grab(&(addr->dmcsr)) | DM_DONE | DM_IE, &(addr->dmcsr)); DELAY(20L); --- 30,38 ---- return(ACP_IFINTR); } ! dmprobe(addr,vector) struct dmdevice *addr; + int vector; { stuff(grab(&(addr->dmcsr)) | DM_DONE | DM_IE, &(addr->dmcsr)); DELAY(20L); *** /usr/src/sys/autoconfig/dhuauto.c.old Sat Jan 10 02:14:36 1987 --- /usr/src/sys/autoconfig/dhuauto.c Wed Dec 30 17:50:12 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)dhuauto.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. * ! * @(#)dhuauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 10,17 **** #include "../machine/autoconfig.h" #include "../machine/machparam.h" ! dhuprobe(addr) u_int *addr; { extern int errno; --- 10,18 ---- #include "../machine/autoconfig.h" #include "../machine/machparam.h" ! dhuprobe(addr,vector) u_int *addr; + int vector; { extern int errno; *** /usr/src/sys/autoconfig/dhvauto.c.old Thu Sep 1 14:14:04 1988 --- /usr/src/sys/autoconfig/dhvauto.c Wed Dec 30 17:50:36 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)dhuauto.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. * ! * @(#)dhuauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 11,18 **** #include "../machine/machparam.h" #include "../pdpuba/dhvreg.h" ! dhvprobe(addr) struct dhvdevice *addr; { if ( grab ( &(addr->dhvcsr) ) & DHV_CS_MCLR ) DELAY(35000L); --- 11,19 ---- #include "../machine/machparam.h" #include "../pdpuba/dhvreg.h" ! dhvprobe(addr,vector) struct dhvdevice *addr; + int vector; { if ( grab ( &(addr->dhvcsr) ) & DHV_CS_MCLR ) DELAY(35000L); *** /usr/src/sys/autoconfig/dnauto.c.old Fri Apr 29 20:05:40 1988 --- /usr/src/sys/autoconfig/dnauto.c Wed Dec 30 17:50:48 1992 *************** *** 3,10 **** #include "../machine/autoconfig.h" #include "../machine/machparam.h" ! dnprobe(addr) struct dndevice *addr; { stuff(DN_MINAB | DN_INTENB | DN_DONE, (&(addr->dnisr[0]))); DELAY(5L); --- 3,11 ---- #include "../machine/autoconfig.h" #include "../machine/machparam.h" ! dnprobe(addr,vector) struct dndevice *addr; + int vector; { stuff(DN_MINAB | DN_INTENB | DN_DONE, (&(addr->dnisr[0]))); DELAY(5L); *** /usr/src/sys/autoconfig/do_config.c.old Thu Nov 19 21:42:04 1992 --- /usr/src/sys/autoconfig/do_config.c Wed Dec 30 18:10:06 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)do_config.c 2.0 (2.11BSD GTE) 11/20/92 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)do_config.c 2.1 (2.11BSD GTE) 12/30/92 */ /* *************** *** 22,29 **** #include "dtab.h" #include "ivec.h" ! extern int kmem, verbose, debug, errno, complain; ! extern NLIST *bad_nl, *good_nl, *int_nl, *end_vector, *trap_nl, *sep_nl; grab(where) u_int where; --- 22,30 ---- #include "dtab.h" #include "ivec.h" ! extern int kmem, verbose, debug, errno, complain; ! extern NLIST *bad_nl, *good_nl, *int_nl, *end_vector, *trap_nl, *sep_nl; ! extern NLIST *next_nl; grab(where) u_int where; *************** *** 126,132 **** } continue; } ! ret = do_probe(dp, dp->dt_addr); clear_vec(dp); switch (ret) { case ACP_NXDEV: --- 127,133 ---- } continue; } ! ret = do_probe(dp); clear_vec(dp); switch (ret) { case ACP_NXDEV: *************** *** 200,208 **** DTAB *dp; { HAND *hp; ! int addr; ! addr = dp->dt_vector; for (save_p = 0, hp = (HAND *)dp->dt_handlers;hp;hp = hp->s_next) { save_vec[save_p][1] = grab(addr + sizeof(int)); if (((save_vec[save_p][0] = grab(addr)) != bad_nl->n_value) --- 201,250 ---- DTAB *dp; { HAND *hp; ! register int addr = dp->dt_vector; ! /* ! * A vector of 0 has special meaning for devices which support programmable ! * (settable) vectors. If a xxVec() entry point is present in the driver and ! * /etc/dtab has a value of 0 for the vector then 'autoconfig' will allocate ! * one by calling the kernel routine 'nextiv'. ! * ! * If multiple handlers are declared for a device (at present there are no ! * progammable vector devices with more than 1 handler) the vector passed ! * to the driver will be the lowest one (the first handle corresponds to ! * the lowest vector). ! */ ! if (!addr) { ! if (dp->dt_setvec == 0) { ! prdev(dp); ! printf(" vector = 0, %sVec undefined\n", dp->dt_name); ! return(1); ! } ! /* ! * Now count the number of vectors needed. This has the side effect of ! * allocating the vectors even if an error occurs later. At the end of ! * the scan the last vector assigned will be the lowest one. In order to ! * assure adjacency of multiple vectors BR7 is used in the call to the ! * kernel and it is assumed that at this point in the system's life ! * nothing else is allocating vectors (the networking has already grabbed the ! * ones it needs by the time autoconfig is run). ! */ ! for (hp = dp->dt_handlers; hp; hp = hp->s_next) { ! addr = ucall(PSL_BR7, next_nl->n_value, 0, 0); ! if (addr <= 0) { ! printf("'nextiv' error for %s\n", ! dp->dt_name); ! return(1); ! } ! } ! /* ! * Now set the lowest vector allocated into the device entry for further ! * processing. From this point on the vector will behave just as if it ! * had been read from /etc/dtab. ! */ ! dp->dt_vector = addr; ! } ! for (save_p = 0, hp = (HAND *)dp->dt_handlers;hp;hp = hp->s_next) { save_vec[save_p][1] = grab(addr + sizeof(int)); if (((save_vec[save_p][0] = grab(addr)) != bad_nl->n_value) *************** *** 211,217 **** clear_vec(dp); return 1; } ! save_p ++; write_vector(addr, good_nl->n_value, PSL_BR7); addr += IVSIZE; } --- 253,259 ---- clear_vec(dp); return 1; } ! save_p++; write_vector(addr, good_nl->n_value, PSL_BR7); addr += IVSIZE; } *************** *** 242,250 **** } } ! do_probe(dp, a1) register DTAB *dp; - int a1; { int func; int ret; --- 284,291 ---- } } ! do_probe(dp) register DTAB *dp; { int func; int ret; *************** *** 254,260 **** char line[80]; if (func) ! printf("ucall %o(PSL_BR0, %o, 0):", func, a1); else printf("probe %s:", dp->dt_name); fputs(" return conf_int:",stdout); --- 295,301 ---- char line[80]; if (func) ! printf("ucall %o(PSL_BR0, %o, 0):", func, dp->dt_addr); else printf("probe %s:", dp->dt_name); fputs(" return conf_int:",stdout); *************** *** 265,280 **** stuff(0, int_nl->n_value); /* Clear conf_int */ /* * use the kernel's probe routine if it exists, ! * otherwise use our internal probe. */ if (func) { errno = 0; ! ret = ucall(PSL_BR0, func, a1, 0); if (errno) perror("ucall"); return(ret); } ! return((*(dp->dt_uprobe))(a1)); } set_unused() --- 306,322 ---- stuff(0, int_nl->n_value); /* Clear conf_int */ /* * use the kernel's probe routine if it exists, ! * otherwise use our internal probe. Pass it the first (lowest) ! * vector assigned to the device. */ if (func) { errno = 0; ! ret = ucall(PSL_BR0, func, dp->dt_addr, dp->dt_vector); if (errno) perror("ucall"); return(ret); } ! return((*(dp->dt_uprobe))(dp->dt_addr, dp->dt_vector)); } set_unused() *** /usr/src/sys/autoconfig/drauto.c.old Sat Jan 10 02:14:42 1987 --- /usr/src/sys/autoconfig/drauto.c Wed Dec 30 17:51:12 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)drauto.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. * ! * @(#)drauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "drreg.h" ! drprobe(addr) struct drdevice *addr; { stuff(DR_MANT, &(addr->csr)); /* toggle maintence bit */ stuff(0, &(addr->csr)); /* to reset dr11 */ --- 12,20 ---- #include "drreg.h" ! drprobe(addr,vector) struct drdevice *addr; + int vector; { stuff(DR_MANT, &(addr->csr)); /* toggle maintence bit */ stuff(0, &(addr->csr)); /* to reset dr11 */ *** /usr/src/sys/autoconfig/dzauto.c.old Fri Apr 29 20:05:46 1988 --- /usr/src/sys/autoconfig/dzauto.c Wed Dec 30 17:51:36 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)dzauto.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. * ! * @(#)dzauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "dzreg.h" ! dzprobe(addr) struct dzdevice *addr; { stuff(grab(&(addr->dzcsr)) | DZ_TIE | DZ_MSE, &(addr->dzcsr)); stuff(1, &(addr->dztcr)); --- 12,20 ---- #include "dzreg.h" ! dzprobe(addr,vector) struct dzdevice *addr; + int vector; { stuff(grab(&(addr->dzcsr)) | DZ_TIE | DZ_MSE, &(addr->dzcsr)); stuff(1, &(addr->dztcr)); *** /usr/src/sys/autoconfig/hkauto.c.old Fri Apr 29 20:05:45 1988 --- /usr/src/sys/autoconfig/hkauto.c Wed Dec 30 17:52:01 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)hkauto.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. * ! * @(#)hkauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "hkreg.h" ! hkprobe(addr) struct hkdevice *addr; { stuff(HK_CDT | HK_IE | HK_CRDY, (&(addr->hkcs1))); DELAY(10L); --- 12,20 ---- #include "hkreg.h" ! hkprobe(addr,vector) struct hkdevice *addr; + int vector; { stuff(HK_CDT | HK_IE | HK_CRDY, (&(addr->hkcs1))); DELAY(10L); *** /usr/src/sys/autoconfig/htauto.c.old Tue Sep 27 13:47:20 1988 --- /usr/src/sys/autoconfig/htauto.c Wed Dec 30 17:52:40 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)htauto.c 1.1 (2.10BSD Berkeley) 9/26/88 */ #include "param.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)htauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "htreg.h" ! htprobe(addr) struct htdevice *addr; { /* * I can't get the hardware to interrupt when a transport is selected --- 12,20 ---- #include "htreg.h" ! htprobe(addr,vector) struct htdevice *addr; + int vector; { /* * I can't get the hardware to interrupt when a transport is selected *** /usr/src/sys/autoconfig/ivec.h.old Fri Feb 27 02:13:09 1987 --- /usr/src/sys/autoconfig/ivec.h Wed Dec 30 17:10:46 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)ivec.h 1.1 (2.10BSD Berkeley) 12/1/86 */ struct vec_s { --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)ivec.h 1.2 (2.11BSD Berkeley) 12/30/92 */ struct vec_s { *************** *** 13,16 **** #define IVSIZE (sizeof ivec) ! #define NVECTOR 100 /* max. number of vectors we can set */ --- 13,20 ---- #define IVSIZE (sizeof ivec) ! /* ! * increased from 100 to 128 to allow for vectors to be allocated ! * backwards from 01000 (512) via calls to 'nextiv' ! */ ! #define NVECTOR 128 /* max. number of vectors we can set */ *** /usr/src/sys/autoconfig/lpauto.c.old Fri Apr 29 20:05:43 1988 --- /usr/src/sys/autoconfig/lpauto.c Wed Dec 30 17:53:15 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)lpauto.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. * ! * @(#)lpauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 20,27 **** short lpdb; }; ! lpprobe(addr) struct lpdevice *addr; { stuff(grab(&(addr->lpcs)) | LP_IE, &(addr->lpcs)); DELAY(10L); --- 20,28 ---- short lpdb; }; ! lpprobe(addr,vector) struct lpdevice *addr; + int vector; { stuff(grab(&(addr->lpcs)) | LP_IE, &(addr->lpcs)); DELAY(10L); *** /usr/src/sys/autoconfig/raauto.c.old Sat Jan 10 02:15:15 1987 --- /usr/src/sys/autoconfig/raauto.c Wed Dec 30 17:55:58 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)raauto.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. * ! * @(#)raauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 10,17 **** #include "../machine/autoconfig.h" #include "../machine/machparam.h" ! raprobe(addr) u_int *addr; { extern int errno; --- 10,23 ---- #include "../machine/autoconfig.h" #include "../machine/machparam.h" ! /* ! * This is one of the few devices which could use the 'vector' parameter. ! * Forcing an interrupt from a MSCP device is a large enough undertaking ! * that it hasn't been done (yet). ! */ ! raprobe(addr,vector) u_int *addr; + int vector; { extern int errno; *** /usr/src/sys/autoconfig/read_nlist.c.old Thu Nov 19 21:43:41 1992 --- /usr/src/sys/autoconfig/read_nlist.c Wed Dec 30 17:15:02 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)read_nlist.c 2.0 (2.11BSD GTE) 11/20/92 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)read_nlist.c 2.1 (2.11BSD GTE) 12/30/92 */ /* *************** *** 25,33 **** extern int kmem; extern int pflag; NLIST *nl, *np, *int_nl, *good_nl, *bad_nl, *trap_nl, *sep_nl, *vers_nl, ! *add_nlist(), *end_vector; #define END_NAME "endvec" #define INT_NAME "_conf_int" #define GOOD_NAME "CGOOD" #define BAD_NAME "CBAD" --- 25,34 ---- extern int kmem; extern int pflag; NLIST *nl, *np, *int_nl, *good_nl, *bad_nl, *trap_nl, *sep_nl, *vers_nl, ! *add_nlist(), *end_vector, *next_nl; #define END_NAME "endvec" + #define NEXTIV_NAME "_nextiv" /* floating vector allocator */ #define INT_NAME "_conf_int" #define GOOD_NAME "CGOOD" #define BAD_NAME "CBAD" *************** *** 53,59 **** *calloc(); NLIST *add_nlist(); ! np = nl = (NLIST *)calloc(guess_ndev + 8,sizeof(NLIST)); for (dp = devs; dp != NULL; dp = dp->dt_next) { sprintf(tname, "_%sprobe", dp->dt_name); dp->dt_probe = add_nlist(tname); --- 54,60 ---- *calloc(); NLIST *add_nlist(); ! np = nl = (NLIST *)calloc(guess_ndev + 10,sizeof(NLIST)); for (dp = devs; dp != NULL; dp = dp->dt_next) { sprintf(tname, "_%sprobe", dp->dt_name); dp->dt_probe = add_nlist(tname); *************** *** 72,77 **** --- 73,80 ---- strncpy(good_nl->n_name,GOOD_NAME,sizeof(good_nl->n_name)); bad_nl = np++; strncpy(bad_nl->n_name,BAD_NAME,sizeof(bad_nl->n_name)); + next_nl = np++; + strncpy(next_nl->n_name, NEXTIV_NAME,sizeof(next_nl->n_name)); trap_nl = np++; strncpy(trap_nl->n_name,TRAP_NAME,sizeof(trap_nl->n_name)); vers_nl = np++; *************** *** 78,83 **** --- 81,87 ---- strncpy(vers_nl->n_name,VERSION,sizeof(vers_nl->n_name)); sep_nl = np++; strncpy(sep_nl->n_name,SEPID_NAME,sizeof(sep_nl->n_name)); + if ((unix_fd = open(nlist_name,O_RDONLY)) < 0) { perror(nlist_name); exit(AC_SETUP); *** /usr/src/sys/autoconfig/rkauto.c.old Fri Apr 29 20:05:42 1988 --- /usr/src/sys/autoconfig/rkauto.c Wed Dec 30 17:56:32 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)rkauto.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. * ! * @(#)rkauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "rkreg.h" ! rkprobe(addr) struct rkdevice *addr; { stuff(RKCS_IDE | RKCS_DRESET | RKCS_GO, (&(addr->rkcs))); DELAY(10L); --- 12,20 ---- #include "rkreg.h" ! rkprobe(addr,vector) struct rkdevice *addr; + int vector; { stuff(RKCS_IDE | RKCS_DRESET | RKCS_GO, (&(addr->rkcs))); DELAY(10L); *** /usr/src/sys/autoconfig/rlauto.c.old Wed Jan 8 20:40:41 1992 --- /usr/src/sys/autoconfig/rlauto.c Wed Dec 30 17:56:56 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)rlauto.c 2.0 (2.11BSD Berkeley) 1/8/92 */ #include "param.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)rlauto.c 2.1 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "rlreg.h" ! rlprobe(addr) struct rldevice *addr; { stuff(RLDA_RESET | RLDA_GS, (&(addr->rlda))); DELAY(10L); --- 12,20 ---- #include "rlreg.h" ! rlprobe(addr,vector) struct rldevice *addr; + int vector; { stuff(RLDA_RESET | RLDA_GS, (&(addr->rlda))); DELAY(10L); *** /usr/src/sys/autoconfig/rxauto.c.old Fri Apr 29 20:05:48 1988 --- /usr/src/sys/autoconfig/rxauto.c Wed Dec 30 17:57:21 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)rxauto.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. * ! * @(#)rxauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 15,22 **** /* * rxprobe - check for rx */ ! rxprobe(addr) struct rxdevice *addr; { stuff(RX_INIT | RX_IE, (&(addr)->rxcs)); DELAY(1000L); --- 15,23 ---- /* * rxprobe - check for rx */ ! rxprobe(addr,vector) struct rxdevice *addr; + int vector; { stuff(RX_INIT | RX_IE, (&(addr)->rxcs)); DELAY(1000L); *** /usr/src/sys/autoconfig/siauto.c.old Fri Apr 29 20:05:51 1988 --- /usr/src/sys/autoconfig/siauto.c Wed Dec 30 17:57:43 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)siauto.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. * ! * @(#)siauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "sireg.h" ! siprobe(addr) struct sidevice *addr; { stuff(SI_IE | SI_READ, &(addr->sicnr)); stuff(SI_IE | SI_READ | SI_DONE, &(addr->sicnr)); --- 12,20 ---- #include "sireg.h" ! siprobe(addr,vector) struct sidevice *addr; + int vector; { stuff(SI_IE | SI_READ, &(addr->sicnr)); stuff(SI_IE | SI_READ | SI_DONE, &(addr->sicnr)); *** /usr/src/sys/autoconfig/tmauto.c.old Sat Jan 10 02:12:16 1987 --- /usr/src/sys/autoconfig/tmauto.c Wed Dec 30 17:58:01 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)tmauto.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. * ! * @(#)tmauto.c 1.2 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 12,18 **** #include "tmreg.h" ! tmprobe(addr) struct tmdevice *addr; { extern int errno; --- 12,18 ---- #include "tmreg.h" ! tmprobe(addr,vector) struct tmdevice *addr; { extern int errno; *** /usr/src/sys/autoconfig/tmsauto.c.old Wed Dec 19 10:11:33 1990 --- /usr/src/sys/autoconfig/tmsauto.c Wed Dec 30 18:00:21 1992 *************** *** 4,10 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)tmsauto.c 1.0 (2.11BSD Contel) 8/14/90 */ #include "param.h" --- 4,10 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)tmsauto.c 1.1 (2.11BSD GTE) 12/30/92 */ #include "param.h" *************** *** 13,23 **** /* * The TMSCP controller is another one which has programmable vectors. ! * The present kernel and autoconfigure scheme can not deal with that, ! * so all that can be done is verify that something is present at the ! * CSR given. */ ! tmsprobe(addr) u_int *addr; { extern int errno; --- 13,24 ---- /* * The TMSCP controller is another one which has programmable vectors. ! * The kernel and autoconfigure program have been modified to handle this, ! * which is why the vector is being passed to all of the probe routines. ! * For now just continue testing for the presence of a device until a ! * real probe routine can be written. */ ! tmsprobe(addr,vector) u_int *addr; { extern int errno; *** /usr/src/sys/autoconfig/tsauto.c.old Tue Dec 10 09:27:56 1991 --- /usr/src/sys/autoconfig/tsauto.c Wed Dec 30 18:00:43 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)tsauto.c 2.0 (2.11BSD) 12/9/91 */ #include "param.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)tsauto.c 2.1 (2.11BSD) 12/30/92 */ #include "param.h" *************** *** 12,19 **** #include "tsreg.h" ! tsprobe(addr) register struct tsdevice *addr; { extern int errno; --- 12,20 ---- #include "tsreg.h" ! tsprobe(addr,vector) register struct tsdevice *addr; + int vector; { extern int errno; *** /usr/src/sys/autoconfig/xpauto.c.old Fri Apr 29 20:05:54 1988 --- /usr/src/sys/autoconfig/xpauto.c Wed Dec 30 18:01:02 1992 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)xpauto.c 1.1 (2.10BSD Berkeley) 12/1/86 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)xpauto.c 1.2 (2.11BSD GTE) 12/30/92 */ /* *************** *** 19,25 **** #include "hpreg.h" ! xpprobe(addr) struct hpdevice *addr; { stuff(HP_IE | HP_RDY, &(addr->hpcs1.w)); --- 19,25 ---- #include "hpreg.h" ! xpprobe(addr,vector) struct hpdevice *addr; { stuff(HP_IE | HP_RDY, &(addr->hpcs1.w)); *** /usr/src/man/man8/autoconfig.8.old Sat Nov 30 08:41:52 1991 --- /usr/src/man/man8/autoconfig.8 Wed Dec 30 18:44:08 1992 *************** *** 2,10 **** .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" ! .\" @(#)autoconfig.8 2.5 (Berkeley) 11/30/91 .\" ! .TH AUTOCONFIG 8 "November 30, 1991" .UC 2 .SH NAME autoconfig \- configure the running system to the hardware --- 2,10 ---- .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" ! .\" @(#)autoconfig.8 2.6 (2.11BSD GTE) 12/30/92 .\" ! .TH AUTOCONFIG 8 "December 30, 1992" .UC 2 .SH NAME autoconfig \- configure the running system to the hardware *************** *** 32,37 **** --- 32,46 ---- vector is correct. The interrupt vector is checked to see that it has not previously been used. An interrupt through any of the device's consecutive vectors is sufficient. + .PP + Devices which use programmable vectors (MSCP and TMSCP) are permitted + to have a value of 0 in the dtab vector field. This special value tells + autoconfig to call the kernel's get next available vector routine and + assign that to the device. For programmable vector devices if the dtab + vector field is non 0 then the value specified in the dtab file is used. + In both cases the driver is called at its xxVec() routine with the vector + being assigned to the device. + .PP If the address and vector are correct, it then attaches the device by passing the address and unit number to the kernel's attach routine and setting up the interrupt vector according to