Home | History | Annotate | only in /src/sys/arch/amiga
History log of /src/sys/arch/amiga
RevisionDateAuthorComments
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Feb-1994  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1994  mycroft Clean up deleted files.
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Feb-1994  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.21 25-Oct-2008  apb Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.20 05-Mar-2006  aymeric branches: 1.20.66; 1.20.70; 1.20.76;
include ../m68k/Makefile.inc after we got a chance of having a better
definition of SYSDIR. This makes tags work if the sources are not in /sys
 1.19 11-Dec-2005  christos branches: 1.19.4; 1.19.6; 1.19.8;
merge ktrace-lwp.
 1.18 06-Sep-2005  aymeric make the "tags" target work again by using the common trick of splitting some
of the arguments to ctags using echo start-of-xxx | xargs ctags rest-of-xxx
 1.17 16-Aug-2004  aymeric branches: 1.17.12;
. use ${SYSDIR} instead of relative paths so that tags links in subdirs work
. fix the links: target to work with objdirs
 1.16 06-Jan-2003  lukem branches: 1.16.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
 1.15 12-Jun-1998  cgd branches: 1.15.32;
Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.14 11-Oct-1997  mycroft Use m68k/Makefile.inc.
 1.13 11-Oct-1997  mycroft Nuke NOOBJ.
 1.12 11-Oct-1997  mycroft Update all the tags goo, and use bsd.subdir.mk.
 1.11 06-Jan-1997  is branches: 1.11.10;
Build / install some stuff from stand (e.g.: bootblock)
 1.10 26-Oct-1994  cgd branches: 1.10.6;
new RCS ID format.
 1.9 08-May-1994  chopps fix tags.
 1.8 14-Mar-1994  chopps spaces->tabs, jeesh this file is like sys:system/clock under amigados. :^)
 1.7 09-Mar-1994  chopps make useful for emacs users and update files checked for tags.
 1.6 08-Mar-1994  chopps added .include <bsd.prog.mk> hopefully clears up problem with
some make targets.
 1.5 23-Feb-1994  chopps Makefile should now properly make tags, and not error on install.
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 31-Jul-1993  mycroft Add RCS indentifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.6.1 09-Jun-1996  is Oops, forgotten to commit this change to really really really install
from our subdirectories.
 1.11.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.15.32.1 07-Jan-2003  thorpej Sync with HEAD.
 1.16.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 25-Aug-2004  skrll Sync with HEAD.
 1.17.12.1 21-Jun-2006  yamt sync with head.
 1.19.8.1 13-Mar-2006  yamt sync with head.
 1.19.6.1 22-Apr-2006  simonb Sync with head.
 1.19.4.1 09-Sep-2006  rpaulo sync with head
 1.20.76.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.70.1 04-May-2009  yamt sync with head.
 1.20.66.1 17-Jan-2009  mjf Sync with HEAD.
 1.2 02-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.2 02-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 29-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 01-Feb-1994  chopps from M. Hitch. regarding scsi re-org.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 29-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.2 30-Oct-1993  mycroft Clean up deleted files.
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.16 12-Sep-1997  mycroft Nuke Locore.c. It's way too out of date to be useful at this point.
 1.15 06-Nov-1996  cgd branches: 1.15.10;
Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed. Rename remrq() to
remrunqueue().
 1.14 13-Oct-1996  christos backout previous kprintf change
 1.13 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12 10-Jun-1996  cgd locc() is unused. Remove it from the machine-independent kernel interface.
 1.11 13-Aug-1995  mycroft Add splsoftnet().
 1.10 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.9 09-Mar-1995  mycroft copy*str() should use size_t.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 13-May-1994  chopps setrq -> setrunqueue
 1.6 29-Apr-1994  chopps change mmap to vmpte to avoid nameclash with the syscall.
 1.5 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.15.10.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.9 12-Sep-2009  phx Make disklabel.h from amiga and amigappc include the MI sys/disklabel_rdb.h.
amiga/amiga/adosglue.h was deleted and moved into sys_disklabel_rdb.h, as both
are always needed together (disksubr.c and ofppc/stand/ofwboot/rdb.c).
 1.8 24-Nov-2006  christos branches: 1.8.56; 1.8.70;
fix capitalization of NetBSD; from Zapher
 1.7 03-Aug-2006  mhitch branches: 1.7.4; 1.7.6;
Add a new ADOS partition type, "RAI?" to specify a RaidFrame partiion
which can then be autoconfigured. Currently can only use the 'c'
partition of the raid* device, since there will be no RDB on the device.
 1.6 26-Feb-2001  is branches: 1.6.40; 1.6.54; 1.6.58;
fix comment
 1.5 28-Apr-1999  is branches: 1.5.2;
Recognize Linux ext2fs partitions. (Used to be marked as unknown).
 1.4 28-Dec-1994  chopps branches: 1.4.26;
support for muFS.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 25-May-1994  chopps add AMIX dostype and some changes (hacks) to RDB code.
 1.1 08-May-1994  chopps a few files that were forgoton in the last batch.
 1.4.26.1 28-Apr-1999  perry branches: 1.4.26.1.2;
pullup 1.4->1.5 (is)
 1.4.26.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.1 12-Mar-2001  bouyer Sync with HEAD.
 1.6.58.1 11-Aug-2006  yamt sync with head
 1.6.54.1 09-Sep-2006  rpaulo sync with head
 1.6.40.1 30-Dec-2006  yamt sync with head.
 1.7.6.1 10-Dec-2006  yamt sync with head.
 1.7.4.1 12-Jan-2007  ad Sync with head.
 1.8.70.1 24-Oct-2010  jym Sync with HEAD
 1.8.56.1 16-Sep-2009  yamt sync with head
 1.1 03-Jan-2014  rkujawa branches: 1.1.4; 1.1.6; 1.1.10;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 03-Jan-2014  tls file amiga_bus_simple_0x1000.c was added on branch tls-maxphys on 2014-08-20 00:02:42 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 03-Jan-2014  yamt file amiga_bus_simple_0x1000.c was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 03-Jan-2014  rmind file amiga_bus_simple_0x1000.c was added on branch rmind-smpnet on 2014-05-18 17:44:54 +0000
 1.1 22-Dec-2013  rkujawa branches: 1.1.4; 1.1.6; 1.1.10;
Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Dec-2013  tls file amiga_bus_simple_0x4000.c was added on branch tls-maxphys on 2014-08-20 00:02:42 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Dec-2013  yamt file amiga_bus_simple_0x4000.c was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Dec-2013  rmind file amiga_bus_simple_0x4000.c was added on branch rmind-smpnet on 2014-05-18 17:44:54 +0000
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 28-Jan-2002  aymeric branches: 1.2.118; 1.2.120; 1.2.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.1 17-Mar-2001  is branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12;
Method array for a really big inter-byte offset.
 1.1.12.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.12.1 17-Mar-2001  nathanw file amiga_bus_simple_0x800.c was added on branch nathanw_sa on 2002-02-28 04:06:16 +0000
 1.1.6.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.1.2.1 17-Mar-2001  bouyer file amiga_bus_simple_0x800.c was added on branch thorpej_scsipi on 2001-03-27 15:30:11 +0000
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 28-Jan-2002  aymeric branches: 1.2.118; 1.2.120; 1.2.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.1 23-Mar-2000  is branches: 1.1.6; 1.1.10; 1.1.14;
Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).
 1.1.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 23-Mar-2000  bouyer file amiga_bus_simple_16.c was added on branch thorpej_scsipi on 2000-11-20 19:58:16 +0000
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 06-Aug-2014  joerg Remove duplicated initializer.
 1.8 19-Nov-2012  rkujawa branches: 1.8.10;
Add support for byteswapping of bsr2/bsw2. Needed for X-Surf IDE (incoming).
 1.7 12-Feb-2012  matt branches: 1.7.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.6 16-Sep-2011  rkujawa branches: 1.6.2; 1.6.6;
Fix typos (make this compile again...)
 1.5 15-Sep-2011  christos add c99 initializers.
 1.4 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 28-Jan-2002  aymeric branches: 1.2.118; 1.2.120; 1.2.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.1 23-Jan-2000  aymeric branches: 1.1.6; 1.1.10; 1.1.14;
code factorisation and added stride 1 functions
 1.1.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 23-Jan-2000  bouyer file amiga_bus_simple_1word.c was added on branch thorpej_scsipi on 2000-11-20 19:58:17 +0000
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.6.1 18-Feb-2012  mrg merge to -current.
 1.6.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.7.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.1 25-Feb-2013  tls resync with head
 1.8.10.1 10-Aug-2014  tls Rebase.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 28-Jan-2002  aymeric branches: 1.3.118; 1.3.120; 1.3.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.2 23-Jan-2000  aymeric branches: 1.2.6; 1.2.10; 1.2.14;
code factorisation and added stride 1 functions
 1.1 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.6.1 23-Jan-2000  bouyer file amiga_bus_simple_2word.c was added on branch thorpej_scsipi on 2000-11-20 19:58:17 +0000
 1.3.122.1 16-May-2008  yamt sync with head.
 1.3.120.1 18-May-2008  yamt sync with head.
 1.3.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.10 30-Oct-2011  rkujawa Update comment (mention added 32-bit methods).
 1.9 29-Oct-2011  rkujawa Allow 32-bit transfers for drives which support it. Add missing bus_space methods needed for such transfers.
 1.8 16-Sep-2011  rkujawa Fix typos (make this compile again...)
 1.7 15-Sep-2011  christos add c99 initializers.
 1.6 03-Feb-2010  phx Ensure reorder protection for amigappc in all bus space functions.
The ne(4) driver (XSurf2), which is the only bus_space device I got,
works now.
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 28-Jan-2002  aymeric branches: 1.4.118; 1.4.120; 1.4.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 01-Feb-2000  mhitch branches: 1.2.6; 1.2.10; 1.2.14;
Include word access methods with stride 4.
Add a byte-swapping access_method array for use with MI wdc driver.
XXX Currently only read_multi_2 and write_multi_2 are used by MI wdc code;
XXX The other byte-swapping routines still need to be added.
 1.1 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.6.1 01-Feb-2000  bouyer file amiga_bus_simple_4.c was added on branch thorpej_scsipi on 2000-11-20 19:58:17 +0000
 1.4.122.2 11-Mar-2010  yamt sync with head
 1.4.122.1 16-May-2008  yamt sync with head.
 1.4.120.1 18-May-2008  yamt sync with head.
 1.4.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.134 06-May-2025  rin amiga_init: Make this compile without M68020 and M68030
 1.133 09-Jan-2024  thorpej branches: 1.133.2;
Statically-initialize the '851 / '030 protorp with MMU51_SRP_BITS. In
pmap_init(), re-initialize protorp with MMU51_CRP_BITS. Remove the now-
redundant code that does this in each of the m68k platforms.
 1.132 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

Instead, define new macros: MMU51_SRP_BITS, MMU51_CRP_BITS, MMU51_TCR_BITS,
and MMU40_TCR_BITS, in terms of the definitions in mmu_{40,51}.h. These
automagically adapt to 8K and 4K pages based on the machine-specific value
of PGSHIFT.
 1.131 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.130 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.129 26-Nov-2012  rkujawa branches: 1.129.36; 1.129.38;
Try to make z3rambd less crude. Also support BigRamPlus, FastLane Z3 RAM and
DKB3128.
 1.128 25-Nov-2012  rkujawa Add z3rambd driver, it allows using Zorro III RAM boards as block devices.
This makes sense in machines equipped with RAM on accelerator boards, where
difference between accelerator RAM and Zorro III RAM is significant. Hacks
were needed in amiga_init.c and zbus.c, but they are only enabled if this
driver is present in kernel. Otherwise user will get the usual behaviour.
 1.127 09-Jul-2012  rkujawa branches: 1.127.2;
Set user page table base address dynamically on amiga. This unbreaks machines
with large Zorro III I/O spaces. Patch originally by Michael L. Hitch.
Test on an A4000.
 1.126 12-Feb-2012  matt branches: 1.126.2; 1.126.8;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.125 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.124 10-Jul-2011  mhitch branches: 1.124.2; 1.124.6;
Add a serial console flag passed from the boot loader to the kernel to
allow enabling the serial console with the boot command. Loadbsd has
the option added, but I am not able to buid a new loadbsd binary at this
time, so only the bootxx loader can set the option.
 1.123 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.122 15-Jan-2011  phx branches: 1.122.6;
Make it compile without options M68040 and M68060.
 1.121 02-Jan-2011  tsutsui Tidy up common comments. (Yes, too many dup code...)
 1.120 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.119 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.118 12-Dec-2009  phx branches: 1.118.2; 1.118.4;
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.117 11-Dec-2009  tsutsui Use appropriate macro during pmap initialization:
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries

Now page size dependent numbers are almost replaced with proper macro.

Tested on atari, hp300, and news68k.
 1.116 06-Dec-2009  tsutsui Move initialization of protection_codes[] and kernel_pmap()
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
 1.115 06-Dec-2009  tsutsui pm_stfree in struct pmap is a bitmap value so make it unsigned.
 1.114 04-Dec-2009  tsutsui Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Compile test only.
 1.113 26-Nov-2009  phx Cast vstart to (struct user *) when assigning it to lwp0.l_addr.
 1.112 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.111 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.110 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.109 18-Mar-2009  cegger bcopy -> memcpy
 1.108 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.107 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.106 17-Jan-2009  tsutsui branches: 1.106.2;
Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
 1.105 04-Jan-2009  tsutsui Use howmany(x, y) rather than roundup(x, y)/y. No binary change.
 1.104 03-Jan-2009  tsutsui Rewrite a weird calculation marked "XXX fix calculations XXX"
for an index value of lev2 segment table for the kernel Sysptmap
with more meaningful expressions and PAGE_SIZE independent macro.
Also use "~0" rather than "-1" for an unsigned bitmap value.

Should produce the same results and no functional change.

Tested on A3000 with 68060 by Frank Wille.
 1.103 31-Dec-2008  tsutsui Use proper variable types and names in start_c() function for readability.

No binary changes. (wow, so clever gcc)
 1.102 31-Dec-2008  tsutsui - remove assigned but unused `pt' variable (gcc generates the same binary)
- remove obsolete Sysmap comments
 1.101 31-Dec-2008  tsutsui Remove a declaration of Sysmap. It's in <m68k/pmap_motorola.h>.

XXX: maybe we should also have declarations for Sysseg, Sysptmap,
XXX: and Sysptsize etc. in <m68/pmap_motorola.h>.
 1.100 31-Dec-2008  tsutsui Misc cleanup:
- use proper types on variable declarations
- allocate Sysseg_pa in pmap_bootstrap.c where it's actually used
rather than in atari/pmap.c
- remove comments in pmap_bootstrap.c which were duplicated from pmap.c
- add explicit `extern' keywords for variables allocated elsewhere
- update comment for pmap_bootstrap() to sync with reality

No functional changes.
 1.99 06-Jan-2008  mhitch branches: 1.99.6; 1.99.10; 1.99.18; 1.99.20; 1.99.26;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.98 17-Oct-2007  garbled branches: 1.98.2; 1.98.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.97 05-Jun-2007  mhitch branches: 1.97.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.96 31-May-2007  mhitch PTE for Sysptmap was not getting set correctly.
 1.95 12-May-2007  mhitch Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).

- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.

A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.94 04-Mar-2007  christos branches: 1.94.2; 1.94.4; 1.94.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.93 24-Jan-2007  hubertf branches: 1.93.2;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.92 05-Mar-2006  aymeric branches: 1.92.12; 1.92.16; 1.92.18;
add the no_instrument_function attribute to start_c so that we can reliably
profile the kernel
 1.91 24-Dec-2005  perry branches: 1.91.4; 1.91.6; 1.91.8;
bare asm -> __asm
 1.90 11-Dec-2005  christos merge ktrace-lwp.
 1.89 13-Jun-2005  jmc branches: 1.89.2;
Fix volatile casts
 1.88 11-Jun-2004  is Don't recompute loadbase; use the value passed by the bootloader instead.
(It should know where it loaded us, right?)
Patch contributed by Gunter Nikl.
 1.87 29-Jun-2003  fvdl branches: 1.87.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.86 29-Jun-2003  aymeric Do not use RELOC() after the MMU is enabled.
Move the two assignments that were made after the MMU is on, before.

From Gunther Nikl on port-amiga@. Thanks!
 1.85 16-Apr-2003  is make /dev/reload optional. (It is only implemented for a.out kernels at the
moment.)
 1.84 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.83 11-Jan-2003  aymeric Change the bootstrap procedure to avoid temporarily mapping physical memory.

Now, on the Amiga, we copy a small piece of code to chip memory and enable the
MMU from here.
On the DraCo, we setup %itt0 so that we shadow physical memory without
touching the page tables and very temporarily. The DraCo's memory layout
guarantees that there is no overlap in this case between physical and
virtual addresses.

This fixes a bug where Amiga's with physical memory at 0x200000 wouldn't boot
kernels >2M in size, and possibly other corner cases.

Joint work with Ilpo Ruotsalainen and Ignatios Souvatzis.
 1.82 06-Jan-2003  wiz interrupt with two rs.
 1.81 10-Dec-2002  thorpej Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.80 02-Sep-2002  aymeric remove one comment; warp some lines.
 1.79 05-Jun-2002  mhitch Setting chipmem_start and chipmem_end to the same value (size of chip
memory) greatly confuses the chip memory allocator and can prevent
some systems from even starting the kernel. Remove the initialization
of chipmem_start (it's initialized in locore.s).
 1.78 30-May-2002  thorpej Remove an unnecessary (and undefined, due to lack of a sequence point)
assignment.
 1.77 25-Apr-2002  aymeric branches: 1.77.2; 1.77.4;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.76 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.75 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.74 02-Mar-2001  mhitch branches: 1.74.4; 1.74.8;
More missing register prefixes.
 1.73 14-Feb-2001  is Missing: register prefixes, _FOO_LABEL(n) macros, etc, in preparation for
ELFing the port. Patch provided by scw.
 1.72 13-Jan-2001  aymeric Make this compile again: we don't need to initialize PAGE_SIZE and friends
since they are now (preprocessor) constants.
 1.71 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.70 27-Jun-2000  mrg remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h>
 1.69 23-Jan-2000  aymeric add PCMCIA initialization
 1.68 20-Oct-1999  is Make this compile without booting support for P568k+PPC boards
 1.67 15-Oct-1999  is branches: 1.67.2; 1.67.4;
Reboot support for P5PPC+68K boards, compiled in by "options P5PPC68KBOARD".
Without this, at least cyberppc+040 boards won't reboot, but just hang when
down.
The method is similar to what LinuxPPC/APUS does, but without EIEIO.
 1.66 25-Sep-1999  is branches: 1.66.2;
vm_offset_t -> vaddr_t/paddr_t
 1.65 25-Mar-1999  is branches: 1.65.2;
Defopting grf_cc configuration parameters
 1.64 07-Sep-1998  mhitch Fix error in kernel shadow mapping when kernel is loaded into fastmem on
69040/060 and the number of initial KPT pages is odd. This would cause
a memofy fault before the 040 trap routines were set up and gave a
misleading trap message. The odd number of KTP pages would result if
Sysptsize was patched, or if a large amount of Zorro3 space was needed.
 1.63 21-Aug-1998  is Workaround for the incomplete fastmem loading scheme: put uptbase lots higher,
so that hopefully it doesn't get overwritten by the 1:1 mapped kernel copy.
See line 375 for an explanation.
 1.62 12-Aug-1998  is Get rid of AMIGA_UPTBASE.
Replace it by a variable, which is initialized in amiga_init.c.
This will make the kernel actually work even if we have lots of Zorro-III
(or DraCo direct bus) i/o space.
 1.61 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.60 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.59 14-Apr-1998  is Uhm... looks like I forgot this when doing the MACHINE_NEW_NONCONTIG stuff.
Sorry folks.
 1.58 10-Apr-1998  mhitch Fix a bug I think I introduced long, long ago. The bug would only show
up on systems that have Zorro I/O space allocated outside the Z2 I/O
region, and then only if kvm usage is high enough to begin allocating
pages already mapped for hardware mappings. Found and fixed by Niklas
Hallqvist on OpenBSD.

From niklas@cvs.openbsd.org:
Yay! This fixes a bug that has been there since day one of the amiga port.
We have never protected the kvm area that maps Zorro I/O registers in the
Z2 memory space from being allocated by the kmem_* routines. Lately kvm
usage has increased and we have needed more kvm allocated than earlier thus
this area have got allocated with random results. Most often resulting in
MMU fault panics, but also in hangs. This bug has stalled the amiga port
release builds for several weeks, but now I *hope* the amiga will have a
chance to be built and tested in time for 2.3.
 1.57 09-Feb-1998  is Add the LIMITMEM workaround for the kernel address space size problem.
Will be removed as soon as the kernel can auto-adapt to its address space.
 1.56 10-Jun-1997  veego branches: 1.56.8;
s/amiga_round_page/m68k_round_page/
 1.55 27-Apr-1997  is The delay loop needs 8 cycles, not 3, on the 68030; so use _that_ value
for the pre-calibration.
 1.54 31-Jan-1997  mhitch Get the boot partition offset from the boot loader. Also pass it when
doing a reload. The partition offset will be used to determine which
disk device was the boot device.
 1.53 30-Nov-1996  is Switch off some more interupts on startup; switch off drcom interupts
at the right offset.
 1.52 13-Oct-1996  christos backout previous kprintf change
 1.51 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.50 29-Sep-1996  is a) replace our delay() with a Gordon Ross style one, calibrated at
clock_attach() time (for now).
This removes our dependance on the DraCo ROM access timing and frees
the second CIA on Amigas.
b) support for DraCo rev. >= 4 native timer chips.
 1.49 24-Sep-1996  is Rename the watchdog enable bit to reflect its polarity.
 1.48 24-Sep-1996  is Don't forget to shut up Fido.
 1.47 02-Aug-1996  is Rewrite of the last bugfix wrt. Z2 bounce buffer memory allocation:

Don't manipulate the memlist passed from the kickstart rom + bootloader, as
we want it unchanged in case we boot via /dev/reload.
Instead, make z2mem_start known to pmap.c; and use int in pmap_bootstrap to
detect the right segment to correct and the amount.

XXX The transformation of z2mem from physical to virtual kernel addresses
in amiga_init.c must not be done before the pmap_bootstrap() call now!
 1.46 29-Jul-1996  is Deal with two bugs in the bounce buffer memory reserve code:

If z2 memory is used for bounce buffers, it used to be stolen in
amiga_init.c, but would not be removed from the memory list there, but
in pmap.c the memory list would just be corrected.

a) the sizes subtracted got out of sync.
b) the memory segment to subtract from was guessed in pmap_init, and not
necessarily right. (e.g. consider a graphics board whose fraem buffer gets
mapped in by the RO at 0x200000, and a memory board which maps at 0x400000)

The new code subtracts the stolen aount of memory from the memlist parameter
given to the kernel by the loader, and pmap_init just doesn't see it anymore.
 1.45 25-Jul-1996  is Fix two bugs which were inserted when adding '060 support:
- due to a merge error, 2 line were missing making all the kernel data area
cache inhibited.
- due to a misunderstanding of "kstsize" units, all but the first page of
the kernel segment table was copyback cached on the '040/'060 which
should have caused sporadic user process segmentation faults or
kernel endless loops on the '060, under heavy load (when lots of
userland pagetables are in-core), although the problem was not yet
observed.
 1.44 20-Jun-1996  is Use the right microsecond delay address. To achieve this, also map that
piece of hardware into kernel virtual memory (was only a guess 'til now).
XXX Unfortunately, the hardware vendor reserves the right to change this in
future DraCo revisions. We must rethink delay() and DELAY(), at least for the
DraCo, soon.
 1.43 25-May-1996  is Fix few more places where 040+060 rlevant stuff was only compiled for 68040,
preventing 68060-only kernels to work. (68060 only kernel is tested now by
using it to commit this patch).
 1.42 24-May-1996  is Delete some occurences of kernel startup debug code, move others inside
#ifdef DEBUG_KERNEL_START.
 1.41 09-May-1996  is branches: 1.41.4;
First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.40 04-May-1996  mhitch Startup modified to work with kernel loaded directly into fast memory.
This removes the need to have enough chip memory to load the kernel
when booting. Kernel memory is dual-mapped (VA == 0 and VA == PA)
for enabling the MMU, and the VA == PA mapping removed after start_c()
has completed. Chip memory is still required for the /dev/reload
process.
 1.39 02-May-1996  mhitch Missed a prototype for kernel_reload().
 1.38 02-May-1996  mhitch Add a check in the kernel reload device (/dev/reload) to protect
against the MMU switch code being in different locations between
the running kernel and the new kernel. Returns ENODEV if the reload
fails.
Change the error return from EFAULT to ENOEXEC when kernel_reload
gets a short write on the exec header.
 1.37 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.36 19-Mar-1996  is Add clobber lists at the appropriate places. The MMU initialization would
brake with gcc272 -O2.
 1.35 24-Feb-1996  chopps cast to arg to caddr_t (fixes #2114)
 1.34 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.33 05-Oct-1995  chopps branches: 1.33.2;
first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.32 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.31 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.30 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.29 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.28 07-May-1995  chopps rm unused local vars
 1.27 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.26 12-Feb-1995  chopps fixup some copyrights
 1.25 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.24 28-Dec-1994  chopps some cleanup and support for non-contig memory from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.23 26-Oct-1994  cgd new RCS ID format.
 1.22 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.21 21-Jun-1994  chopps a3000 hack
 1.20 16-Jun-1994  chopps add eclockfreq. remove physstrat from machdep and cleanup a little.
 1.19 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.18 25-May-1994  chopps MIN() -> min()
 1.17 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.16 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 21-May-1994  chopps sys/vmmeter.h, sys/user.h and vm/vm.h shuffle.
 1.14 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.13 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.12 18-Apr-1994  chopps make current with recent vm changes, also clean old from genassym
 1.11 20-Mar-1994  chopps kernel ddb now has symbols
 1.10 08-Mar-1994  chopps Little bit of cleanup, didn't go near the GNU stuff aside from function
deeclaritors.
 1.9 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.8 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.7 11-Feb-1994  chopps Add missing $Id$'s
 1.6 01-Feb-1994  chopps removed compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.33.2.2 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.33.2.1 10-Nov-1995  chopps fix pmap bug (#1721) from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.41.4.4 03-Aug-1996  jtc Pulled up from rev 1.47 by request from Ignatios Souvatzis
 1.41.4.3 31-Jul-1996  jtc Pulled up from rev 1.45 by request from Ignatios
 1.41.4.2 21-Jun-1996  jtc Pulled up from version 1.44 by request from ignatios.

"use correct rather than guessed microsecond delay address in
delay() and DELAY() on the DraCo".,
 1.41.4.1 26-May-1996  is Pullup from trunk: Retina blanking bug, misc. cleanup including #ifdef'ing
out of annoying (to the normal user) debug code.
 1.56.8.1 10-Feb-1998  mellon Pull up 1.57 (is)
 1.65.2.1 04-Feb-2000  he Pull up revisions 1.67-1.68 (via patch, requested by is):
Add reboot code for Phase5 68040+PPC boards.
 1.66.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.67.4.1 14-Nov-1999  fvdl Sync with -current.
 1.67.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.67.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.67.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.67.2.1 20-Oct-1999  thorpej Sync w/ trunk.
 1.74.8.6 15-Jan-2003  thorpej Sync with HEAD.
 1.74.8.5 07-Jan-2003  thorpej Sync with HEAD.
 1.74.8.4 11-Dec-2002  thorpej Sync with HEAD.
 1.74.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.74.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.74.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.74.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.74.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.74.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.77.4.3 30-Jun-2003  grant Pull up revision 1.86 (requested by aymeric in ticket #1357):

Do not use RELOC() after the MMU is enabled.
Move the two assignments that were made after the MMU is on, before.

From Gunther Nikl on port-amiga@. Thanks!
 1.77.4.2 12-Jan-2003  jmc Pullup revisions 1.82-1.83 (via hand patch) (requested by aymeric, ticket #1066)
Change the bootstrap procedure to avoid temporarily mapping physical
memory.

Now, on the Amiga, we copy a small piece of code to chip memory and
enable the MMU from here.
On the DraCo, we setup %itt0 so that we shadow physical memory without
touching the page tables and very temporarily. The DraCo's memory layout
guarantees that there is no overlap in this case between physical and
virtual addresses.

This fixes a bug where Amiga's with physical memory at 0x200000
wouldn't boot kernels >2M in size, and possibly other corner cases.
 1.77.4.1 05-Jun-2002  lukem Pull up revision 1.79 (requested by aymeric in ticket #172):
Setting chipmem_start and chipmem_end to the same value (size of chip
memory) greatly confuses the chip memory allocator and can prevent
some systems from even starting the kernel. Remove the initialization
of chipmem_start (it's initialized in locore.s).
 1.77.2.1 09-Jul-2002  gehenna catch up with -current.
 1.87.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.87.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.87.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.87.2.1 03-Aug-2004  skrll Sync with HEAD
 1.89.2.4 21-Jan-2008  yamt sync with head
 1.89.2.3 03-Sep-2007  yamt sync with head.
 1.89.2.2 26-Feb-2007  yamt sync with head.
 1.89.2.1 21-Jun-2006  yamt sync with head.
 1.91.8.1 13-Mar-2006  yamt sync with head.
 1.91.6.1 22-Apr-2006  simonb Sync with head.
 1.91.4.1 09-Sep-2006  rpaulo sync with head
 1.92.18.2 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.92.18.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.92.16.2 04-Jun-2007  bouyer Pull up following revision(s) (requested by mhitch in ticket #693):
sys/arch/amiga/amiga/amiga_init.c: revision 1.96
PTE for Sysptmap was not getting set correctly.
 1.92.16.1 23-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #659):
sys/arch/amiga/amiga/amiga_init.c: revision 1.95
sys/arch/amiga/include/vmparam.h: revision 1.35
sys/arch/amiga/amiga/pmap.c: revision 1.123
Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).
- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.
A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.92.12.1 01-Feb-2007  ad Sync with head.
 1.93.2.2 17-May-2007  yamt sync with head.
 1.93.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.94.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.94.10.1 22-May-2007  matt Update to HEAD.
 1.94.4.1 11-Jul-2007  mjf Sync with head.
 1.94.2.2 09-Jun-2007  ad Sync with head.
 1.94.2.1 27-May-2007  ad Sync with head.
 1.97.10.2 09-Jan-2008  matt sync with HEAD
 1.97.10.1 06-Nov-2007  matt sync with HEAD
 1.98.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.98.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.99.26.1 20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.99.20.1 16-Jul-2010  riz Pull up following revision(s) (requested by phx in ticket #1412):
sys/arch/amiga/dev/clock.c: revision 1.51
sys/arch/amiga/amiga/locore.s: revision 1.149 via patch
sys/arch/amiga/dev/kbd.c: revision 1.53
sys/arch/amiga/amiga/amiga_init.c: revision 1.118
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.99.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.99.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.99.10.3 11-Aug-2010  yamt sync with head.
 1.99.10.2 11-Mar-2010  yamt sync with head
 1.99.10.1 04-May-2009  yamt sync with head.
 1.99.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.106.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.118.4.3 05-Mar-2011  rmind sync with head
 1.118.4.2 03-Jul-2010  rmind sync with head
 1.118.4.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.118.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.122.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.124.6.1 18-Feb-2012  mrg merge to -current.
 1.124.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.124.2.2 30-Oct-2012  yamt sync with head
 1.124.2.1 17-Apr-2012  yamt sync with head
 1.126.8.1 07-Sep-2013  bouyer Pull up following revision(s) (requested by rkujawa in ticket #935):
sys/arch/amiga/amiga/amiga_init.c: revision 1.127
sys/arch/m68k/m68k/pmap_motorola.c: revision 1.66
Set user page table base address dynamically on amiga. This unbreaks =
machines
with large Zorro III I/O spaces. Patch originally by Michael L. Hitch.
Test on an A4000.
=20
=20
 1.126.2.1 07-Sep-2013  bouyer Pull up following revision(s) (requested by rkujawa in ticket #935):
sys/arch/amiga/amiga/amiga_init.c: revision 1.127
sys/arch/m68k/m68k/pmap_motorola.c: revision 1.66
Set user page table base address dynamically on amiga. This unbreaks =
machines
with large Zorro III I/O spaces. Patch originally by Michael L. Hitch.
Test on an A4000.
=20
=20
 1.127.2.1 25-Feb-2013  tls resync with head
 1.129.38.1 10-Jun-2019  christos Sync with HEAD
 1.129.36.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.133.2.1 02-Aug-2025  perseant Sync with HEAD
 1.122 14-Oct-2023  andvar fix various typos in comments and documentation, mainly in word "between".
 1.121 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.120 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.119 27-Apr-2021  thorpej branches: 1.119.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.118 24-Apr-2021  thorpej branches: 1.118.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.117 24-Aug-2014  mlelstv branches: 1.117.4; 1.117.10; 1.117.34;
use RAW_PART to trigger read of disklabel, other units might by busy due
to discovered wedges.
 1.116 26-Dec-2013  rkujawa branches: 1.116.4;
Implement the probe procedure for ACA500. Now the user just needs acafh0
compiled in his kernel and it all should(tm) work.

Due to lack of obio in amiga port, the probe is called directly from mbattach().
This is going to change with the introduction of obio for all non-autoconfig
expansions.
 1.115 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.114 27-Oct-2012  chs branches: 1.114.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.113 29-Jul-2012  mlelstv branches: 1.113.2;
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
 1.112 13-Jul-2012  rkujawa Clean up p5pb console glue a bit.
 1.111 17-Apr-2012  rkujawa Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.110 12-Feb-2012  matt branches: 1.110.2;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.109 24-Jan-2012  rkujawa Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.108 04-Aug-2011  rkujawa branches: 1.108.2; 1.108.6;
Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.107 03-Jun-2011  matt CFATTACH_DECL_NEW, device_t, cfdata_t
 1.106 13-Jan-2011  phx branches: 1.106.2; 1.106.6;
Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.105 21-May-2010  phx idesc(4) does no longer exist
 1.104 19-May-2009  phx branches: 1.104.2; 1.104.4;
Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.103 18-Mar-2009  cegger bcmp -> memcmp
 1.102 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.101 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.100 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.99 13-Jun-2008  cegger branches: 1.99.4; 1.99.10;
- use device_lookup to get device_t
- use device_xname to get device name
 1.98 11-Dec-2005  christos branches: 1.98.74; 1.98.76; 1.98.78; 1.98.80; 1.98.82;
merge ktrace-lwp.
 1.97 03-Jul-2005  isaki branches: 1.97.2;
cfmatch_t was removed at sys/device.h rev 1.75,
and there is no need to cast for NULL.
 1.96 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.95 13-Jun-2005  jmc Constify
 1.94 12-Jun-2005  jandberg Constify parameters of matchname() to please -Wcast-qual.
 1.93 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.92 27-Oct-2003  mhitch Fix uninitialized variable.
 1.91 20-Jan-2003  aymeric branches: 1.91.2;
fill in the dv_unit field of the fake "struct device" correctly.
In particular, this makes grfN, N != 0, work as console.
Tested by Ignatios.
 1.90 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.89 08-Jan-2003  aymeric initialize the dv_unit field of our fake device structure to 0, as done on x68k.
This fixes the problem where no grf* console would be found on startup because
they wouldn't match with any parent.
While here, memset() that structure to zero so that we either pass or crash
right away if the MI code changes again. From Leo Weppelman, as done on atari.
 1.88 07-Jan-2003  aymeric fake up a dv_cfdriver entry before calling config_search().
config_search() does not do the lookup for us anymore.
 1.87 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.86 04-Oct-2002  thorpej Overhaul the way cfattach structures are looked up. The cfdata entry
now carries the name of the attachment (e.g. "tlp_pci" or "audio"),
and cfattach structures are registered at boot time on a per-driver
basis. The cfdriver and cfattach pointers are cached in the device
structure when attached.
 1.85 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.84 30-Sep-2002  thorpej Add a config_init() function to initialize the config data structures.
Normally this is called by configure(), but some ports (amiga, atari,
x68k) need to do this early because of how they find the console.
 1.83 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.82 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.81 25-Apr-2002  aymeric branches: 1.81.2;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.80 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.79 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.78 02-Feb-2001  is branches: 1.78.2; 1.78.4; 1.78.8;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.77 10-Jun-2000  frueauf recently findroot() was changed to get no arguments, so remove the
arguments in the findroot() call withing cpu_rootconf().
 1.76 01-Jun-2000  matt Fix a missing cases of devpp -> booted_device, partp -> booted_parition
 1.75 01-Jun-2000  matt Don't pass booted_* to findroot/getdevice, access them via the globals.
Also, make findroot static. This eliminates unneeded clearing of them
and make their use consistent among the ports.
 1.74 01-Jun-2000  matt Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
 1.73 18-May-2000  kleink branches: 1.73.2;
Restructure the ms(4) autoconfiguration code to attach as a single device
instance and select a mouse port via the least significant bit of its
device minor number. Fixes abuse of cf_unit in this driver.
 1.72 30-Mar-2000  is The cfunit (ab)use fix broke the Amiga early console autoconfiguration.
 1.71 15-Mar-2000  kleink Kill a couple of unnecessary cf_unit (ab)uses.
 1.70 06-Feb-2000  mhitch Remove an "#if 0" I seemed to have missed, to include wd* devices in the
search for root filesystems.
 1.69 31-Jan-2000  mhitch Add check for wdc [MI wdc support].
Move 'cd' device back to end of the genericconf table - we want to check
the 'wd' device before the 'cd' device.
 1.68 25-Jan-2000  aymeric oops. Comment out #include "wd.h" as I didn't commit generic wdc code yet.
 1.67 23-Jan-2000  aymeric add PCMCIA initialization
 1.66 17-Sep-1999  thorpej branches: 1.66.2;
Centralize the declaration and clearing of `cold'.
 1.65 15-Sep-1999  thorpej Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
 1.64 07-Jun-1999  thorpej Don't pass a nam2blk around at all; just have setroot() and friends reference
dev_name2blk[] directly. Addresses PR #7622 (ITOH Yasufumi), although
in a different way.
 1.63 01-Apr-1999  thorpej branches: 1.63.4;
Don't call configure() from cpu_startup().
 1.62 19-Mar-1999  is Yet more kernel startup debug code
 1.61 26-Jul-1998  is yet more atomic operations accessing DraCo registers
 1.60 03-Jul-1998  mhitch Add memory disk.
 1.59 15-Jan-1998  is struct cfdrivers are emitted by config(8) into ioconf.c, nowadays. Delete
mainbus_cd here.
 1.58 13-Nov-1997  is Oops. Somehow the code to actually config_find the BBC on A1200s wasn't
committed.
 1.57 16-Oct-1997  is branches: 1.57.2;
Move zbus attachment to the end, so that motherboard devices don't "jump"
if zbus devices of the same class are added.
 1.56 31-Aug-1997  is We may not open the 'a' partition here, as there are Amiga partition tables
without an 'a' partition. We open the RAW_PART partition instead.
Without this, a boot partition on the 'b' or later partition of such a disk
won't be found.
 1.55 27-Aug-1997  is Oops, forgot this in last kilocommit:
Attach com at drsupio, drsupio at mainbus, and make
the ttyC0 stuff refer to the com driver.
 1.54 23-Jul-1997  is branches: 1.54.2;
Fix the mess I apparently have done committing 1.52 of autoconf.c
In particular: add back the 1.50->1.51 change, and add back Amiga audio.
Thanks to Thorsten Frueauf, who pointed this out in PR 3911.
 1.53 22-Jul-1997  is Fix PR 3907 by Thorsten Frueauf, using his first method.
 1.52 19-Jul-1997  is Make Amiga battery clocks autoconfiguration devices, so that they can be
left out of specialized configurations.
 1.51 15-Jun-1997  mhitch When trying to find the boot partition, look at all partitions marked as ffs
or swap partitions. Booting from a miniroot on the swap partition will
detect the miniroot as the boot partition (if the bootblock loader passes
the boot partition offset to the kernel).
 1.50 14-Jun-1997  is Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.49 26-Mar-1997  gwr Move findroot/setroot stuff from configure() to cpu_rootconf().
 1.48 15-Mar-1997  mhitch After opening the disk device to force a disklabel read, it should really
be closed rather than opened again.
 1.47 31-Jan-1997  mhitch branches: 1.47.2;
If the bootloader passes the boot partition offset, try to determine which
disk device was the boot device and use that for setroot().
 1.46 31-Jan-1997  thorpej Use the new machine-independent setroot().
 1.45 23-Dec-1996  veego branches: 1.45.2;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.44 17-Dec-1996  is Make clock an early configuration device, configured before early console
configuration. This way, the delay loop is calibrated before graphics and
serial hardware is touched.

This change should smooth pr 2890 by Thorsten Frueauf (also privately
reported by Laurent Badoukh). While the real problem with those is the
paranoically high delay() calls in the grf_cl initialization, it was made
even more visible by the miscalibrated (to the save side) new style delay
loop.
 1.43 13-Oct-1996  christos backout previous kprintf change
 1.42 11-Oct-1996  mhitch Add missing const to simple_devprint() char * parameter.
 1.41 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.40 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.39 24-May-1996  is Delete some occurences of kernel startup debug code, move others inside
#ifdef DEBUG_KERNEL_START.
 1.38 12-May-1996  mhitch branches: 1.38.4;
Use dumpconf() to set dumplo instead of directly setting it.
 1.37 10-May-1996  is Clean up the mess I left over from my yestereve's commit: partially unused
variables left over from color background debugging, partially wrong #ifdefs
making some variables unused in non-M68060 kernels.
 1.36 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.35 30-Apr-1996  is We really have two mouse port units, honestly.
 1.34 27-Apr-1996  veego Fixed a compile bug which come from the new mouse driver
Fixed a bug with the noreturn attribute of boot and doboot
 1.33 24-Apr-1996  is Make the Amiga mainboard mice, which used to be pseudo-devices, real devices.
(We want to support Amigoids without this interface in the near future.)
 1.32 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.31 04-Apr-1996  cgd update for the fact that config_found() and config_rootfound() now
return pointers. (Check vs. NULL, rather than just boolean tests.)
 1.30 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.29 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.28 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.27 28-Dec-1994  chopps support consolidated zbus.
 1.26 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.25 26-Oct-1994  cgd new RCS ID format.
 1.24 22-Jun-1994  chopps cleanup and recognize the a1200.
 1.23 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.22 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.21 03-Jun-1994  chopps z buses early config support, needs testing.
 1.20 29-May-1994  chopps new floppy driver from me to replace the old one.
 1.19 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.18 11-May-1994  chopps fix mmutype recocgnition cleanup cpu identify and other boot diags.
 1.17 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.16 22-Apr-1994  chopps changes to allow fd as boot device.
 1.15 10-Apr-1994  chopps missed a cast.
 1.14 07-Apr-1994  chopps fp -> fd from (rhealey@aggregate.com)Z
 1.13 05-Apr-1994  chopps incorpaorated floppy code from Brad Pepers, needs work doesn't work on my
machine. more clenaup in trap.c
 1.12 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.11 08-Mar-1994  chopps Little bit of cleanup, didn't go near the GNU stuff aside from function
deeclaritors.
 1.10 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.9 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.8 11-Feb-1994  chopps Add missing $Id$'s
 1.7 01-Feb-1994  chopps fixed warning. Cmem alloc is now top down. added bootstrap version
number to locore for loadbsd. removed tz rz from conf.c
 1.6 01-Feb-1994  chopps removed compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.38.4.1 26-May-1996  is Pullup from trunk: Retina blanking bug, misc. cleanup including #ifdef'ing
out of annoying (to the normal user) debug code.
 1.45.2.2 20-Jan-1997  mhitch Fix a few errors in Jason's setroot changes.
 1.45.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.47.2.1 02-Mar-1997  mrg swapconf() is no more.
 1.54.2.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.57.2.1 14-Nov-1997  mellon Pull rev 1.58 up from trunk (is)
 1.63.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.66.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.66.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.73.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.78.8.10 15-Jan-2003  thorpej Sync with HEAD.
 1.78.8.9 07-Jan-2003  thorpej Sync with HEAD.
 1.78.8.8 03-Jan-2003  thorpej Sync with HEAD.
 1.78.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.78.8.6 17-Sep-2002  nathanw Catch up to -current.
 1.78.8.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.78.8.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.78.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.78.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.78.8.1 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.78.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.78.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.78.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.78.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.81.2.1 16-May-2002  gehenna Replace the direct-access to devsw table with calling devsw API.
 1.91.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.91.2.5 21-Nov-2004  skrll Adapt to branch.
 1.91.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.91.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.91.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.91.2.1 03-Aug-2004  skrll Sync with HEAD
 1.97.2.1 21-Jun-2006  yamt sync with head.
 1.98.82.1 18-Jun-2008  simonb Sync with head.
 1.98.80.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.98.78.3 11-Aug-2010  yamt sync with head.
 1.98.78.2 20-Jun-2009  yamt sync with head
 1.98.78.1 04-May-2009  yamt sync with head.
 1.98.76.1 17-Jun-2008  yamt sync with head.
 1.98.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.99.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.99.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.104.4.3 12-Jun-2011  rmind sync with head
 1.104.4.2 05-Mar-2011  rmind sync with head
 1.104.4.1 30-May-2010  rmind sync with head
 1.104.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.106.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.106.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.108.6.2 29-Apr-2012  mrg sync to latest -current.
 1.108.6.1 18-Feb-2012  mrg merge to -current.
 1.108.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.108.2.3 30-Oct-2012  yamt sync with head
 1.108.2.2 23-May-2012  yamt sync with head.
 1.108.2.1 17-Apr-2012  yamt sync with head
 1.110.2.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.113.2.3 03-Dec-2017  jdolecek update from HEAD
 1.113.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.113.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.114.2.1 18-May-2014  rmind sync with head
 1.116.4.1 08-Jun-2015  snj Pull up following revision(s) (requested by mlelstv in ticket #832):
sys/arch/amiga/amiga/autoconf.c: revision 1.117
use RAW_PART to trigger read of disklabel, other units might by busy due
to discovered wedges.
 1.117.34.2 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.117.34.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.117.10.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.117.4.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.118.2.1 13-May-2021  thorpej Sync with HEAD.
 1.119.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.3 16-Feb-2022  riastradh powerpc: Sprinkle "memory" clobbers on eieio and nearby asm blocks.

Otherwise the compiler may reorder these around loads and stores,
which mostly defeats the purpose. `asm volatile' just ensures the
instruction isn't _deleted_; it may still move around.
 1.2 12-Nov-2015  phx Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.1 04-Aug-2011  rkujawa branches: 1.1.12; 1.1.30;
Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.1.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.12.1 03-Dec-2017  jdolecek update from HEAD
 1.13 18-May-2022  andvar fix typos in word "access" and it derivatives, mainly in comments.
 1.12 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.
 1.11 03-Feb-2010  phx Ensure reorder protection for amigappc in all bus space functions.
The ne(4) driver (XSurf2), which is the only bus_space device I got,
works now.
 1.10 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.9 28-Apr-2008  martin branches: 1.9.8; 1.9.14;
Remove clause 3 and 4 from TNF licenses
 1.8 28-Jan-2002  aymeric branches: 1.8.118; 1.8.120; 1.8.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 16-Feb-1999  is branches: 1.6.22; 1.6.26;
Fix Copyright dates
 1.5 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.4 08-Nov-1998  is - declare method arrays in bus.h
- add interleaved_wordaccess method array
 1.3 12-Oct-1998  is Make the data pointer of the write_multi, write_region and write_stream
methods const *.
 1.2 12-Oct-1998  is - add bus_space_{copy,set}_region_{1,2} support and implementation for
_1 and for _2 in the contiguous and interleaved case.

- while we're here, reorganize bus.h into sections, and use the defined
convenience functions everywhere.
 1.1 08-Oct-1998  is - define framework for >8bit transfers
- implement 16 bit contiguous and 16 bit interleaved, both big-endian
 1.6.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.122.3 11-Mar-2010  yamt sync with head
 1.8.122.2 04-May-2009  yamt sync with head.
 1.8.122.1 16-May-2008  yamt sync with head.
 1.8.120.1 18-May-2008  yamt sync with head.
 1.8.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.28 12-Aug-2021  andvar s/iterrupt sever/interrupt server/
 1.27 20-Aug-2017  maxv spl leak, found by mootja
 1.26 22-Jan-2014  christos branches: 1.26.4; 1.26.6; 1.26.8; 1.26.16; 1.26.22;
gcc-4.8.x unused variable fixes
 1.25 03-Jan-2014  mlelstv Fix allocator routines. Instead of abusing CIRCLEQ pointers, add an explicit
type field to tag memory nodes that are or are not on the free list.
 1.24 27-Nov-2013  christos Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@
 1.23 23-Nov-2013  christos convert to TAILQ, remove open-coded CIRCLEQ
 1.22 20-Dec-2010  matt branches: 1.22.8; 1.22.14; 1.22.18; 1.22.20; 1.22.22; 1.22.28;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.21 18-Mar-2009  cegger branches: 1.21.4;
Ansify function definitions w/o arguments. Generated with sed.
 1.20 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.19 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.18 03-May-2003  wiz branches: 1.18.108; 1.18.116; 1.18.122;
DMA, not dma nor Dma.
 1.17 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.16 06-Jan-2003  wiz interrupt with two rs.
 1.15 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.14 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.13 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.12 20-Aug-1998  veego branches: 1.12.26; 1.12.30;
Add some braces to stop the new egcs warnings.
 1.11 23-Jun-1997  is Make aucc work in the presence of LEV6_DEFER.
 1.10 14-Jun-1997  is Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.9 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.8 28-Jan-1996  chopps make sure master enable is set #1920
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 23-Jun-1994  chopps fix to writeback code from Michael Hitch, and some cleanup in cc.c from me
 1.5 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.4 25-Mar-1994  chopps cc cleanup, dlist ==> sys/queue
 1.3 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.2 11-Feb-1994  chopps Add missing $Id$'s
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.12.30.3 07-Jan-2003  thorpej Sync with HEAD.
 1.12.30.2 20-Jun-2002  nathanw Catch up to -current.
 1.12.30.1 28-Feb-2002  nathanw Catch up to -current.
 1.12.26.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.26.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.18.122.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.116.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.108.1 04-May-2009  yamt sync with head.
 1.21.4.1 05-Mar-2011  rmind sync with head
 1.22.28.1 10-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #1544):

sys/arch/amiga/amiga/cc.c: revision 1.27 (patch)

spl leak, found by mootja
 1.22.22.1 18-May-2014  rmind sync with head
 1.22.20.1 10-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #1544):

sys/arch/amiga/amiga/cc.c: revision 1.27 (patch)

spl leak, found by mootja
 1.22.18.2 03-Dec-2017  jdolecek update from HEAD
 1.22.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.14.1 10-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #1544):

sys/arch/amiga/amiga/cc.c: revision 1.27 (patch)

spl leak, found by mootja
 1.22.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.22.1 09-Apr-2018  bouyer Pull up following revision(s) (requested by msaitoh in ticket #721):
sys/arch/amiga/amiga/cc.c: revision 1.27
spl leak, found by mootja
 1.26.16.1 10-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #1597):
sys/arch/amiga/amiga/cc.c: revision 1.27
spl leak, found by mootja
 1.26.8.1 09-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #1597):
sys/arch/amiga/amiga/cc.c: revision 1.27
spl leak, found by mootja
 1.26.6.1 28-Aug-2017  skrll Sync with HEAD
 1.26.4.1 09-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #1597):
sys/arch/amiga/amiga/cc.c: revision 1.27
spl leak, found by mootja
 1.19 12-Aug-2021  andvar s/iterrupt sever/interrupt server/
 1.18 03-Jan-2014  mlelstv Fix allocator routines. Instead of abusing CIRCLEQ pointers, add an explicit
type field to tag memory nodes that are or are not on the free list.
 1.17 23-Nov-2013  christos convert to TAILQ, remove open-coded CIRCLEQ
 1.16 05-Mar-2007  he branches: 1.16.78; 1.16.88; 1.16.94;
Use char* for pointer arithmetic.
 1.15 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14 25-Apr-2002  aymeric branches: 1.14.26; 1.14.64;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.13 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.12 01-Dec-2001  aymeric do not include opt_lev6_defer.h when compiling for powerpc
 1.11 08-May-2001  is branches: 1.11.2; 1.11.8;
defopt LEV6_DEFER.
 1.10 25-Sep-1999  is branches: 1.10.14;
vm_offset_t -> vaddr_t/paddr_t
 1.9 23-Jun-1997  is Make aucc work in the presence of LEV6_DEFER.
 1.8 14-Jun-1997  is Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.7 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.4 25-Mar-1994  chopps cc cleanup, dlist ==> sys/queue
 1.3 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.2 11-Feb-1994  chopps Add missing $Id$'s
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.10.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.11.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.11.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.11.8.1 08-May-2001  nathanw file cc.h was added on branch nathanw_sa on 2002-01-08 00:22:55 +0000
 1.11.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.64.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.26.1 03-Sep-2007  yamt sync with head.
 1.16.94.1 18-May-2014  rmind sync with head
 1.16.88.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.78.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 13-Feb-1994  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 13-Feb-1994  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 13-Feb-1994  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 13-Feb-1994  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 13-Feb-1994  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 01-Feb-1994  chopps fixed warning. Cmem alloc is now top down. added bootstrap version
number to locore for loadbsd. removed tz rz from conf.c
 1.3 30-Jan-1994  chopps Removed chipmem limit for all but GODZILLA, added CEND() copper list macro,
added views back in conf and fixed misc compile warns and errors.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 30-Jan-1994  chopps Removed chipmem limit for all but GODZILLA, added CEND() copper list macro,
added views back in conf and fixed misc compile warns and errors.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.6 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5 25-Apr-2002  aymeric branches: 1.5.26; 1.5.64;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.4 26-Feb-2001  is branches: 1.4.4; 1.4.8;
pack the structure to avoid aligning contraint problems with ELF compiler
 1.3 02-Apr-1995  chopps branches: 1.3.32;
cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 08-May-1994  chopps a few files that were forgoton in the last batch.
 1.3.32.1 12-Mar-2001  bouyer Sync with HEAD.
 1.4.8.1 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.64.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.26.1 03-Sep-2007  yamt sync with head.
 1.12 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.11 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.10 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.9 25-Apr-2002  aymeric branches: 1.9.116; 1.9.124; 1.9.130;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.8 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 12-Feb-1995  chopps branches: 1.6.46; 1.6.50;
fixup some copyrights
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.3 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.2 11-Feb-1994  chopps Add missing $Id$'s
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.6.50.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.46.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.130.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.124.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.116.1 04-May-2009  yamt sync with head.
 1.13 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.12 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.11 31-Aug-2001  simonb branches: 1.11.6;
Use comments around the token after a #endif.
 1.10 25-Sep-1999  is branches: 1.10.16;
vm_offset_t -> vaddr_t/paddr_t
 1.9 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.8 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.16.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.16.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.16.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.11.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.11.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.11.6.1 31-Aug-2001  nathanw file cia.h was added on branch nathanw_sa on 2002-02-28 04:06:19 +0000
 1.8 08-May-1994  mycroft Clean up deleted files.
 1.7 22-Feb-1994  chopps amiga now uses PROF and uses m68k/asm.h in locore.s
 1.6 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.5 08-May-1994  mycroft Clean up deleted files.
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.9 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.8 12-Feb-1995  chopps branches: 1.8.46; 1.8.50;
fixup some copyrights
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.5 17-Feb-1994  chopps modified to use generic cons, added kernel assert macro.
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.76 08-May-2023  skrll Ugly hack to fix the builds.
 1.75 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.74 03-Oct-2016  rkujawa Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.73 15-Dec-2011  phx branches: 1.73.6; 1.73.24; 1.73.28;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.72 11-Dec-2005  christos branches: 1.72.112; 1.72.116;
merge ktrace-lwp.
 1.71 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.70 26-Oct-2002  jdolecek branches: 1.70.6;
now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.69 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.68 19-Jul-2002  thorpej Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device. While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
 1.67 17-Jun-2002  christos MD systrace gluons.
 1.66 17-Jun-2002  lukem Add clockctl device (at major # 55).
 1.65 16-Mar-2002  martin branches: 1.65.4; 1.65.6;
Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
 1.64 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.63 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.62 21-Mar-2001  lukem branches: 1.62.2; 1.62.8;
move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
 1.61 02-Feb-2001  is branches: 1.61.2;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.60 14-Jan-2001  martin The i4b raw b-channel devices actually do have an ioctl routine,
so better add this to the cdevsw entry.
Noted by Bruno Achauer.
 1.59 08-Jan-2001  martin Add isdn devices to all archs that seem to support at least one of the
necessary busses. Sync comments with reality for archs that already had
the devices.
 1.58 05-Jan-2001  martin Enable the imported ISDN4BSD based ISDN subsystem.

This is the kernel part (userland to follow soon) of the latest (and
very probably last) release (version 0.96) of ISDN4BSD. ISDN4BSD has a
homepage at http://www.freebsd-support.de/i4b/.

It gives the user various ways to use the isdn connection: raw data (via
the i4brbch "raw b-channel" device), ppp (via the isp "isdn PPP" device),
voice/answering machine (the i4btel "telephone" device) and ip over isdn
(the ipr device, "IP over raw ISDN").

Supported are a bunch of common and older cards, more to be added soon
after some cleanup. Currently only the european E-DSS1 variant of the
ISDN D channel protocol is supported.
 1.57 31-Jan-2000  mhitch branches: 1.57.4;
Add the wd devices for MI wdc IDE drive support.
 1.56 19-Apr-1999  kleink branches: 1.56.2;
Add COMPAT_SVR4 for m68k.
 1.55 13-Nov-1998  oster branches: 1.55.6;
Updating of bdev's and cdev's to support RAIDframe.
 1.54 24-Oct-1998  is Oops. People without I4B should still be able to compile a kernel.
 1.53 23-Oct-1998  is This time, really add i4b to cdevsw[].
 1.52 23-Oct-1998  is oops, commit error. undo.
 1.51 23-Oct-1998  is Add entries for i4b devices / placeholders, like in i386 and Atari.
 1.50 10-Oct-1998  thorpej Add scsibus entry points to the cdevsw[].
 1.49 03-Jul-1998  mhitch Add memory disk.
 1.48 16-Oct-1997  christos fix chrtoblk declaration
 1.47 13-Oct-1997  explorer o Make usage of /dev/random dependant on
pseudo-device rnd # /dev/random and in-kernel generator
in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
that this code is derived in part from Ted Tyso's linux code.
 1.46 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.45 27-Sep-1997  is conf.h: declare com instead of drcom.
conf.c: remove com declarations.
 1.44 27-Aug-1997  is Oops, forgot this in last kilocommit:
Attach com at drsupio, drsupio at mainbus, and make
the ttyC0 stuff refer to the com driver.
 1.43 14-Jun-1997  is branches: 1.43.4;
Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.42 07-Jan-1997  mrg use pseudo-device ipfilter, not ipl.
 1.41 05-Jan-1997  veego use NIPL.
 1.40 05-Jan-1997  veego add ipl device.
 1.39 20-Dec-1996  veego - Add ch and uk devices.
- Change the ss device number from 25 to 37,
ATTENTION: you need to rerun /dev/MAKEDEV to update your devices files.
 1.38 30-Nov-1996  is Forgotten changes needed for the drcom driver.
 1.37 05-Sep-1996  mycroft Remove duplicate declarations of LKM functions and macros.
 1.36 19-May-1996  veego conf.c - added scsi scanner entry
pmap.c - -Wall fixes for MACHINE_NONCONTIG and M68040 || M68060
 1.35 27-Apr-1996  veego Fixed a compile bug which come from the new mouse driver
Fixed a bug with the noreturn attribute of boot and doboot
 1.34 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.33 14-Mar-1996  christos fdopen -> filedescopen
 1.32 30-Sep-1995  chopps changes for msc device
 1.31 17-Aug-1995  thorpej Add entries for the ccd.
 1.30 04-Jul-1995  mycroft Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely. Remove d_strategy from cdevsw to
force the abstraction barrier.
 1.29 26-Jun-1995  chopps missed one fdopen
 1.28 23-Apr-1995  chopps bring up-to-date with recent conf.c and sunos changes.
 1.27 13-Apr-1995  chopps make things work with newest conf.c changes
 1.26 10-Apr-1995  mycroft Minor consistency nits.
 1.25 10-Apr-1995  mycroft Update for conf.h.
 1.24 02-Mar-1995  chopps enable tun.
 1.23 25-Jan-1995  cgd vn -> vnd renaming, for consistency
 1.22 28-Dec-1994  chopps couple fixes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.21 14-Dec-1994  mycroft Remove extra arg to d_open.
 1.20 13-Dec-1994  mycroft fdclose -> Fdclose
 1.19 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.18 14-Nov-1994  christos changed open prototype
 1.17 26-Oct-1994  cgd new RCS ID format.
 1.16 29-May-1994  chopps new floppy driver from me to replace the old one.
 1.15 28-May-1994  cgd mirror recent i386 changes to conf and regarding profiling in trap
and swtch nameing changes.
(RCS file fixup)
 1.14 28-May-1994  cgd resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
(RCS file fixup)
 1.13 28-May-1994  cgd dummy, to keep versions consistent.
(RCS file fixup)
 1.12 28-May-1994  cgd old rev 1.12 and 1.13:
incorpaorated floppy code from Brad Pepers, needs work doesn't work on my
machine. more clenaup in trap.c
and:
fp -> fd, consistency good. [nameclash bad.]
(RCS file fixup)
 1.11 08-Mar-1994  chopps cannot conditionally reserve spots for lkm devices.
 1.10 20-Feb-1994  chopps fixed cmopile warns with LKM enabled.
 1.9 17-Feb-1994  chopps modified to use generic cons, added kernel assert macro.
 1.8 11-Feb-1994  chopps Add missing $Id$'s
 1.7 11-Feb-1994  chopps update proto(non) for dump call.
 1.6 01-Feb-1994  chopps fixed warning. Cmem alloc is now top down. added bootstrap version
number to locore for loadbsd. removed tz rz from conf.c
 1.5 30-Jan-1994  chopps Removed chipmem limit for all but GODZILLA, added CEND() copper list macro,
added views back in conf and fixed misc compile warns and errors.
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.43.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.43.4.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.55.6.1 21-Jun-1999  thorpej Sync w/ -current.
 1.56.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.56.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.56.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.56.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.56.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.57.4.1 01-May-2001  he Pull up revision 1.60 (via patch, requested by martin):
Add ioctl entry to cdevsw for i4b raw B-channel devices.
 1.61.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.62.8.7 11-Nov-2002  nathanw Catch up to -current
 1.62.8.6 17-Sep-2002  nathanw Catch up to -current.
 1.62.8.5 01-Aug-2002  nathanw Catch up to -current.
 1.62.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.62.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.62.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.62.8.1 21-Mar-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:06:20 +0000
 1.62.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.62.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.62.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.62.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.65.6.1 18-Jun-2002  lukem Pull up revision 1.66 (requested by lukem in ticket #315):
Add clockctl device (at major # 55).
 1.65.4.3 21-Jul-2002  gehenna catch up with -current.
 1.65.4.2 09-Jul-2002  gehenna catch up with -current.
 1.65.4.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.70.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.70.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.70.6.1 03-Aug-2004  skrll Sync with HEAD
 1.72.116.1 18-Feb-2012  mrg merge to -current.
 1.72.112.1 17-Apr-2012  yamt sync with head
 1.73.28.1 04-Nov-2016  pgoyette Sync with HEAD
 1.73.24.1 05-Oct-2016  skrll Sync with HEAD
 1.73.6.1 03-Dec-2017  jdolecek update from HEAD
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 30-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.3 22-Jun-1994  mycroft Clean up deleted files.
 1.2 11-Feb-1994  chopps Add missing $Id$'s
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.7 17-Feb-1994  mycroft Clean up deleted files.
 1.6 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.5 17-Feb-1994  mycroft Clean up deleted files.
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.12 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.11 25-Sep-1999  is branches: 1.11.16; 1.11.20;
vm_offset_t -> vaddr_t/paddr_t
 1.10 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.9 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.6 05-Apr-1994  chopps incorpaorated floppy code from Brad Pepers, needs work doesn't work on my
machine. more clenaup in trap.c
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11.20.1 20-Jun-2002  nathanw Catch up to -current.
 1.11.16.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14 02-Nov-2002  chs enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
 1.13 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.12 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.11 29-Jun-2000  mrg branches: 1.11.4; 1.11.8;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.10 25-Sep-1999  is branches: 1.10.2;
vm_offset_t -> vaddr_t/paddr_t
 1.9 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.8 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.7 10-Jun-1997  veego branches: 1.7.4;
s/amiga_trunc_page/m68k_trunc_seg/
 1.6 09-Dec-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.2 28-Jan-1996  chopps use dma_cachectl instead of cachectl
 1.1 13-Feb-1995  chopps ddb support
 1.7.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.10.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.11.8.2 11-Nov-2002  nathanw Catch up to -current
 1.11.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.11.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.16 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.15 27-Apr-2021  thorpej branches: 1.15.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.14 27-Oct-2012  chs branches: 1.14.18; 1.14.54;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.13 09-Feb-2010  phx branches: 1.13.10; 1.13.20;
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
 1.12 05-Feb-2010  phx branches: 1.12.2;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.11 11-Jun-2008  tsutsui Use device_private() and device_lookup_private() to get softc.
 1.10 11-Dec-2005  christos branches: 1.10.74; 1.10.76; 1.10.78; 1.10.80; 1.10.82;
merge ktrace-lwp.
 1.9 12-Jun-2005  jandberg Constify parameters of matchname() to please -Wcast-qual.
 1.8 25-Apr-2002  aymeric branches: 1.8.10;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 27-Aug-1996  cgd branches: 1.6.42; 1.6.46;
change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.5 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 16-May-1994  chopps ()'s for macro args, sheesh.
 1.2 16-May-1994  chopps add macro and fix typo.
 1.1 08-May-1994  chopps a few files that were forgoton in the last batch.
 1.6.46.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.46.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.42.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.42.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.10.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.82.1 18-Jun-2008  simonb Sync with head.
 1.10.80.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.10.78.1 04-May-2009  yamt sync with head.
 1.10.76.1 17-Jun-2008  yamt sync with head.
 1.10.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.12.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.13.20.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.10.1 30-Oct-2012  yamt sync with head
 1.14.54.1 13-May-2021  thorpej Sync with HEAD.
 1.14.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.15.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.72 05-Jul-2022  andvar s/odly/oddly/ in comments.
 1.71 05-Dec-2021  msaitoh s/invlid/invalid/ in comment.
 1.70 03-Apr-2019  christos centralize setdisklabel(9)
 1.69 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.68 15-Aug-2017  mlelstv branches: 1.68.2; 1.68.4;
Fix check of AmigaDOS environment vector for nonstandard disklabel values.
Don't set a default fsize for CD9660 partitions, the CD9660 filesystem
interprets it as a session offset.
 1.67 12-Mar-2017  mlelstv branches: 1.67.6;
use printf format macros for fixed-sized integers.
 1.66 27-Feb-2017  rin If lp->d_secsize is updated, we need to reallocate the buffer.
Thanks mlelstv for his comment on port-amiga.
 1.65 25-Feb-2017  rin multiply the missing factor to offset when sorting partitions
(harmless for ``normal'' disks although)
 1.64 25-Feb-2017  rin fix off-by-one
 1.63 04-Jul-2015  maxv branches: 1.63.2; 1.63.4;
Remove a dead continue.

Harmless, found by Brainy
 1.62 21-Sep-2014  christos branches: 1.62.2;
remove dead code
 1.61 22-Jan-2014  christos branches: 1.61.4;
gcc-4.8.x unused variable fixes
 1.60 12-Sep-2009  phx branches: 1.60.12; 1.60.22; 1.60.26;
Make disklabel.h from amiga and amigappc include the MI sys/disklabel_rdb.h.
amiga/amiga/adosglue.h was deleted and moved into sys_disklabel_rdb.h, as both
are always needed together (disksubr.c and ofppc/stand/ofwboot/rdb.c).
 1.59 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.58 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.57 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.56 02-Jan-2008  ad branches: 1.56.10; 1.56.18; 1.56.24;
Merge vmlocking2 to head.
 1.55 17-Oct-2007  garbled branches: 1.55.2; 1.55.4; 1.55.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.54 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.53 05-Mar-2007  he branches: 1.53.2; 1.53.10; 1.53.18; 1.53.20; 1.53.22;
Use char* for pointer arithmetic.
 1.52 30-Nov-2006  mhitch branches: 1.52.4;
Something I've wanted to do for quite some time: while looking for the
RDSK block, check for a valid native NetBSD label. If found, use the
NetBSD label. When writedisklabel() gets called, if no RDB was found,
write out the native NetBSD label. The disk won't be usable by AmigaDOS,
but is usable as a 'normal' NetBSD drive, with partition changes saved in
the disk label.
 1.51 25-Nov-2006  mhitch If no 'a' partition on initial label, create a BSDFFS 'a' partition for the
default label. Allows creating an FFS filesystem on an unlabeled disk
without needing to use the RAW partition. If an RDSK block is found,
reset the default label prior to processing the PART blocks.
 1.50 25-Nov-2006  mhitch Correct spelling in comment.
 1.49 25-Nov-2006  scw Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
 1.48 03-Aug-2006  mhitch branches: 1.48.4; 1.48.6;
Add a new ADOS partition type, "RAI?" to specify a RaidFrame partiion
which can then be autoconfigured. Currently can only use the 'c'
partition of the raid* device, since there will be no RDB on the device.
 1.47 11-Dec-2005  christos branches: 1.47.4; 1.47.8;
merge ktrace-lwp.
 1.46 13-Jun-2005  jandberg branches: 1.46.2;
Constify pointers to string constants.
 1.45 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.44 10-May-2003  thorpej branches: 1.44.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.43 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.42 06-Jan-2003  wiz successful with only one l.
 1.41 05-Mar-2002  simonb Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
 1.40 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.39 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.38 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.37 06-May-2001  is branches: 1.37.2; 1.37.4; 1.37.8;
Be more verbose in the warnings.
 1.36 20-Nov-2000  chs branches: 1.36.2;
rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
 1.35 19-May-2000  thorpej A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
 1.34 16-May-2000  thorpej Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.33 30-Mar-2000  tsutsui Remove register declarations.
 1.32 18-Jan-2000  thorpej Use b_cylinder as defined in sys/buf.h
 1.31 02-Jun-1999  is branches: 1.31.2; 1.31.8;
Handle RDB ( Amiga native ) partition tables on media with more than 512
bytes/sector correctly.
Submitted by Detlev W�rkner in PR 7653.
Non-trivial merge with the 1.30 change (handle old AmigaDOS fs partitions
with simulated sectorsperblock > 1) by myself, so don't blame Detlev if it
doesn't work (but I checked!).
XXX We still need changes to the file systems to handle this fully.
 1.30 30-May-1999  is Support for a ... somewhat strange method of doing >512 byte/block
ADOSFS partitions. By Matthias Scheler via PR 2559. A diagnostic
check was updated by myself.
 1.29 28-Apr-1999  is Recognize Linux ext2fs partitions. (Used to be marked as unknown).
 1.28 17-Apr-1998  veego branches: 1.28.8;
Add missing int after an register.
 1.27 13-Oct-1996  christos backout previous kprintf change
 1.26 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.25 30-Apr-1996  mhitch dk_establish() now returns void.
 1.24 29-Apr-1996  mhitch Correct NetBSD->RDB partition block mapping - fixes -Wall warning.
 1.23 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.22 05-Apr-1996  mhitch Compute partition offset with sectors/track and number of heads from the
Amiga partition block. Print a diagnostic if the sectors/track or
number of heads differs from the RDSK values.
Fix sorting by partition offset (don't drop last partition).
Save filesystem blocksize for adosfs partitions. (Closes PR 2232)
 1.21 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.20 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.18 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.17 11-Feb-1995  chopps add some missing copyrights.
 1.16 28-Dec-1994  chopps additional checks for zero in RDB values. Change handling of reserved
blocks for adosfs. Add some support for disks with block size other than 512.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 06-Jul-1994  chopps make disklabel code more sane
 1.13 04-Jul-1994  chopps move to new disk minor encoding (parts have lowest 4 bits instead of 3)
 1.12 27-Jun-1994  chopps recognize amix partitions that are of bsd 4.2 type.
 1.11 23-Jun-1994  chopps fix spelling.
 1.10 25-May-1994  chopps add AMIX dostype and some changes (hacks) to RDB code.
 1.9 16-May-1994  chopps move mysterious dk_establish() stub routine from gtsc driver to disksubr.c
 1.8 11-May-1994  chopps fix mmutype recocgnition cleanup cpu identify and other boot diags.
 1.7 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.28.8.3 22-Jun-1999  perry pullup 1.30->1.31 (is)
 1.28.8.2 21-Jun-1999  perry pullup 1.29->1.30 (is)
 1.28.8.1 28-Apr-1999  perry branches: 1.28.8.1.2; 1.28.8.1.4;
pullup 1.28->1.29 (is)
 1.28.8.1.4.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.28.8.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.31.8.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.31.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.31.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.36.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.37.8.4 07-Jan-2003  thorpej Sync with HEAD.
 1.37.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.37.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.37.8.1 06-May-2001  nathanw file disksubr.c was added on branch nathanw_sa on 2002-02-28 04:06:21 +0000
 1.37.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.37.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.37.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.44.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.44.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.44.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.44.2.1 03-Aug-2004  skrll Sync with HEAD
 1.46.2.4 21-Jan-2008  yamt sync with head
 1.46.2.3 27-Oct-2007  yamt sync with head.
 1.46.2.2 03-Sep-2007  yamt sync with head.
 1.46.2.1 30-Dec-2006  yamt sync with head.
 1.47.8.1 11-Aug-2006  yamt sync with head
 1.47.4.1 09-Sep-2006  rpaulo sync with head
 1.48.6.1 10-Dec-2006  yamt sync with head.
 1.48.4.1 12-Jan-2007  ad Sync with head.
 1.52.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.53.22.1 14-Oct-2007  yamt sync with head.
 1.53.20.2 09-Jan-2008  matt sync with HEAD
 1.53.20.1 06-Nov-2007  matt sync with HEAD
 1.53.18.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.53.10.1 16-Oct-2007  garbled Sync with HEAD
 1.53.2.1 09-Oct-2007  ad Sync with head.
 1.55.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.55.4.1 31-Dec-2007  ad Make compile with new buffer cache locking scheme.

XXX This should be largely MI, please do not make another clone of disksubr.c.
 1.55.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.56.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.56.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.56.10.2 16-Sep-2009  yamt sync with head
 1.56.10.1 04-May-2009  yamt sync with head.
 1.60.26.1 18-May-2014  rmind sync with head
 1.60.22.2 03-Dec-2017  jdolecek update from HEAD
 1.60.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.60.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.61.4.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #165):
sys/arch/newsmips/stand/boot/netif_news.c: revision 1.9
sys/arch/mvme68k/stand/installboot/installboot.c: revision 1.19
sys/arch/arm/arm32/pmap.c: revision 1.300
sys/arch/amiga/dev/siop2.c: revision 1.43
sys/arch/amiga/amiga/disksubr.c: revision 1.62
sys/arch/news68k/news68k/bus_space.c: revision 1.13
sys/arch/amiga/dev/siop.c: revision 1.69
sys/arch/x86/x86/x86_autoconf.c: revision 1.72
Remove dead code in various places under arch/.
 1.62.2.2 28-Aug-2017  skrll Sync with HEAD
 1.62.2.1 22-Sep-2015  skrll Sync with HEAD
 1.63.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.63.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.67.6.1 23-Sep-2017  snj Pull up following revision(s) (requested by mlelstv in ticket #275):
distrib/amiga/miniroot/install.md: revision 1.28
distrib/miniroot/install.sub: revision 1.46
distrib/notes/amiga/install: revision 1.36
sys/arch/amiga/amiga/disksubr.c: revision 1.68
Support installing from a CD9660 formatted disk partition.
--
Fix check of AmigaDOS environment vector for nonstandard disklabel values.
Don't set a default fsize for CD9660 partitions, the CD9660 filesystem
interprets it as a session offset.
--
Ask for the boot command. It's necessary for some hardware
configurations and also to enable a serial console in the installed
system.
--
Mention the installer question for the boot command.
 1.68.4.1 10-Jun-2019  christos Sync with HEAD
 1.68.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.11 11-Dec-2005  christos branches: 1.11.78; 1.11.86; 1.11.92;
merge ktrace-lwp.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 28-Jan-2002  aymeric branches: 1.9.16;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.8 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 21-Apr-1996  veego branches: 1.7.44; 1.7.48;
Cleanup for -Wall and -Wstrict-prototypes
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.7.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.16.1 03-Aug-2004  skrll Sync with HEAD
 1.11.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.78.1 04-May-2009  yamt sync with head.
 1.4 27-Mar-1994  mycroft Clean up deleted files.
 1.3 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 27-Mar-1994  mycroft Clean up deleted files.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.8 09-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.7 14-May-2002  matt Eliminate commons. (including a few unused or mismatched ones).
 1.6 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 25-Sep-1999  is branches: 1.4.16; 1.4.20;
vm_offset_t -> vaddr_t/paddr_t
 1.3 24-Sep-1996  is Rename the watchdog enable bit to reflect its polarity.
 1.2 20-Jun-1996  is Use the right microsecond delay address. To achieve this, also map that
piece of hardware into kernel virtual memory (was only a guess 'til now).
XXX Unfortunately, the hardware vendor reserves the right to change this in
future DraCo revisions. We must rethink delay() and DELAY(), at least for the
DraCo, soon.
 1.1 09-May-1996  is branches: 1.1.4;
First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.1.4.1 21-Jun-1996  jtc Pulled up from version 1.2 by request from ignatios.

"use correct rather than guessed microsecond delay address in
delay() and DELAY() on the DraCo".,
 1.4.20.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.20.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.16.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.16.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8 16-Jan-2015  phx Fixed crash of A4000 IDE due to uninitialised bus_space_tag and bus_space
handle for the interrupt status register.
 1.7 03-Jan-2014  rkujawa branches: 1.7.4; 1.7.6;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.6 11-Dec-2005  christos branches: 1.6.112; 1.6.122; 1.6.128;
merge ktrace-lwp.
 1.5 13-Jun-2005  jmc Fix volatile casts
 1.4 28-Jan-2002  aymeric branches: 1.4.16;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 19-Jan-2001  is branches: 1.3.4; 1.3.8;
No need for a seperate "I'm initialized" variable - the pointer itself
should work fine.
 1.2 27-Sep-2000  aymeric branches: 1.2.2;
minor aesthetic changes, plus explicitly state this is public domain
 1.1 23-Jan-2000  aymeric add files which deal with the gayle chip
 1.2.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.2.1 27-Sep-2000  bouyer file gayle.c was added on branch thorpej_scsipi on 2000-11-20 19:58:19 +0000
 1.3.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.128.1 18-May-2014  rmind sync with head
 1.6.122.2 03-Dec-2017  jdolecek update from HEAD
 1.6.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.6.1 06-Apr-2015  skrll Sync with HEAD
 1.7.4.1 17-Jan-2015  martin Pull up following revision(s) (requested by phx in ticket #429):
sys/arch/amiga/amiga/gayle.c: revision 1.8
Fixed crash of A4000 IDE due to uninitialised bus_space_tag and bus_space
handle for the interrupt status register.
 1.3 03-Jan-2014  rkujawa Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.2 26-Jan-2002  aymeric branches: 1.2.156; 1.2.166; 1.2.172;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.1 23-Jan-2000  aymeric branches: 1.1.6; 1.1.10; 1.1.14;
add files which deal with the gayle chip
 1.1.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 23-Jan-2000  bouyer file gayle.h was added on branch thorpej_scsipi on 2000-11-20 19:58:19 +0000
 1.2.172.1 18-May-2014  rmind sync with head
 1.2.166.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.156.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.33 22-May-1997  veego Use genassym.sh to facilitate cross-compiling.
 1.32 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
 1.31 02-Feb-1997  mhitch Where did that 0 come from? Fix typo in cpu type definitions.
 1.30 02-Feb-1997  thorpej Define CPU, MMU, and FPU constants.
 1.29 17-Dec-1996  is Switch on branch prediction on the 68060. Also add some instrumentation
for branch prediction errors (could be used to detect strange binaries),
integer instruction, FP instruction, FP data type and FP effective address
emulations. The latter can be used to diagnose binaries which should be
recompiled with -m68060.

XXX Maybe these diagnostics should be switchable by sysctl or
XXX options DIAGNOSTIC.
 1.28 14-Oct-1996  mhitch More fallout from printf->kprintf->printf: printf in sys/systm.h now
conflicted with stdio.h. Get rid of sys/systm.h, as it isn't needed.
 1.27 12-Oct-1996  mhitch Needs <stdio.h> now that printf() isn't defined in kernel headers.
 1.26 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.25 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.24 15-Mar-1996  is AMIGA_68060 flag in cpu.h and genassym.c.
 1.23 02-Feb-1996  mycroft Don't define _KERNEL here.
 1.22 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.21 16-May-1995  jtc Removing -DKERNEL, transition to _KERNEL has been completed
 1.20 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.19 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.18 28-Mar-1995  jtc Added #define _KERNEL
 1.17 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.16 26-Oct-1994  cgd new RCS ID format.
 1.15 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.14 29-May-1994  chopps no more V_SWTCH, moved from cpu_switch to cpu_exit.
pointed out by osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.13 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.12 21-May-1994  chopps sys/vmmeter.h, sys/user.h and vm/vm.h shuffle.
 1.11 11-May-1994  chopps fix mmutype recocgnition cleanup cpu identify and other boot diags.
 1.10 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.9 18-Apr-1994  chopps make current with recent vm changes, also clean old from genassym
 1.8 23-Feb-1994  chopps mirror removal of HIGHPAGES and addition of KUSER_AREA to vmparam.h
 1.7 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.6 11-Feb-1994  chopps Add missing $Id$'s
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.36 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.35 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.34 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

Instead, define new macros: MMU51_SRP_BITS, MMU51_CRP_BITS, MMU51_TCR_BITS,
and MMU40_TCR_BITS, in terms of the definitions in mmu_{40,51}.h. These
automagically adapt to 8K and 4K pages based on the machine-specific value
of PGSHIFT.
 1.33 20-Feb-2020  skrll G/C
 1.32 17-Feb-2020  skrll G/C LS{SLEEP,RUN,ONPROC}

LWP status manipulation was moved out of assembly long ago.
 1.31 19-Dec-2018  maxv branches: 1.31.6;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.30 14-Jan-2011  rmind branches: 1.30.58; 1.30.60;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.29 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.28 10-Dec-2009  rmind branches: 1.28.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.27 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.26 20-Sep-2008  tsutsui Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573. Approved by martin@.
 1.25 17-Oct-2007  garbled branches: 1.25.16; 1.25.20; 1.25.22; 1.25.26;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.24 22-May-2007  mhitch branches: 1.24.10;
Get rid of pcb_cmap2 - it hasn't been used for a long, long time.
 1.23 18-May-2007  mhitch Amiga changes for idlelwp.
 1.22 09-Feb-2007  ad branches: 1.22.6; 1.22.8; 1.22.14;
Merge newlock2 to head.
 1.21 11-Dec-2005  christos branches: 1.21.20; 1.21.24; 1.21.26;
merge ktrace-lwp.
 1.20 04-Nov-2003  dsl branches: 1.20.16;
Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.19 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.18 08-Apr-2003  thorpej branches: 1.18.2;
Use PAGE_SIZE rather than NBPG.
 1.17 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 11-May-2002  jdolecek use _KERNEL_OPT rather than _KERNEL && !_LKM
 1.15 12-Mar-2001  is branches: 1.15.2; 1.15.8;
Make this compile again (when building the LKMs).
 1.14 21-Nov-2000  tsutsui branches: 1.14.2;
Define proper macros for FP frame offsets rather than magic numbers.
 1.13 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.12 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.11 19-Apr-1999  kleink branches: 1.11.2;
Add COMPAT_SVR4 for m68k.
 1.10 27-Mar-1999  mhitch branches: 1.10.4;
Remove ifdef UVM.
 1.9 26-Mar-1999  is defopt BB060STUPIDROM.
 1.8 01-Oct-1998  thorpej Define SYS_compat_13_sigreturn13.
 1.7 30-Sep-1998  thorpej Make sure SYS_exit and SYS___sigreturn14 are defined. Garbage collect
SYS_sigreturn.
 1.6 10-Jul-1998  mhitch Add UVM support to amiga
 1.5 06-Jan-1998  thorpej Garbage-collect VM_PMAP.
 1.4 06-Jan-1998  thorpej Garbage-collect pm_stchanged.
 1.3 16-Jul-1997  is Amiga glue code for the m68k fpu emulation subsystem.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
 1.2 17-Jun-1997  is Forgotten part of the 68060+bootblock+stupid ROM support: tell locore.s
that we're using BB060STUPIDROM.
 1.1 22-May-1997  veego Use genassym.sh to facilitate cross-compiling.
 1.10.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.11.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.11.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.14.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.15.8.6 05-Oct-2002  gmcgarry Add RAS offsets.
 1.15.8.5 02-Aug-2002  nathanw Don't need SAF_UPCALL anymore.
 1.15.8.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.15.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.15.8.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.15.8.1 12-Mar-2001  scw file genassym.cf was added on branch nathanw_sa on 2001-11-17 21:59:06 +0000
 1.15.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.18.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.16.2 03-Sep-2007  yamt sync with head.
 1.20.16.1 26-Feb-2007  yamt sync with head.
 1.21.26.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.21.24.1 30-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #683):
sys/arch/m68k/m68k/switch_subr.s: revision 1.19
sys/arch/amiga/include/pcb.h: revision 1.15
sys/arch/amiga/amiga/genassym.cf: revision 1.24
Get rid of pcb_cmap2 - it hasn't been used for a long, long time.
 1.21.20.1 06-Feb-2007  ad Make amiga & mac68k compile.
 1.22.14.2 26-Jun-2007  garbled Sync with HEAD.
 1.22.14.1 22-May-2007  matt Update to HEAD.
 1.22.8.1 11-Jul-2007  mjf Sync with head.
 1.22.6.1 27-May-2007  ad Sync with head.
 1.24.10.1 06-Nov-2007  matt sync with HEAD
 1.25.26.1 19-Oct-2008  haad Sync with HEAD.
 1.25.22.1 10-Oct-2008  skrll Sync with HEAD.
 1.25.20.2 11-Mar-2010  yamt sync with head
 1.25.20.1 04-May-2009  yamt sync with head.
 1.25.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.28.4.1 05-Mar-2011  rmind sync with head
 1.30.60.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.30.60.1 10-Jun-2019  christos Sync with HEAD
 1.30.58.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.31.6.1 29-Feb-2020  ad Sync with head.
 1.4 26-Jan-1994  mycroft Clean up deleted files.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.13 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.12 11-Dec-2005  christos branches: 1.12.78;
merge ktrace-lwp.
 1.11 23-Jan-2005  chs move spl*() and IPL_* definitions from psl.h to intr.h.
 1.10 07-Aug-2003  agc branches: 1.10.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 26-Jan-2002  aymeric branches: 1.9.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.8 21-Apr-1996  veego branches: 1.8.44; 1.8.48;
Cleanup for -Wall and -Wstrict-prototypes
 1.7 09-Oct-1995  chopps add prototypes for isr stuff fixes pr# 1284 and 1569
 1.6 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.16.4 24-Jan-2005  skrll Sync with HEAD.
 1.9.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.16.1 03-Aug-2004  skrll Sync with HEAD
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.12.78.1 20-Jun-2009  yamt sync with head
 1.5 25-Jan-1997  mhitch Get rid of unused file: KDASSERT() is now defined in libkern.h.
 1.4 17-Apr-1995  chopps branches: 1.4.4;
terminate comment fixes pr#969
 1.3 11-Feb-1995  chopps add some missing copyrights.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 17-Feb-1994  chopps modified to use generic cons, added kernel assert macro.
 1.4.4.1 30-Jan-1997  thorpej update from trunk
 1.172 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.171 19-Jan-2024  thorpej Switch the amiga port to use the same clockframe layout as the other
m68k ports.
 1.170 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.169 17-Jan-2024  thorpej Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.168 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.167 12-Jan-2024  thorpej Remove getsp(); nothing uses it.
 1.166 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.165 27-Dec-2023  thorpej Stop using magic numbers for the MMU root pointer attributes and the
Translation Control register, and also get rid of "#if PGSHIFT == ..."
where those magic numbers are used.

Instead, define new macros: MMU51_SRP_BITS, MMU51_CRP_BITS, MMU51_TCR_BITS,
and MMU40_TCR_BITS, in terms of the definitions in mmu_{40,51}.h. These
automagically adapt to 8K and 4K pages based on the machine-specific value
of PGSHIFT.
 1.164 26-Dec-2023  thorpej G/C unused ploadw().
 1.163 26-Dec-2023  thorpej G/C unused flushustp().
 1.162 25-Dec-2023  thorpej loadustp(): Optimize for the overwhelmingly common case of "not the HP MMU".
Rather than converting the level 1 table address to a page number before
calling loadustp() only to have loadustp() convert it back to an address
for the '851, '030, '040, and '060, instead pass the address and convert
to a page number only in the case of the HP MMU.

This is a wash on HP MMU machines (9000/320 and 9000/350), and saves at
least 4 instructions (2x moveq + 2x lsXl) on every context switch on
everything else.
 1.161 30-May-2022  andvar branches: 1.161.4;
s/identifing/identifying/ and s/multipler/multiplier/ in comments.
 1.160 16-Mar-2022  andvar s/paniced/panicked/ and s/borken/broken/ in comments.
 1.159 21-Jul-2020  rin Align tmpstk to 4-byte boundary in the same manner as mac68k.

However, unfortunately, this does not fix strange crashes of GCC8-compiled
kernel, for which I cannot even enter DDB nor obtain crash dump.

We need further investigation...
 1.158 19-Jun-2020  rin Keep the top of stack zero as other m68k ports do
(and required by System V ABI).
 1.157 19-Mar-2019  thorpej G/C a couple of lingering instances of addupc(). There is still some bit-
rotten profiling code that references it, but that code is already almost
certainly broken for other reasons.
 1.156 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.155 22-Dec-2011  tsutsui branches: 1.155.46; 1.155.48;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
 1.154 26-Nov-2011  tsutsui branches: 1.154.2;
Make sure to call pflusha before (not after) enabling MMU on
68030/68851 initialization paths.

Pointed out by isaki@ per observation of ATC status on XM6i emulator.
Tested on TT030, HP362, NWS-1750, and X68030 by me.

XXX: probably we can remove existing pflusha or TBIA calls after MMU turned
XXX: on (and before enabling cache) but I leave them as is for now to avoid
XXX: unexcpected side effects.
 1.153 15-Nov-2011  tsutsui Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0
 1.152 08-Feb-2011  rmind branches: 1.152.4;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.151 20-Dec-2010  matt branches: 1.151.2; 1.151.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.150 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.149 12-Dec-2009  phx branches: 1.149.2; 1.149.4;
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.148 04-Dec-2009  tsutsui Fix a leftover comment.
 1.147 04-Dec-2009  tsutsui Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Compile test only.
 1.146 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.145 06-Jan-2008  mhitch branches: 1.145.10; 1.145.20; 1.145.28;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.144 17-Oct-2007  garbled branches: 1.144.2; 1.144.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.143 12-Jun-2007  mhitch branches: 1.143.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.142 21-May-2007  tsutsui Add a comment.
 1.141 18-May-2007  mhitch Amiga changes for idlelwp.
 1.140 11-Dec-2005  christos branches: 1.140.24; 1.140.30; 1.140.32; 1.140.38; 1.140.40;
merge ktrace-lwp.
 1.139 11-Jun-2004  is branches: 1.139.12;
Don't recompute loadbase; use the value passed by the bootloader instead.
(It should know where it loaded us, right?)
Patch contributed by Gunter Nikl.
 1.138 04-Mar-2004  nathanw Centralize identical copies of proc_trampoline code.

(lots more opportunites here for the bored hacker, such as rei and trap0...)
 1.137 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.136 23-Jun-2003  martin branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.135 08-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.134 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.133 11-Jan-2003  aymeric Change the bootstrap procedure to avoid temporarily mapping physical memory.

Now, on the Amiga, we copy a small piece of code to chip memory and enable the
MMU from here.
On the DraCo, we setup %itt0 so that we shadow physical memory without
touching the page tables and very temporarily. The DraCo's memory layout
guarantees that there is no overlap in this case between physical and
virtual addresses.

This fixes a bug where Amiga's with physical memory at 0x200000 wouldn't boot
kernels >2M in size, and possibly other corner cases.

Joint work with Ilpo Ruotsalainen and Ignatios Souvatzis.
 1.132 02-Nov-2002  chs finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
 1.131 13-Feb-2002  is branches: 1.131.10;
Add missing register prefix.
 1.130 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.129 12-Jan-2002  aymeric Revert last commit in order to do the right thing.
(i.e. use jmp xx:l instead of exporting xx)

No functional change.
 1.128 03-Jan-2002  aymeric When we jump to the absolute address of the next instruction, we have to
export the label we use for that purpose, otherwise, that smart gas will
change it to a relative jump, which does basically nothing.

I can finally boot NetBSD/amiga ELF. (Yippee!)

While there, test if we are a 68851 before we invalidate the TLB,
instead of doing it between the TLB flush and the data cache flush.
 1.127 28-Nov-2001  kleink Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.
 1.126 07-Nov-2001  aymeric branches: 1.126.2;
introduce an interrupt_depth variable which counts how nested we are into
interrupts.
This allows hardclock() to account for the time spent in interrrupts, and
as a side-effect, top(1), systat(1) and others will no more report 0% of
interrupt activity.

mvme68k does that already.
 1.125 22-Jul-2001  wiz branches: 1.125.4;
seperate -> separate
 1.124 30-May-2001  lukem branches: 1.124.2;
add missing #include "opt_kgdb.h"
 1.123 08-May-2001  is defopt LEV6_DEFER.
 1.122 02-Mar-2001  mhitch branches: 1.122.2;
More missing register prefixes.
 1.121 14-Feb-2001  is Missing: register prefixes, _FOO_LABEL(n) macros, etc, in preparation for
ELFing the port. Patch provided by scw.
 1.120 26-Nov-2000  jdolecek split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
 1.119 21-Nov-2000  tsutsui Define proper macros for FP frame offsets rather than magic numbers.
 1.118 02-Sep-2000  mhitch Fix typo: a%0 -> %a0.
 1.117 20-Aug-2000  thorpej Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
 1.116 31-May-2000  thorpej Add a comment on single-processor systems about p_cpu being initialized
by fork1().
 1.115 26-May-2000  thorpej branches: 1.115.2;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.114 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.113 14-May-2000  minoura defopt FPSP.
 1.112 15-Oct-1999  is branches: 1.112.2;
Reboot support for P5PPC+68K boards, compiled in by "options P5PPC68KBOARD".
Without this, at least cyberppc+040 boards won't reboot, but just hang when
down.
The method is similar to what LinuxPPC/APUS does, but without EIEIO.
 1.111 17-Sep-1999  thorpej branches: 1.111.2;
Centralize the declaration and clearing of `cold'.
 1.110 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.109 29-Apr-1999  christos Include opt_compat_sunos.h
 1.108 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.107 26-Mar-1999  is branches: 1.107.2;
defopt BB060STUPIDROM.
 1.106 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.105 25-Feb-1999  is prepare for gdb fix
 1.104 06-Feb-1999  is One more small step towards a unified m68k pmap:
use the common pmap_copy_page() and pmap_zero_page (copied from Atari).
 1.103 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.102 30-Sep-1998  thorpej Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s
 1.101 30-Sep-1998  thorpej Pull in opt_compat_netbsd.h
 1.100 10-Sep-1998  is Fix catastrophic typo. DraCos rev. 3 (or older) would crash on exiting from
the first timer interupt.
 1.99 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.98 10-Jul-1998  mhitch Add UVM support to amiga
 1.97 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.96 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.95 11-Apr-1998  mhitch Initialize proc0.p_addr so we don't dref NULL in trap(). [From hp300 locore.s]
Fixes PR 5281.
 1.94 05-Jan-1998  thorpej Fix a bogosity apparently inherited from when the Utah 4.3BSD code base
was converted to use Mach VM for Net2/4.4BSD. The user segment table
pointer was originally stored in the PCB. When Mach VM came along,
however, it was also stored in the pmap, and loaded into the PCB in
pmap_activate(). pmap_activate() would then note that the PCB's USTP
was now in sync with the pmap's USTP, and the low-level context switch
code would use the value from the PCB.

However, pmap_activate() would also load the hardware MMU context if
the pmap was the current pmap (or, in the case where pmaps can be shared,
such as in NetBSD, if the proc was the current proc). The low-level
context switch code would then reload the hardware _again_ using the
USTP from the PCB.

However, the optimization of not calling pmap_activate() if "stchanged"
was false ended up causing some processes to use stale USTP values from
the PCB when the low-level context switch code reloaded the hardware!
This was noticed by using a real vfork(2) (which worked for some time
before failing, surprisingly!)

Since I'm hard pressed to find any real optimization here (since the
hardware was always reloaded once, sometimes twice!), the code now always
calls pmap_activate(), which uses the correct USTP value (the one in the
pmap). The PCB's USTP is now ignored, and should eventually be g/c'd.

Another optimization can actually be performed, and I have added a comment
describing what it is, but have not yet implemented it.

Also note that most of the loadustp() functions where actually incomplete.
This has been corrected. These functions should probably be split up into
MMU-specific operations, and called indirectly, rather than doing constant
run-time decision making based on values that will never change during the
course of a boot's lifetime.
 1.93 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.92 29-Sep-1997  is branches: 1.92.2;
When changing btst #7,_machineid+3 to cmpl #CPU_68060,_cputype, I forgot to
reverse the conditional branches. "We apologize for the inconvenience."
 1.91 27-Sep-1997  is Most of _machineid->cputype.
 1.90 24-Sep-1997  is Locore.s cleanup round 1:
- MIT syntax to Motorola syntax moveml register lists (for better readability)
- comment alignment
- remove commented out debug or alternate code from early DraCo support
development.
(I wanted to do this stuff for a long time, but always had "more important"
things to do.)
 1.89 17-Jul-1997  is branches: 1.89.2;
Don't assemble _fpemuli: unless FPU_EMULATE is defined (by Thorsten Frueauf).
While here, remove a comment which should have gone months ago.
 1.88 16-Jul-1997  is Amiga glue code for the m68k fpu emulation subsystem.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
 1.87 04-Jul-1997  is addql does set condition codes, so we are not allowed to put it in between
the andl and the jeq.
Mea maxima culpa.
 1.86 17-Jun-1997  is Only check for kernel bus probes when we are sure it is a bus error.
(As a side effect, this moves the testing decision out of the main path
of the page fault code.)
 1.85 16-Jun-1997  is Add option BB060STUPIDROM, which makes the early kernel startup probe for
an 68060/68LC060, possibly switching on the 68060 FPU, instead of trusting
the value passed from the ROM OS to us by the bootblock.

Most 68060 boards, unlike the DraCo (which seems to have heavily patched OS
ROMs) don't set the AMIGA_68060 flag; instead, upon detecting an 68060, its
FPU is disabled to make the ROM scheduler work, and at a much later time (at
least, later than bootblock booting time), the "68060.library" installs the
Motorola 68060 software support, patches the scheduler for the 68060 FPU, and
re-enables the FPU.

Maybe this will be fixed one day, if Amiga International sells upgraded OS
ROMs which know about the 68060. Until then, and for legacy machines, this
kludge is needed if we want to boot a non-DraCo 68060.

Btw, thats why this is NOT in std.amiga, but in GENERIC; the DRACO
configuration doesn't need it (and I still plan to make std.draco go away).
 1.84 05-Jun-1997  is Make fpfault() faster if 68020/30 only, and the code smaller if 68040/60-only.
 1.83 05-Jun-1997  is Microoptimization in addrerr4060. Reduces code size.
 1.82 04-Jun-1997  is Reorganize buserr/addrerr stuff, to allow omitting unused code in single-cpu
kernels, at the same time getting rid of up to 3 conditional branches and a
bit over one cacheline fetch (for the 68060; the saving is a bit smaller for
040 and yet smaller for the 020/30).
While we're here, also get rid of an redundant lea (using SP-relative
addressing) and of two redundant pushes.
While we're here, also fix a panic which would tear us down on 68060 machines
if a branch prediction error ever occured.
 1.81 22-May-1997  veego Add <machine/trap.h> so we don't need to define all the trap values in
assym.h.
 1.80 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
 1.79 25-Apr-1997  thorpej Adjust for <m68k/m68k/trap_subr.s>
 1.78 13-Apr-1997  thorpej Use common m68k sigcode.
 1.77 09-Apr-1997  thorpej Use <m68k/m68k/proc_subr.s>
 1.76 16-Mar-1997  thorpej Use <m68k/m68k/support.s>
 1.75 02-Feb-1997  thorpej - Set cputype and mmutype (XXX we set 68040 in the 68060 case)
- garbage-collect extra copypage()
 1.74 31-Jan-1997  mhitch Get the boot partition offset from the boot loader. Also pass it when
doing a reload. The partition offset will be used to determine which
disk device was the boot device.
 1.73 31-Jan-1997  thorpej Garbage-collect unused bootdev global.
 1.72 17-Dec-1996  is branches: 1.72.2;
- Fix a edito in the m68060 support trap counting. (Hint: run "make regress",
even if you "really didn't change anything dangerous" :-)
- While we're here, save a few bytes and clock cycles during kernel startup:
cinva ic clears the branch cache on the 68060, no need to do it explicitly.
 1.71 17-Dec-1996  is Switch on branch prediction on the 68060. Also add some instrumentation
for branch prediction errors (could be used to detect strange binaries),
integer instruction, FP instruction, FP data type and FP effective address
emulations. The latter can be used to diagnose binaries which should be
recompiled with -m68060.

XXX Maybe these diagnostics should be switchable by sysctl or
XXX options DIAGNOSTIC.
 1.70 26-Nov-1996  is In the DraCo native clock interupt handler, clear the interupt condition
after returning from hardclock(), rather than before. For some reason,
this fixes the 0xffffffff i used to see in the tv_secs of the used cpu
time of some processes.
XXX I don't fully understand the issue.
 1.69 17-Nov-1996  is Make sure we only handle the DraCo native timer interupt, if it was enabled.
We test this condition AFTER the interupt condition, because it is only
disabled during autoconfiguration.
Without this patch, if autoconfiguration takes long enough, eventually a
timer interupt will call hardclock() and panic the machine.
 1.68 06-Nov-1996  cgd Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed. Rename remrq() to
remrunqueue().
 1.67 24-Oct-1996  is Remove addressing bug in hand-optimized assembly code.
 1.66 13-Oct-1996  christos backout previous kprintf change
 1.65 12-Oct-1996  mhitch mmutype and fputype disappeared from machine/cpu.h during a merge toward
m68k stuff.
 1.64 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.63 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.62 30-Sep-1996  is Same as mhitch corrected in the CIA B interupt handler few days ago:

Check only the IR bit of the CIAA Interrupt Control Register when testing
for a level 6 interrupt. An interrupt only occurs if IR is set, and IR is
only set if the individual mask bits are set. The individual interrupt
status bits can be set without causing an interrupt if the corresponding
enable bits are not set.
 1.61 29-Sep-1996  is a) replace our delay() with a Gordon Ross style one, calibrated at
clock_attach() time (for now).
This removes our dependance on the DraCo ROM access timing and frees
the second CIA on Amigas.
b) support for DraCo rev. >= 4 native timer chips.
 1.60 28-Sep-1996  mhitch Check only the IR bit of the CIAB Interrupt Control Register when testing
for a level 6 interrupt. An interrupt only occurs if IR is set, and IR is
only set if the individual mask bits are set. The individual interrupt
status bits can be set without causing an interrupt if the corresponding
enable bits are not set.
 1.59 13-Jun-1996  is Fix a bug in the 68020+68851 / 68030 branch of the buserr handler:

For these CPU's, you have to use the ptest operation to search the mmu
tables in order to decide whether it is a real bus error or just a
page fault or write protection violation.

Our old code assumed user space always when calling ptest, and
erroneously assumed the BUSERR bit in the ptest output (mmusr
register) is the only indication for bus errors to check.

In fact, we have to follow a multistage decision tree to decide. 68060
CPUs are much easier to handle correctly.
 1.58 25-May-1996  is Show real interupt names (e.g., systat vmstat) on the DraCo.
 1.57 24-May-1996  is Delete some occurences of kernel startup debug code, move others inside
#ifdef DEBUG_KERNEL_START.
 1.56 21-May-1996  is branches: 1.56.2;
Fix two conditionals code parts, which were intended to avoid two
branches for pure-M68060 and Non-M68060 kernels, but would have made
the former never save its floating point context.
 1.55 19-May-1996  is Add some forgotten #ifdef M68060 to make gcc -Wall happy. While I'm here,
add the _kernel_text symbol for libkvm.
 1.54 17-May-1996  is Make "options DRACO" kernels boot on Amiga mainboards, too:
- don't change the _lev2intr and _lev6intr entry points in static code
- set the level 2, 5, 5 and 6 interrupt autovectors from initcpu() on DraCo.
 1.53 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.52 04-May-1996  mhitch Add floppy index interrupt processing.

Startup modified to work with kernel loaded directly into fast memory.
This removes the need to have enough chip memory to load the kernel
when booting. Kernel memory is dual-mapped (VA == 0 and VA == PA)
for enabling the MMU, and the VA == PA mapping removed after start_c()
has completed. Chip memory is still required for the /dev/reload
process.
 1.51 02-May-1996  mhitch Add a check in the kernel reload device (/dev/reload) to protect
against the MMU switch code being in different locations between
the running kernel and the new kernel. Returns ENODEV if the reload
fails.
Change the error return from EFAULT to ENOEXEC when kernel_reload
gets a short write on the exec header.
 1.50 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.49 02-Feb-1996  mycroft assym.s -> assym.h
(Some ports did this already.)
 1.48 11-Dec-1995  thorpej Move bcopy/ovbcopy/memcpy into m68/m68k/copy.s, which is used by all
m68k ports already anyhow. No use in keeping 6 identical copies of this
function around.
 1.47 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.46 09-Oct-1995  chopps branches: 1.46.2;
vtrace -> sys_vtrace
 1.45 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.44 23-Sep-1995  chopps fix typo
 1.43 23-Sep-1995  chopps add memcpy entry
 1.42 04-Sep-1995  chopps mmutype fix from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.41 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.40 13-May-1995  chopps make recent cpu_fork() changes more similar with hp300.
 1.39 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.38 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.37 28-Dec-1994  chopps add interrupt for MFC serial. modified int counters.
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.36 26-Oct-1994  cgd new RCS ID format.
 1.35 30-Aug-1994  chopps branches: 1.35.2;
catch mis-aligned access errors on the 040.
 1.34 07-Jul-1994  chopps fix typo that was blowing away MMU table root pointer on A3000's :)
 1.33 06-Jul-1994  chopps branches: 1.33.2;
similar changes as the hp300 for FPSP.
 1.32 04-Jul-1994  chopps conditional FPSP stuff.
 1.31 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.30 22-Jun-1994  chopps cleanup and recognize the a1200.
 1.29 16-Jun-1994  chopps add eclockfreq. remove physstrat from machdep and cleanup a little.
 1.28 15-Jun-1994  chopps now uses passed in timer frequency.
 1.27 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.26 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.25 03-Jun-1994  chopps z buses early config support, needs testing.
 1.24 02-Jun-1994  chopps more cache goodies from hp300
 1.23 01-Jun-1994  chopps bring some good ideas over from hp300 port.
 1.22 29-May-1994  chopps no more V_SWTCH, moved from cpu_switch to cpu_exit.
pointed out by osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.21 27-May-1994  chopps now uses new type of init bootstrap
 1.20 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.19 18-May-1994  chopps mirror recent i386 changes to conf and regarding profiling in trap
and swtch nameing changes.
 1.18 13-May-1994  chopps setrq -> setrunqueue
 1.17 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.16 11-May-1994  chopps fix mmutype recocgnition cleanup cpu identify and other boot diags.
 1.15 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.14 20-Mar-1994  chopps kernel ddb now has symbols
 1.13 08-Mar-1994  chopps first get it to compile with DDB.
 1.12 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.11 22-Feb-1994  chopps amiga now uses PROF and uses m68k/asm.h in locore.s
 1.10 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.9 11-Feb-1994  chopps Add missing $Id$'s
 1.8 03-Feb-1994  chopps softclock() and hardclock() calls now pass pointer to clockframe_t
 1.7 02-Feb-1994  chopps removed copy code that is now in arch/m68k.
 1.6 01-Feb-1994  chopps fixed warning. Cmem alloc is now top down. added bootstrap version
number to locore for loadbsd. removed tz rz from conf.c
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.33.2.2 30-Aug-1994  cgd fix '040 buserr handling.
 1.33.2.1 07-Jul-1994  cgd from trunk: fix typo that was blowing away MMU table root pointer on A3000's
 1.35.2.2 30-Aug-1994  chopps catch mis-aligned access errors on the 040.
 1.35.2.1 30-Aug-1994  chopps file locore.s was added on branch netbsd-1-0 on 1994-08-30 05:35:32 +0000
 1.46.2.1 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.56.2.3 05-Dec-1996  rat Pullup 1.66 -> 1.67 request from Ignatios Souvatzis <ignatios@cs.uni-bonn.de>

>To btst the low order bits of a long variable on the big endian 68060,
>we have to use the variables address + 3 --- btst is a byte operation
>when not on registers. Mysteriously, this are the only 2 occurences of
>this test which I didn't copy from the 13 other (correct) ones :-(.
>
>This affects m68881_save/restore(), which might affect correctness of
>user floatingpoint programs.
 1.56.2.2 14-Jun-1996  is Bug fixes from trunk:
- correct Bus vs. MMU trap detection for 68020+851/68030
- clear branch prediction cache on context switches for 68060
 1.56.2.1 26-May-1996  is Pullup from trunk: Retina blanking bug, misc. cleanup including #ifdef'ing
out of annoying (to the normal user) debug code.
 1.72.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.89.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.89.2.1 29-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.92.2.1 30-Sep-1998  cgd pull up (non-comment changes of) rev 1.100 from trunk (is).
 1.107.2.2 04-Feb-2000  he Pull up revision 1.112 (requested by is):
Add reboot code for Phase5 68040+PPC boards.
 1.107.2.1 30-Apr-1999  perry branches: 1.107.2.1.2;
pullup 1.108->1.109 (christos): conflicts manually edited
 1.107.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.111.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.112.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.112.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.112.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.115.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.122.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.124.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.124.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.124.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.124.2.1 03-Aug-2001  lukem update to -current
 1.125.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.126.2.8 15-Jan-2003  thorpej Sync with HEAD.
 1.126.2.7 11-Nov-2002  nathanw Catch up to -current
 1.126.2.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.126.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.126.2.4 11-Jan-2002  nathanw More catchup.
 1.126.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.126.2.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.126.2.1 07-Nov-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-17 21:59:06 +0000
 1.131.10.1 12-Jan-2003  jmc Pullup revisions 1.132-1.133 (requested by aymeric, ticket #1066)
Change the bootstrap procedure to avoid temporarily mapping physical
memory.

Now, on the Amiga, we copy a small piece of code to chip memory and
enable the MMU from here.
On the DraCo, we setup %itt0 so that we shadow physical memory without
touching the page tables and very temporarily. The DraCo's memory layout
guarantees that there is no overlap in this case between physical and
virtual addresses.

This fixes a bug where Amiga's with physical memory at 0x200000
wouldn't boot kernels >2M in size, and possibly other corner cases.
 1.136.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.136.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.136.2.1 03-Aug-2004  skrll Sync with HEAD
 1.139.12.2 21-Jan-2008  yamt sync with head
 1.139.12.1 03-Sep-2007  yamt sync with head.
 1.140.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.140.38.2 26-Jun-2007  garbled Sync with HEAD.
 1.140.38.1 22-May-2007  matt Update to HEAD.
 1.140.32.1 11-Jul-2007  mjf Sync with head.
 1.140.30.2 15-Jul-2007  ad Sync with head.
 1.140.30.1 27-May-2007  ad Sync with head.
 1.140.24.1 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.143.10.2 09-Jan-2008  matt sync with HEAD
 1.143.10.1 06-Nov-2007  matt sync with HEAD
 1.144.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.144.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.145.28.1 20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.145.20.1 16-Jul-2010  riz Pull up following revision(s) (requested by phx in ticket #1412):
sys/arch/amiga/dev/clock.c: revision 1.51
sys/arch/amiga/amiga/locore.s: revision 1.149 via patch
sys/arch/amiga/dev/kbd.c: revision 1.53
sys/arch/amiga/amiga/amiga_init.c: revision 1.118
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.145.10.2 11-Aug-2010  yamt sync with head.
 1.145.10.1 11-Mar-2010  yamt sync with head
 1.149.4.2 05-Mar-2011  rmind sync with head
 1.149.4.1 03-Jul-2010  rmind sync with head
 1.149.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.151.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.151.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.152.4.1 17-Apr-2012  yamt sync with head
 1.154.2.1 18-Feb-2012  mrg merge to -current.
 1.155.48.1 10-Jun-2019  christos Sync with HEAD
 1.155.46.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.161.4.1 27-Jun-2024  martin Pull up following revision(s) (requested by rin in ticket #724
to fix build fallout on the branch):

sys/arch/m68k/m68k/compat_16_sigreturn14.s: revision 1.6
sys/arch/mvme68k/mvme68k/locore.s: revision 1.129
sys/arch/news68k/news68k/locore.s: revision 1.84
sys/arch/hp300/hp300/locore.s: revision 1.183
sys/arch/m68k/m68k/compat_13_sigreturn13.s: revision 1.8
sys/arch/m68k/m68k/sigreturn.s: file removal
sys/arch/m68k/include/pte_motorola.h: revision 1.10
sys/arch/atari/atari/locore.s: revision 1.125
sys/arch/amiga/amiga/locore.s: revision 1.169
sys/arch/sun2/sun2/locore.s: revision 1.37
sys/arch/next68k/next68k/locore.s: revision 1.84
sys/arch/x68k/x68k/locore.s: revision 1.130
sys/arch/sun3/sun3x/locore.s: revision 1.77
sys/arch/cesfic/cesfic/locore.s: revision 1.45
sys/arch/m68k/conf/files.m68k: revision 1.53
sys/arch/sun3/sun3/locore.s: revision 1.109
sys/arch/luna68k/luna68k/locore.s: revision 1.81
sys/arch/mac68k/mac68k/locore.s: revision 1.182

Define PTE used in the pmap module int terms of the bit definitions
in mmu_{51,40}.h.

Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.255 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.254 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.253 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.252 05-May-2020  ad PR port-amiga/55233 Process hangs indefinitely if not calling syscalls for a while

cpu_intr_p() is broken on amiga, fix it.

From code inspection it looks like amiga and other m68k ports check for ASTs
with interrupts enabled in some cases, which is racy. Not fixed.
 1.251 24-Feb-2019  jandberg cnpollc needs to be called before cngetc
 1.250 05-Dec-2018  mlelstv build fix for M68020,M68030. gcc complains about the local typedef that
isn't used.
 1.249 05-Mar-2018  christos branches: 1.249.2; 1.249.4;
can't use fnop directly now, explain why.
 1.248 15-Aug-2017  maya Simplify. error is constant, so replace it by its value. NFCI
 1.247 23-Dec-2016  maya branches: 1.247.6;
Remove conflicting declaration of physmem
 1.246 02-Apr-2016  mlelstv branches: 1.246.2;
appease compiler. Fixes options MODULAR build.
 1.245 13-Jun-2015  mlelstv btoc is already rounding up to click size, use predefined ctod macro
to translate to disk blocks.
 1.244 07-Jun-2015  mlelstv Fix space calculation for dump header. Round up to clicks to avoid
disk alignment issues.
 1.243 24-Mar-2014  christos branches: 1.243.4; 1.243.6;
use cpu_{g,s}etmodel
 1.242 22-Mar-2014  christos kill sprintf
fix unused variables
 1.241 28-Jan-2013  rkujawa branches: 1.241.2;
Power down only if RB_POWERDOWN. Noticed by phx@ .
 1.240 28-Jan-2013  rkujawa Plug empm(4) into system halt function.
 1.239 03-Aug-2012  rkujawa branches: 1.239.2;
Declare physmem extern. It is actually initialized in amiga_init.c
(using RELOC). Discussed with martin@ and is@. Probably similar fix should
be applied to other m68k ports, but amiga is the only m68k machine I have.
 1.238 27-Jul-2012  matt Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.237 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.236 12-Dec-2011  mrg implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
 1.235 17-Nov-2011  mlelstv branches: 1.235.4;
identifycpu() is not just cosmetic for the banner but initializes how FPU
contexts are saved.
Also drop code that checks for fputype before it is determined.
 1.234 12-Jun-2011  rmind branches: 1.234.2;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.233 16-May-2011  tsutsui branches: 1.233.2;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
 1.232 17-Apr-2011  mlelstv Use MI routine banner() to print memory size. Also fixes output for systems
with 2GB RAM.
 1.231 04-Mar-2011  joerg Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.230 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.229 17-Jan-2011  tsutsui branches: 1.229.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.228 13-Jan-2011  phx branches: 1.228.2;
Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.227 16-Oct-2010  tsutsui Prepare empty module_init_md() for options MODULAR for all other m68k ports.
 1.226 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.225 08-Feb-2010  joerg branches: 1.225.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.224 10-Dec-2009  matt branches: 1.224.2;
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds). Should result in no code differences.
 1.223 06-Dec-2009  tsutsui Move initialization of protection_codes[] and kernel_pmap()
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
 1.222 24-Nov-2009  mhitch Remove old legacy IPL_* settings in ipl2spl_table - they are redundant
and in the case of IPL_AUDIO, results in IPL_VM blocking all interrupts.
[IPL_AUDIO is now the same as IPL_VM, and was setting the IPL_VM entry
to PSL_IPL6. IPL_SERIAL had a duplicate entry for some reason, and
serial drivers that check and modify IPL_SERIAL now shouldn't be affected
since IPL_SERIAL is now the same as IPL_HIGH. I'm hoping this will fix
or at least help the problem of serial interrupts being blocked too long.
 1.221 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.220 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.219 18-Mar-2009  cegger bzero -> memset
 1.218 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.217 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.216 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.215 13-Feb-2009  apb Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
 1.214 21-Jan-2009  he branches: 1.214.2;
Re-adapt to the changed return types for major() and minor().
 1.213 11-Jan-2009  mhitch fix dev_t printf formats.
 1.212 30-Nov-2008  martin As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.211 25-Nov-2008  ad dumpsys: don't spew numbers into the log.
 1.210 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.209 02-Jul-2008  ad branches: 1.209.2; 1.209.4; 1.209.6;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.208 06-Jan-2008  mhitch branches: 1.208.6; 1.208.10; 1.208.12; 1.208.14;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.207 03-Dec-2007  ad branches: 1.207.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.206 17-Oct-2007  garbled branches: 1.206.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.205 14-Jul-2007  ad branches: 1.205.8; 1.205.10;
Generic soft interrupts are mandatory.
 1.204 09-Jul-2007  ad Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.203 21-May-2007  tsutsui curlwp can't be NULL so no need to check it.
 1.202 04-Mar-2007  christos branches: 1.202.2; 1.202.4; 1.202.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.201 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.200 21-Dec-2006  yamt branches: 1.200.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.199 23-Oct-2006  yamt cpu_dumpconf: oops, redo the previous correctly.
 1.198 23-Oct-2006  yamt fix parenthesis mismatch in 1.197. (hi mrg)
 1.197 21-Oct-2006  mrg in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf(). (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.196 09-Jun-2006  aymeric branches: 1.196.6; 1.196.8;
in the softintr-with-si_callbacks framework, don't use add_sicallback()
everytime softintr_schedule() is called. They don't have the same semantics
when called multiple times before the callback is triggered.
Should avoid huge numbers of si_callbacks being created when a machine is
overloaded.
XXX the fix certainly applies to the atari port, too.
 1.195 24-Dec-2005  perry branches: 1.195.4; 1.195.8; 1.195.14;
bare asm -> __asm
 1.194 11-Dec-2005  christos merge ktrace-lwp.
 1.193 30-Oct-2005  chs fix crash dumps on m68k platforms, cpu_kcore_hdr_t is larger than
512 bytes now so we need a bigger buffer. PR 26958.
 1.192 13-Jun-2005  jandberg branches: 1.192.2; 1.192.4;
Constify pointers to string constants.
 1.191 25-Apr-2005  lukem Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
 1.190 24-Mar-2004  atatat branches: 1.190.8; 1.190.14;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.189 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.188 30-Dec-2003  pk Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
 1.187 04-Dec-2003  atatat Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
 1.186 27-Sep-2003  mhitch Cast through (void *) to appease gcc3.
 1.185 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.184 29-Jun-2003  fvdl branches: 1.184.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.183 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.182 23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.181 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.180 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.179 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.178 06-Jan-2003  wiz interrupt with two rs.
 1.177 03-Nov-2002  aymeric We don't need sys/syscallargs.h here anymore.
 1.176 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.175 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.174 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.173 25-Aug-2002  thorpej Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
 1.172 14-May-2002  matt branches: 1.172.2;
Eliminate commons. (including a few unused or mismatched ones).
 1.171 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.170 25-Mar-2002  is make this compile again
 1.169 20-Mar-2002  christos kill remaining PS_STRINGS instances.
 1.168 06-Mar-2002  tsutsui Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
 1.167 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.166 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.165 07-Nov-2001  aymeric branches: 1.165.2;
introduce an interrupt_depth variable which counts how nested we are into
interrupts.
This allows hardclock() to account for the time spent in interrrupts, and
as a side-effect, top(1), systat(1) and others will no more report 0% of
interrupt activity.

mvme68k does that already.
 1.164 10-Sep-2001  chris branches: 1.164.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.163 02-Jun-2001  chs branches: 1.163.2; 1.163.4;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.162 27-May-2001  is make the defopted "LEV6_DEFER" work for LKMs, too.
 1.161 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.160 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.159 14-Feb-2001  is branches: 1.159.2;
Missing: register prefixes, _FOO_LABEL(n) macros, etc, in preparation for
ELFing the port. Patch provided by scw.
 1.158 28-Jan-2001  is SIR_CLOCK is gone.
 1.157 15-Jan-2001  thorpej Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.156 13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.155 02-Jul-2000  cgd Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.
 1.154 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.153 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.152 05-Jun-2000  jhawk Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)
 1.151 26-May-2000  thorpej branches: 1.151.2;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.150 28-Mar-2000  simonb Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
 1.149 26-Mar-2000  is provide CCITT includes, and work around namespace collision
 1.148 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.147 21-Feb-2000  erh Define the DONETISR macro and use netisr_dispatch.h. This is to cut down on code duplication and to standardize the available NETISRs across all ports.
 1.146 09-Feb-2000  shin fix include file.

<netinet6/ip6.h> -> <netinet/ip6.h>
 1.145 19-Jan-2000  thorpej Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.144 19-Jan-2000  msaitoh check whether tv_usec >= 1000000
 1.143 04-Dec-1999  ragge CL* discarding.
 1.142 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.141 25-Sep-1999  is branches: 1.141.2; 1.141.4; 1.141.8;
vm_offset_t -> vaddr_t/paddr_t
 1.140 12-Sep-1999  chs eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.139 01-Jul-1999  is Better align memory segment table.
 1.138 28-Jun-1999  itojun - Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
 1.137 26-May-1999  thorpej Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.
 1.136 20-May-1999  lukem * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
 1.135 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.134 11-Apr-1999  chs add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.133 01-Apr-1999  thorpej branches: 1.133.2;
Don't call configure() from cpu_startup().
 1.132 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.131 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.130 27-Feb-1999  scottr defopt BUFCACHE and BUFPAGES.
 1.129 09-Jan-1999  thorpej Garbage-collect `mbutl'.
 1.128 12-Dec-1998  is appease egcs-1.1.1.
 1.127 28-Nov-1998  is Implement softintr_disestablish().
 1.126 24-Oct-1998  is All m680?0 User Manuals claim that trap vectors are fetched from the data
cache, if found there (but not allocated in the data cache on trap).
No need to flush the data cache.
 1.125 19-Oct-1998  tron Defopt SYSVMSG, SYSVSEM and SYSVSHM.
 1.124 12-Oct-1998  veego Include <sys/device.h> for the configure prototype.
 1.123 20-Aug-1998  veego Add some braces to stop the new egcs warnings.
 1.122 26-Jul-1998  is yet more atomic operations accessing DraCo registers
 1.121 10-Jul-1998  mhitch Add UVM support to amiga
 1.120 05-Jul-1998  jonathan * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
 1.119 05-Jul-1998  jonathan defopt NS, NSIP.
 1.118 05-Jul-1998  jonathan defopt ISO TPIP.
 1.117 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.116 04-Jul-1998  jonathan defopt DDB.
 1.115 03-Jul-1998  mhitch Make 'end' references consistant. Fixes PR#5670.
 1.114 09-Jun-1998  tv Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
 1.113 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.112 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.111 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.110 19-Feb-1998  thorpej Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
 1.109 01-Feb-1998  is Amiga uses the common m68k/sig_machdep.c now. Also moved its definition from
the other 68k ports' files.${port} to arch/m68k/conf/files.m68k.
 1.108 24-Jan-1998  mycroft When dumping, print out the device number as major,minor.
 1.107 07-Jan-1998  is - avoid system stack underflow when calling sigreturn via trap #0
- make sure all sigreturn error conditions are reported to the caller,
instead of the place jumped to.
This is the bugfix part of pr 4628 by ITOH Yasufumi.
The performance optimization part will be handled seperately, after evaluating
its implications.
Testing on 68040 and removing the performance change from the proposed patch
by scottr. Half of the Amiga machdep.c change had to be done manually by me,
as the patchfile didn't apply cleanly.
XXX Yes, Amiga should be changed to use the common sig_machdep.c instead.
XXX Really soon now. I promise.
 1.106 06-Jan-1998  is Support 68060 (and, for the Amiga, even 68040 buserr frames) in the sendsig()
and, indirectly, sigreturn() functions.
XXX The Amiga should be switched to using sig_machdep.c instead.
 1.105 04-Dec-1997  tv Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
 1.104 18-Oct-1997  is branches: 1.104.2;
Stopgap measure to handle EXTER interupts for the DraCo. Maybe this should
be handled by the locore.s code like for Amigas, but DraCos dont have
necessarily a CIA B.
 1.103 18-Oct-1997  is Part of this is voodoo from the sparc/machdep.c, part guesswork.
 1.102 04-Oct-1997  mhitch Use a global variable to hold the current speed of the internal serial port.
This will be used by certain SCSI drivers to limit the length of DMA transfers
when the serial port is running at higher speeds. GVP and Phase5 DMA
interfers significantly with CPU execution, and significantly increases
receive buffer overruns (silo overflow). Reducing the DMA transfer length
can reduce the overruns.
 1.101 27-Sep-1997  veego Wait for a keypress after the system is halted and reboot after a key is
pressed.
 1.100 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.99 12-Sep-1997  mycroft Set the status word as well, and remove a bogus comment.
 1.98 12-Sep-1997  mycroft Eliminate some uses of FPCOPROC.
 1.97 12-Sep-1997  mycroft Always initialize all registers in setregs().
 1.96 11-Sep-1997  mycroft Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way. (See tech-kern.)
 1.95 27-Aug-1997  is branches: 1.95.2;
Add __GENERIC_SOFT_INTERRUPTS implementation.
Currently, this is only kind of a wrapper around the *_sicallback() function
family. This way, we'll only break the new driver if it doesn't work.
After more drivers are converted, we'll change it to be the other way round.
 1.94 16-Jul-1997  is branches: 1.94.2;
Amiga glue code for the m68k fpu emulation subsystem.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
 1.93 29-Jun-1997  is Use function types for vectab, instead of u_int8_t *.
 1.92 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.91 08-Jun-1997  veego Initialize machine from MACHINE.
 1.90 04-Jun-1997  is Reorganize buserr/addrerr stuff, to allow omitting unused code in single-cpu
kernels, at the same time getting rid of up to 3 conditional branches and a
bit over one cacheline fetch (for the 68060; the saving is a bit smaller for
040 and yet smaller for the 020/30).
While we're here, also get rid of an redundant lea (using SP-relative
addressing) and of two redundant pushes.
While we're here, also fix a panic which would tear us down on 68060 machines
if a branch prediction error ever occured.
 1.89 09-Apr-1997  thorpej branches: 1.89.2;
- Adjust for new <m68k/kcore.h>
- garbage-collect regdump() and friends
 1.88 02-Apr-1997  christos Add netatalk netisr
 1.87 30-Mar-1997  is ifdef NARP -> if NARP > 0
 1.86 27-Mar-1997  thorpej Don't allocate mclrefcnt[]; it's dead and gone.
 1.85 26-Mar-1997  gwr Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/
 1.84 18-Mar-1997  is If we #ifdef NARP, we should also #include "arp.h", not "ether.h".
Bug report and remote debugging by Bernd Ernesti.
 1.83 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.82 17-Dec-1996  is branches: 1.82.4; 1.82.6;
Switch on branch prediction on the 68060. Also add some instrumentation
for branch prediction errors (could be used to detect strange binaries),
integer instruction, FP instruction, FP data type and FP effective address
emulations. The latter can be used to diagnose binaries which should be
recompiled with -m68060.

XXX Maybe these diagnostics should be switchable by sysctl or
XXX options DIAGNOSTIC.
 1.81 30-Nov-1996  is Support for DraCo superio chip: level 5 interupt queue; amiga_ttyspl
variable (we need to set ttyspl to spl5 when the DraCo serial is active).
 1.80 13-Oct-1996  christos backout previous kprintf change
 1.79 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.78 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.77 29-Sep-1996  is a) replace our delay() with a Gordon Ross style one, calibrated at
clock_attach() time (for now).
This removes our dependance on the DraCo ROM access timing and frees
the second CIA on Amigas.
b) support for DraCo rev. >= 4 native timer chips.
 1.76 09-Aug-1996  mrg Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.
 1.75 25-May-1996  is Fix few more places where 040+060 rlevant stuff was only compiled for 68040,
preventing 68060-only kernels to work. (68060 only kernel is tested now by
using it to commit this patch).
 1.74 25-May-1996  is Show real interupt names (e.g., systat vmstat) on the DraCo.
 1.73 24-May-1996  is Delete some occurences of kernel startup debug code, move others inside
#ifdef DEBUG_KERNEL_START.
 1.72 19-May-1996  is branches: 1.72.4;
Add some forgotten #ifdef M68060 to make gcc -Wall happy. While I'm here,
add the _kernel_text symbol for libkvm.
 1.71 19-May-1996  veego Another -Wall fix.
 1.70 17-May-1996  is Make "options DRACO" kernels boot on Amiga mainboards, too:
- don't change the _lev2intr and _lev6intr entry points in static code
- set the level 2, 5, 5 and 6 interrupt autovectors from initcpu() on DraCo.
 1.69 16-May-1996  is Fix for unused var warnings in compiler problem workaround.
 1.68 12-May-1996  mhitch Use new format for dumpfile and include chip memory in dump.
Fix another -Wall warning (from '060 integration).
 1.67 10-May-1996  is Clean up the mess I left over from my yestereve's commit: partially unused
variables left over from color background debugging, partially wrong #ifdefs
making some variables unused in non-M68060 kernels.
 1.66 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.65 01-May-1996  veego <sys/cpu.h> is no longer needed
 1.64 28-Apr-1996  mhitch Add prototypes for serial and floppy interrupt functions.
 1.63 27-Apr-1996  veego Fixed a compile bug which come from the new mouse driver
Fixed a bug with the noreturn attribute of boot and doboot
 1.62 23-Apr-1996  veego The prototyp of cpu_coredump is now in sys/signalvar.h
Added an ifdef DEBUG for struct phys_segs
 1.61 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.60 04-Jan-1996  jtc Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.
 1.59 09-Oct-1995  chopps vtrace -> sys_vtrace
 1.58 07-Oct-1995  mycroft Prefix names of system call implementation functions with `sys_'.
 1.57 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.56 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.55 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.54 01-Sep-1995  mycroft SA_ONSTACK --> SS_ONSTACK
 1.53 04-Jul-1995  paulus Add code for netintr to call pppintr if PPP is included.
 1.52 16-May-1995  chopps PS_STRINGS in A2. Add fputype, remove cpuspeed. switch to new coredump
 1.51 13-May-1995  chopps fix dumpmem
 1.50 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.49 23-Apr-1995  chopps bring up-to-date with recent conf.c and sunos changes.
 1.48 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.47 19-Apr-1995  chopps unomunt file systems when rebooting from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.46 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.45 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.44 05-Jan-1995  chopps fix diag code.
 1.43 29-Dec-1994  chopps fixup microtime() return value.
 1.42 28-Dec-1994  chopps non-contig memory from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.41 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.40 26-Oct-1994  cgd new RCS ID format.
 1.39 20-Oct-1994  cgd update for new syscall args description mechanism
 1.38 06-Oct-1994  chopps branches: 1.38.2;
add another interrupt entry, for 4091.
 1.37 18-Jul-1994  chopps increase nswbuf to 3/4 nbuf instead of 1/2 nbuf.
 1.36 16-Jul-1994  chopps fix a couple things pointed out from Michael.
 1.35 16-Jul-1994  chopps ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.34 02-Jul-1994  chopps branches: 1.34.2;
remove exec_aout.h
 1.33 22-Jun-1994  chopps cleanup and recognize the a1200.
 1.32 21-Jun-1994  chopps fix protection around arpintr().
 1.31 16-Jun-1994  chopps add eclockfreq. remove physstrat from machdep and cleanup a little.
 1.30 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.29 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.28 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.27 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.26 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.25 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.24 11-May-1994  chopps fix mmutype recocgnition cleanup cpu identify and other boot diags.
 1.23 09-May-1994  chopps update for recent sig changes and fix clock.c
 1.22 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.21 24-Apr-1994  chopps fix form hp300.
 1.20 22-Apr-1994  chopps eek paste accidental spaces.
 1.19 22-Apr-1994  chopps grab new net changes from hp300/mchdep.c
 1.18 18-Apr-1994  chopps make current with recent vm changes, also clean old from genassym
 1.17 10-Apr-1994  chopps missed a cast.
 1.16 05-Apr-1994  chopps fp -> fd, consistency good. [nameclash bad.]
 1.15 05-Apr-1994  chopps incorpaorated floppy code from Brad Pepers, needs work doesn't work on my
machine. more clenaup in trap.c
 1.14 30-Mar-1994  chopps remove dlists.h oops.
 1.13 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.12 25-Mar-1994  chopps cc cleanup, dlist ==> sys/queue
 1.11 08-Mar-1994  chopps first get it to compile with DDB.
 1.10 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.9 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.8 11-Feb-1994  chopps Add missing $Id$'s
 1.7 01-Feb-1994  chopps removed compiler warnings.
 1.6 30-Jan-1994  chopps Removed chipmem limit for all but GODZILLA, added CEND() copper list macro,
added views back in conf and fixed misc compile warns and errors.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.34.2.3 18-Jul-1994  cgd update from trunk, per chopps
 1.34.2.2 16-Jul-1994  cgd from trunk, per chopps
 1.34.2.1 16-Jul-1994  cgd update from trunk, per chopps
 1.38.2.2 06-Oct-1994  chopps add another interrupt entry, for 4091.
 1.38.2.1 06-Oct-1994  chopps file machdep.c was added on branch netbsd-1-0 on 1994-10-06 19:11:31 +0000
 1.72.4.1 26-May-1996  is Pullup from trunk: Retina blanking bug, misc. cleanup including #ifdef'ing
out of annoying (to the normal user) debug code.
 1.82.6.1 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.82.4.1 12-Feb-1997  mrg don't allocate swap map in allocsys.
 1.89.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.94.2.4 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.94.2.3 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.94.2.2 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.94.2.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.95.2.1 08-Sep-1997  thorpej Significantly restructure the way signal state for a process is stored.
Rather than using bitmasks to redundantly store the information kept
in the process's sigacts (because the sigacts was kept in the u-area),
hang sigacts directly off the process, and access it directly.

Simplify signal setup code tremendously by storing information in
the sigacts as an array of struct sigactions, rather than in a different
format, since userspace uses sigactions.

Make sigacts sharable by adding reference counting.
 1.104.2.2 06-Oct-1998  cgd revert pullup of 1.105 (done for 1.3.1), which broke SunOS binary execution
(PR#5782). (is)
 1.104.2.1 07-Feb-1998  mellon Pull up 1.105-1.107 (is)
 1.133.2.1 16-Apr-1999  chs branches: 1.133.2.1.2; 1.133.2.1.4;
pull up 1.133 -> 1.134:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.133.2.1.4.2 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.133.2.1.4.1 28-Jun-1999  itojun KAME/NetBSD 1.4 SNAP kit, dated 19990628.

NOTE: this branch (kame) is used just for refernce. this may not compile
due to multiple reasons.
 1.133.2.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.133.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.141.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.141.4.1 14-Nov-1999  fvdl Sync with -current.
 1.141.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.141.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.141.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.141.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.141.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.151.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.159.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.159.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.163.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.163.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.163.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.163.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.163.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.163.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.163.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.163.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.164.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.165.2.16 07-Jan-2003  thorpej Sync with HEAD.
 1.165.2.15 11-Nov-2002  nathanw Catch up to -current
 1.165.2.14 18-Oct-2002  nathanw Catch up to -current.
 1.165.2.13 05-Oct-2002  gmcgarry LWPify
 1.165.2.12 17-Sep-2002  nathanw Catch up to -current.
 1.165.2.11 27-Aug-2002  nathanw Catch up to -current.
 1.165.2.10 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.165.2.9 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.165.2.8 20-Jun-2002  nathanw Catch up to -current.
 1.165.2.7 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.165.2.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.165.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.165.2.4 08-Jan-2002  nathanw Catch up to -current.
 1.165.2.3 02-Dec-2001  scw If an FPU is available, call m68k_make_fpu_idle_frame() to generate
a reference FPU idle frame.
 1.165.2.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.165.2.1 07-Nov-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-17 21:59:06 +0000
 1.172.2.2 30-Aug-2002  gehenna catch up with -current.
 1.172.2.1 16-May-2002  gehenna Replace the direct-access to devsw table with calling devsw API.
 1.184.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.184.2.5 19-Feb-2005  skrll Don't deref a NULL struct lwp *. This shouldn't happen, but...
 1.184.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.184.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.184.2.2 03-Aug-2004  skrll Sync with HEAD
 1.184.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.190.14.1 01-Nov-2005  tron Pull up following revision(s) (requested by chs in ticket #923):
sys/arch/next68k/next68k/machdep.c: revision 1.73
sys/arch/luna68k/luna68k/machdep.c: revision 1.42
sys/arch/hp300/hp300/machdep.c: revision 1.184
sys/arch/amiga/amiga/machdep.c: revision 1.193
sys/arch/x68k/x68k/machdep.c: revision 1.129
sys/arch/mac68k/mac68k/machdep.c: revision 1.306
sys/arch/news68k/news68k/machdep.c: revision 1.61
sys/arch/mvme68k/mvme68k/machdep.c: revision 1.113
sys/arch/atari/atari/atari_init.c: revision 1.63
fix crash dumps on m68k platforms, cpu_kcore_hdr_t is larger than
512 bytes now so we need a bigger buffer. PR 26958.
 1.190.8.1 29-Apr-2005  kent sync with -current
 1.192.4.1 02-Nov-2005  yamt sync with head.
 1.192.2.6 21-Jan-2008  yamt sync with head
 1.192.2.5 07-Dec-2007  yamt sync with head
 1.192.2.4 03-Sep-2007  yamt sync with head.
 1.192.2.3 26-Feb-2007  yamt sync with head.
 1.192.2.2 30-Dec-2006  yamt sync with head.
 1.192.2.1 21-Jun-2006  yamt sync with head.
 1.195.14.1 19-Jun-2006  chap Sync with head.
 1.195.8.1 26-Jun-2006  yamt sync with head.
 1.195.4.1 09-Sep-2006  rpaulo sync with head
 1.196.8.4 23-Oct-2006  yamt pull 1.199 from trunk.
 1.196.8.3 23-Oct-2006  yamt pull 1.198 from trunk.
 1.196.8.2 22-Oct-2006  yamt sync with head
 1.196.8.1 29-Sep-2006  yamt implement splraiseipl/makeiplcookie for amiga.
 1.196.6.2 12-Jan-2007  ad Sync with head.
 1.196.6.1 18-Nov-2006  ad Sync with head.
 1.200.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.200.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.202.10.2 03-Oct-2007  garbled Sync with HEAD
 1.202.10.1 22-May-2007  matt Update to HEAD.
 1.202.4.1 11-Jul-2007  mjf Sync with head.
 1.202.2.4 03-Dec-2007  ad Sync with HEAD.
 1.202.2.3 03-Dec-2007  ad Sync with HEAD.
 1.202.2.2 15-Jul-2007  ad Sync with head.
 1.202.2.1 27-May-2007  ad Sync with head.
 1.205.10.2 09-Jan-2008  matt sync with HEAD
 1.205.10.1 06-Nov-2007  matt sync with HEAD
 1.205.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.206.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.206.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.207.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.208.14.1 03-Jul-2008  simonb Sync with head.
 1.208.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.208.10.4 11-Aug-2010  yamt sync with head.
 1.208.10.3 11-Mar-2010  yamt sync with head
 1.208.10.2 20-Jun-2009  yamt sync with head
 1.208.10.1 04-May-2009  yamt sync with head.
 1.208.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.208.6.1 02-Jul-2008  mjf Sync with HEAD.
 1.209.6.2 01-Dec-2009  snj Pull up following revision(s) (requested by mhitch in ticket #1166):
sys/arch/amiga/amiga/machdep.c: revision 1.222
Remove old legacy IPL_* settings in ipl2spl_table - they are redundant
and in the case of IPL_AUDIO, results in IPL_VM blocking all interrupts.
[IPL_AUDIO is now the same as IPL_VM, and was setting the IPL_VM entry
to PSL_IPL6. IPL_SERIAL had a duplicate entry for some reason, and
serial drivers that check and modify IPL_SERIAL now shouldn't be affected
since IPL_SERIAL is now the same as IPL_HIGH. I'm hoping this will fix
or at least help the problem of serial interrupts being blocked too long.
 1.209.6.1 02-Feb-2009  snj branches: 1.209.6.1.4;
Pull up following revision(s) (requested by ad in ticket #346):
sys/arch/alpha/alpha/machdep.c: revision 1.311
sys/arch/amiga/amiga/machdep.c: revision 1.211
sys/arch/atari/atari/machdep.c: revision 1.153
sys/arch/hp700/hp700/machdep.c: revision 1.53
sys/arch/i386/i386/dumpsys.c: revision 1.5
sys/arch/mips/mips/mips_machdep.c: revision 1.206
sys/arch/mvme68k/mvme68k/machdep.c: revision 1.132
sys/arch/news68k/news68k/machdep.c: revision 1.75
sys/arch/next68k/next68k/machdep.c: revision 1.88
sys/arch/sparc/sparc/machdep.c: revision 1.285
sys/arch/sparc64/sparc64/machdep.c: revision 1.230
sys/arch/sun2/sun2/machdep.c: revision 1.56
sys/arch/sun3/sun3/machdep.c: revision 1.188
sys/arch/sun3/sun3x/machdep.c: revision 1.114
sys/arch/x68k/x68k/machdep.c: revision 1.153
dumpsys: don't spew numbers into the log.
 1.209.6.1.4.1 21-Apr-2010  matt sync to netbsd-5
 1.209.4.3 28-Apr-2009  skrll Sync with HEAD.
 1.209.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.209.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.209.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.214.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.224.2.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.224.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.224.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.225.2.5 31-May-2011  rmind sync with head
 1.225.2.4 21-Apr-2011  rmind sync with head
 1.225.2.3 05-Mar-2011  rmind sync with head
 1.225.2.2 03-Jul-2010  rmind sync with head
 1.225.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.228.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.229.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.229.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.233.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.234.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.234.2.2 30-Oct-2012  yamt sync with head
 1.234.2.1 17-Apr-2012  yamt sync with head
 1.235.4.1 18-Feb-2012  mrg merge to -current.
 1.239.2.3 03-Dec-2017  jdolecek update from HEAD
 1.239.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.239.2.1 25-Feb-2013  tls resync with head
 1.241.2.1 18-May-2014  rmind sync with head
 1.243.6.4 28-Aug-2017  skrll Sync with HEAD
 1.243.6.3 05-Feb-2017  skrll Sync with HEAD
 1.243.6.2 22-Apr-2016  skrll Sync with HEAD
 1.243.6.1 22-Sep-2015  skrll Sync with HEAD
 1.243.4.1 10-Jun-2015  snj Pull up following revision(s) (requested by mlelstv in ticket #838):
sys/arch/amiga/amiga/machdep.c: revision 1.244
Fix space calculation for dump header. Round up to clicks to avoid
disk alignment issues.
 1.246.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.246.2.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.247.6.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.249.4.1 10-Jun-2019  christos Sync with HEAD
 1.249.2.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.46 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.45 08-Feb-2011  rmind branches: 1.45.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.44 14-Mar-2009  dsl branches: 1.44.4; 1.44.6; 1.44.8;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.43 19-Dec-2008  cegger branches: 1.43.2;
use M_ZERO on malloc() and remove subsequent bzero().
 1.42 05-Mar-2007  he branches: 1.42.40; 1.42.44; 1.42.52;
Use char* for pointer arithmetic.
 1.41 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.40 11-Dec-2005  christos branches: 1.40.26;
merge ktrace-lwp.
 1.39 07-Aug-2003  agc branches: 1.39.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.38 16-Apr-2003  is branches: 1.38.2;
make /dev/reload optional. (It is only implemented for a.out kernels at the
moment.)
 1.37 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.36 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.35 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.34 25-Mar-2002  aymeric branches: 1.34.2;
include <machine/conf.h> instead of <sys/conf.h>
The new DEV_RELOAD macro is defined in machine/conf.h and we need it.
 1.33 27-Feb-2002  christos - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.32 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.31 10-Sep-2001  chris branches: 1.31.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.30 24-Apr-2001  thorpej branches: 1.30.2; 1.30.4;
Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.29 29-Jun-2000  mrg branches: 1.29.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.28 29-Jun-2000  mhitch Add cdev_decl() to declare mm*() routines.
 1.27 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.26 04-Dec-1999  ragge branches: 1.26.4;
CL* discarding.
 1.25 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.24 26-Mar-1999  mycroft branches: 1.24.8; 1.24.10; 1.24.14;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.23 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.22 10-Feb-1999  kleink Use of casts as lvalues is a GNU C extension; rearrange slightly.
 1.21 19-Nov-1998  mrg fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!
 1.20 10-Jul-1998  mhitch Add UVM support to amiga
 1.19 07-May-1998  kleink Fix some arithmetics lossage on typeless pointers.
 1.18 02-Feb-1997  thorpej branches: 1.18.12;
zeropage -> devzeropage, and make it static.
 1.17 23-Apr-1996  veego Ups, I removed a label which should go into a ifdef
 1.16 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.15 09-Oct-1995  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.14 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.12 10-Apr-1995  mycroft Add mmopen(), mmclose(), and mmmmap() where appropriate. Lock vmmap when
needed. Make types consistent.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 25-May-1994  chopps MIN() -> min()
 1.9 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.8 18-Apr-1994  chopps make current with recent vm changes, also clean old from genassym
 1.7 08-Mar-1994  chopps Little bit of cleanup, didn't go near the GNU stuff aside from function
deeclaritors.
 1.6 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.18.12.1 23-Nov-1998  cgd Fix many real and potential security problems with character device
driver mmap routines that did not properly bounds check offsets.
See NetBSD security advisory NetBSD-SA1998-005 for details. Done
as a patch because it's large, and a fair number of bits are different
in -current. (mrg)
 1.24.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.24.10.1 14-Nov-1999  fvdl Sync with -current.
 1.24.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.26.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.29.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.30.4.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.30.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.30.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.30.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.30.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.30.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.30.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.31.4.5 11-Nov-2002  nathanw Catch up to -current
 1.31.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.31.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.31.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.31.4.1 10-Sep-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-02-28 04:06:24 +0000
 1.34.2.1 16-May-2002  gehenna Add the character device switch.
 1.38.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.38.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.38.2.1 03-Aug-2004  skrll Sync with HEAD
 1.39.16.1 03-Sep-2007  yamt sync with head.
 1.40.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.42.52.2 28-Apr-2009  skrll Sync with HEAD.
 1.42.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.42.44.1 04-May-2009  yamt sync with head.
 1.42.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.42.40.1 29-Mar-2008  mjf Add a mem_init() function for each architecture that requests a device
node for /dev/mem, /dev/null, /dev/zero, etc.

This will disappear when I move this code (and others) to be a
pseudo-device. When we have machine-independent mem code this will all be
unnecessary anyway.
 1.43.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.44.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.44.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.44.4.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.45.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.6 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 26-Oct-1994  cgd branches: 1.4.46; 1.4.50;
new RCS ID format.
 1.3 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.2 11-Feb-1994  chopps Add missing $Id$'s
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4.50.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.46.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.4 26-Jan-1994  mycroft Clean up deleted files.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.158 06-Dec-2009  tsutsui Remove old MD pmap.c files for amiga and atari.
They no longer work due to reorganization of common pmap_motorola.c.
 1.157 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.156 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.155 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.154 26-Aug-2009  thorpej Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
 1.153 18-Aug-2009  thorpej Add a real API for testing if a page is a managed page, and adjust callers
to stop relying on vm_physseg_find() for this purpose.
 1.152 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.151 18-Mar-2009  cegger bzero -> memset
 1.150 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.149 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.148 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.147 17-Jan-2009  tsutsui branches: 1.147.2;
Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
 1.146 01-Jan-2009  tsutsui Remove declarations of CADDR1, CADDR2, and vmmap.
These variables have been moved into pmap_bootstrap.c
and <m68k/pmap_motorola.h> has extern decls for them.
 1.145 31-Dec-2008  tsutsui - remove extern decls for unused msgbufaddr and msgbufpa
- remove noncontig_enable which has been moved into pmap_bootstrap.c
 1.144 31-Dec-2008  tsutsui Make kernel_pmap_store static as well as other m68k ports.
 1.143 31-Dec-2008  tsutsui Some minor cosmetics, to sync with atari.
 1.142 31-Dec-2008  tsutsui Add avail_start and avail_end for debug printf,
to sync with m68k/pmap_motorola.c.

XXX: virtual_avail (VA of first avail page) is not initialized?
 1.141 31-Dec-2008  tsutsui Misc cleanup:
- use proper types on variable declarations
- allocate Sysseg_pa in pmap_bootstrap.c where it's actually used
rather than in atari/pmap.c
- remove comments in pmap_bootstrap.c which were duplicated from pmap.c
- add explicit `extern' keywords for variables allocated elsewhere
- update comment for pmap_bootstrap() to sync with reality

No functional changes.
 1.140 31-Dec-2008  tsutsui Adjust comments (which were added by me) to sync with m68k/pmap_motorola.c.
 1.139 19-Dec-2008  cegger use M_ZERO on malloc() and remove subsequent bzero().
 1.138 10-Dec-2008  pooka Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.137 29-Jun-2008  tsutsui branches: 1.137.2; 1.137.4;
Sync with arch/m68k/m68k/pmap_motorola.c rev 1.38:
> Remove ({ }) gcc extensions and use static inline functions instead.
 1.136 28-Apr-2008  martin branches: 1.136.2; 1.136.4;
Remove clause 3 and 4 from TNF licenses
 1.135 03-Jan-2008  ad branches: 1.135.6; 1.135.8; 1.135.10;
- Remove simple_lock calls.
- Use mutex_enter/exit where needed.
 1.134 17-Oct-2007  garbled branches: 1.134.2; 1.134.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.133 23-Jul-2007  he branches: 1.133.6;
As per hint from ad@, change uvm.kernel_object to uvm_kernel_object,
to adapt to the recent uvm changes.
 1.132 16-Jul-2007  macallan branches: 1.132.2; 1.132.4;
change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
 1.131 09-Jun-2007  mhitch Move pmap_bootstrap() into a separate file. Amiga can now use either the
amiga pmap.c or the m68k common pmap_motorola.c.
 1.130 05-Jun-2007  mhitch Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.129 01-Jun-2007  mhitch Get rid of one more incompatibility with pmap_motorola.c from pmap_bootstrap().
 1.128 28-May-2007  mhitch Got rid of too much - need to allocate virtual space for msgbuf.
 1.127 27-May-2007  mhitch Oops. I thought I had caught this before commiting the CMAP[12] removal,
but obviously I didn't. Non-DEBUG kernels were unbootable because I left
some code inside an #ifdef DEBUG group.
 1.126 23-May-2007  mhitch Rework pmap_zero_page() and pmap_copy_page() so it doesn't need the pte
pointers from pmap_bootstrap(), and make pmap_bootstrap() more compatible
with the common m68k pmap_motorola.c.
cVS: ----------------------------------------------------------------------
 1.125 22-May-2007  mhitch From pmap_motorols,c:

Allow pmap_enter_ptpage to fail, sometimes. Pass WAIT/NOWAIT flags and
fix some obvious locking problems. This allows us to run a LOCKDEBUG
ernel now.
 1.124 18-May-2007  mhitch Amiga changes for idlelwp.
 1.123 12-May-2007  mhitch Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).

- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.

A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.122 05-Mar-2007  he branches: 1.122.2; 1.122.4; 1.122.10;
Convert "void * a, b, c;" to "void *a, *b, *c;" to make this build again.
 1.121 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.120 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.119 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.118 14-Sep-2006  mhitch branches: 1.118.4; 1.118.6; 1.118.8;
Uvm changes over 17 months ago resulted in the 68040/060 segment table
page being entered with pmap_kenter(), which does not record the mapping
in the pv table. Attempting to inhibit caching of that page as required
by the 68060 hardware no longer changes the PTE and caused varying degrees
of multiple faulting, sometimes resulting in an unusable system. Apparently
very few people attempted to run a 68060 based system since that change.
Fix to to change the caching bits directly rather than using pmap_changebit().
 1.117 13-Sep-2006  spz const'ify several char * to shut up gcc4 warnings
Reviewed by <is>
 1.116 03-Aug-2006  mhitch branches: 1.116.2; 1.116.4;
gcc4 uninitialized warning - initialize the darned thing like pmap_motorola.c.
 1.115 11-Dec-2005  christos branches: 1.115.4; 1.115.8;
merge ktrace-lwp.
 1.114 13-Jun-2005  jmc branches: 1.114.2;
Fix a variable shadowing
 1.113 29-May-2005  chs in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.112 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.111 01-Jan-2005  yamt branches: 1.111.2; 1.111.4; 1.111.8;
introduce vm_map_kernel, a subclass of vm_map, and
move some kernel-only members of vm_map to it.
 1.110 23-Sep-2004  tron Because "paddr_t" is not a pointer type initialize "pa" to 0 and not NULL.
 1.109 23-Sep-2004  tron Initialize variable "pa" to NULL in pmap_extract() to fix a compiler
error while building a debug kernel. Problem pointed out by S.P.Zeidler
on "port-amiga" mailing list.
 1.108 27-Sep-2003  mhitch branches: 1.108.2;
Cast through (void *) to appease gcc3.
 1.107 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.106 10-May-2003  thorpej branches: 1.106.2;
Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
 1.105 08-May-2003  thorpej Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.104 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.103 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.102 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.101 22-May-2002  drochner Subtract vm_map_min(kernel_map) from kernel virtual addresses to get offsets
into kernel_object where this was missing.
This is a no-op on ports where VM_MIN_KERNEL_ADDRESS==0, ie all but
cesfic.
Confirmed and corrected by Chuck Silvers.
 1.100 25-Apr-2002  aymeric branches: 1.100.2;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.99 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.98 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.97 02-Jan-2002  chs pmap_page_protect(VM_PROT_NONE) must remove all mappings in the PV list,
even if they are wired. we need to be able to remove all mappings to
pages that are being freed due to (eg.) file truncation.
 1.96 16-Dec-2001  tsutsui Fix comments for ref-count of PT pages.
 1.95 13-Dec-2001  chs change the reference-counting of PT pages to start from zero instead of
one, so that we don't mess up the global count of wired pages by having
the page's wire_count be non-zero when we free the page.
pointed out by Michael Hitch.
 1.94 24-Nov-2001  isaki fix typo s/68551/68851/ in a comment.
 1.93 19-Nov-2001  chs allocate and free page table pages explicitly instead of abusing
uvm_fault_wire(). this allows us to make pt_map non-pageable,
but we need to be careful in pmap_remove() not to attempt to
reference PTEs after the PTP has been freed.
 1.92 29-Sep-2001  chs branches: 1.92.4;
fix typo in pmap_kremove() which was invalidating the wrong TLB entry.
from Hiroki Tanikawa in PR 14099.
 1.91 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.90 15-Aug-2001  mhitch branches: 1.90.2;
From Chuck Silvers:
implement pmap_k{enter_pa,remove}() correctly.
remove various checks for impossible conditions.
other misc cleanup.
 1.89 02-Jun-2001  chs branches: 1.89.2;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.88 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.87 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.86 22-Apr-2001  thorpej Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
 1.85 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.84 21-Apr-2001  thorpej pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations. Since these pmaps don't
defer anything, pmap_update() is a noop.
 1.83 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.82 20-Jan-2001  mhitch branches: 1.82.2;
UVM pagesize needs to be set *before* UVM tries to use it. The change to
a constant PAGE_SIZE value didn't include setting the UVM pagesize, and the
attempt to add this ended up in the wrong place. Amiga should now boot
again.
 1.81 14-Jan-2001  thorpej splimp() -> splvm()
 1.80 13-Jan-2001  aymeric Notify UVM subsystem about our page size in pmap_init().
Some MI code needs it (Linux emulation, sysctl and the like).
Thanks to Izumi Tsutsui for pointing it.
 1.79 13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.78 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.77 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.76 03-Apr-2000  aymeric added two vaddr_t casts so that this compiles again with -DDEBUG
 1.75 26-Mar-2000  kleink Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
make them type-generic, which is necessary i.e. to operate on file offsets
without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
 1.74 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.73 24-Sep-1999  is branches: 1.73.2; 1.73.4; 1.73.8;
Make this compile without 68060 support. Apparently, nobody has tried this for
a long time.
 1.72 12-Sep-1999  chs eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.71 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.70 03-Aug-1999  is Fix typo in the last change, which resulted in invalid global pmap structures,
leading to a spectacular panic when the first address is entered into a
pmap the normal way. The problem was reported by Adam Ciarcinski.
 1.69 08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.68 19-Jun-1999  is Sync with Atari pmap: support for the UVM changes
 1.67 17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.66 17-Jun-1999  thorpej Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
 1.65 26-May-1999  thorpej Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.
 1.64 22-Apr-1999  chs in pmap_pageable(), rather than marking a PT page as not modified
to trick the pagedaemon into freeing it later, just unmap the page
and free it immediately. fixes PR 7337.
 1.63 27-Mar-1999  mycroft branches: 1.63.2;
Fix a bug in pmap_collect_pv(), even though nobody currently uses it:
When we put a page on the collection list, we must subtract NPVPPG from the
total free count: one for each pv_entry that's free in that page, and one for
each free pv_entry in other pages that we're going to eat by moving the ones
in the page being collected.
 1.62 27-Mar-1999  mycroft Oops; forgot to change some pmap_enter() calls.
 1.61 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.60 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.59 25-Feb-1999  is mac68k part of pr 6152 fix, and missing bits for the others
 1.58 06-Feb-1999  is One more small step towards a unified m68k pmap:
use the common pmap_copy_page() and pmap_zero_page (copied from Atari).
 1.57 16-Jan-1999  chuck remove old MACHINE_NONCONTIG code
 1.56 11-Oct-1998  chuck remove unused share map code from UVM:
- update calls to uvm_unmap_remove/uvm_unmap (mainonly boolean arg
has been removed)
 1.55 26-Sep-1998  is 4/NPTEPG is 0. This is a very old editing error.
 1.54 12-Aug-1998  is Get rid of AMIGA_UPTBASE.
Replace it by a variable, which is initialized in amiga_init.c.
This will make the kernel actually work even if we have lots of Zorro-III
(or DraCo direct bus) i/o space.
 1.53 14-Jul-1998  mhitch Oops - check and calculate maxproc with right symbols - maxproc was getting
incorrectly reduced for UVM.
 1.52 10-Jul-1998  mhitch Add UVM support to amiga.

Use a second free memory list for 16-bit Zorro II memory other than the
first memory segment.
 1.51 24-May-1998  is Replace a couple of machineid uses by cputype uses.
 1.50 24-May-1998  is Fix thinko. Rather, nonthink-o.
 1.49 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.48 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.47 19-May-1998  thorpej It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
 1.46 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.45 22-Feb-1998  is Actually fix, rather than mask, the Amiga big machine panic: the pmap needs
to (pre)allocate enough kernel page table pages to (among others) map the
buffer cache buffers.
 1.44 22-Jan-1998  is If on the M68060, make cache-inhibited pages imprecise. Reads and writes
are still in-order, but cached reads dont wait for the last write to finish.
Xamiga on a Altais in 8bit-mode became 30% faster servicing xanim (well, 6%
if you count xanim, too).
 1.43 06-Jan-1998  thorpej Garbage-collect pm_stchanged; it's not used by anything.
 1.42 06-Jan-1998  thorpej Garbage-collect use of the PCB's copy of the user segment table pointer.
 1.41 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.40 19-Sep-1997  leo branches: 1.40.2;
Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.39 10-Jun-1997  veego branches: 1.39.4;
s/amiga_round_page/m68k_round_page/ s/amiga_btop/m68k_btop/
s/amiga_trunc_seg/m68k_trunc_seg/ s/amiga_round_seg/m68k_round_seg/
s/amiga_ptob/m68k_ptob/
 1.38 13-Oct-1996  christos backout previous kprintf change
 1.37 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.36 02-Aug-1996  is Rewrite of the last bugfix wrt. Z2 bounce buffer memory allocation:

Don't manipulate the memlist passed from the kickstart rom + bootloader, as
we want it unchanged in case we boot via /dev/reload.
Instead, make z2mem_start known to pmap.c; and use int in pmap_bootstrap to
detect the right segment to correct and the amount.

XXX The transformation of z2mem from physical to virtual kernel addresses
in amiga_init.c must not be done before the pmap_bootstrap() call now!
 1.35 29-Jul-1996  is Deal with two bugs in the bounce buffer memory reserve code:

If z2 memory is used for bounce buffers, it used to be stolen in
amiga_init.c, but would not be removed from the memory list there, but
in pmap.c the memory list would just be corrected.

a) the sizes subtracted got out of sync.
b) the memory segment to subtract from was guessed in pmap_init, and not
necessarily right. (e.g. consider a graphics board whose fraem buffer gets
mapped in by the RO at 0x200000, and a memory board which maps at 0x400000)

The new code subtracts the stolen aount of memory from the memlist parameter
given to the kernel by the loader, and pmap_init just doesn't see it anymore.
 1.34 19-May-1996  veego branches: 1.34.4;
conf.c - added scsi scanner entry
pmap.c - -Wall fixes for MACHINE_NONCONTIG and M68040 || M68060
 1.33 12-May-1996  mhitch Fix yet another -Wall warning.
 1.32 10-May-1996  mhitch Finally convert the pv_entry allocation to match the hp300 pmap.c.
This should reduce the possibility of a panic when unable to allocate
a new pv_entry under low memory conditions.
Changed a couple of kmem_free() calls to kmem_free_wakeup() as in the
hp300 pmap.c.
-Wall cleanup: unused variable when M68060 not defined.
 1.31 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.30 28-Apr-1996  mhitch More cleanup of -Wall warnings when compiled with DEBUG.
 1.29 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.28 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.27 09-Oct-1995  chopps branches: 1.27.2;
vtrace -> sys_vtrace
 1.26 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.25 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.23 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.22 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.21 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.20 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.19 28-Dec-1994  chopps non-contig memory from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.18 26-Oct-1994  cgd new RCS ID format.
 1.17 20-Jun-1994  chopps remove last (!?) of HAVEVAC code.
 1.16 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.15 04-Jun-1994  chopps fix long standing "bug" with pmap. Basically logic/misunderstanding
error commited when it was ported from hp300 (mach?). All
8M + amigas now gain ~1M of physical ram (4M hack removed).
Some minor cleanup. HAVEVAC code removed as it is for the hp300.
 1.14 01-Jun-1994  chopps bring some good ideas over from hp300 port.
 1.13 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.12 21-May-1994  chopps sys/vmmeter.h, sys/user.h and vm/vm.h shuffle.
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 29-Apr-1994  chopps change mmap to vmpte to avoid nameclash with the syscall.
 1.9 18-Apr-1994  chopps make current with recent vm changes, also clean old from genassym
 1.8 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.7 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.6 11-Feb-1994  chopps Add missing $Id$'s
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.27.2.1 10-Nov-1995  chopps fix pmap bug (#1721) from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.34.4.1 03-Aug-1996  jtc Pulled up from rev 1.36 by request from Ignatios Souvatzis
 1.39.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.40.2.1 08-May-1998  mycroft Pull up 1.45, per request of is.
 1.63.2.1 26-Apr-1999  perry branches: 1.63.2.1.2;
pullup 1.63->1.64 (chuq)
 1.63.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.63.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.73.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.73.4.1 14-Nov-1999  fvdl Sync with -current.
 1.73.2.5 23-Apr-2001  bouyer Sync with HEAD.
 1.73.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.73.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.73.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.73.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.82.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.82.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.89.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.89.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.89.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.89.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.89.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.89.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.90.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.92.4.9 18-Oct-2002  nathanw Catch up to -current.
 1.92.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.92.4.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.92.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.92.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.92.4.4 08-Jan-2002  nathanw Catch up to -current.
 1.92.4.3 18-Nov-2001  scw In pmap_activate(), we only need to load the pmap if switching to
a new/different process.
 1.92.4.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.92.4.1 29-Sep-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-17 21:59:07 +0000
 1.100.2.1 30-May-2002  gehenna Catch up with -current.
 1.106.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.106.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.106.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.106.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.106.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.106.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.106.2.1 03-Aug-2004  skrll Sync with HEAD
 1.108.2.2 08-Jun-2005  tron Pull up revision 1.113 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.108.2.1 01-Oct-2004  jmc branches: 1.108.2.1.2;
Pullup rev 1.109-1.110 (requested by tron in ticket #873)

Fix issues so debug kernels can build
 1.108.2.1.2.1 08-Jun-2005  tron Pull up revision 1.113 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.111.8.1 06-Jun-2005  tron Pull up revision 1.113 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.111.4.3 18-Feb-2005  chs with the new km API, we must longer explicitly unmap and free the
st_map pages, so don't. also, use the correct km type for freeing the
st_map space on amiga.
 1.111.4.2 31-Jan-2005  yamt convert arch/amiga to new apis.
 1.111.4.1 27-Jan-2005  yamt follow uvm_km_pgremove prototype change.
 1.111.2.1 29-Apr-2005  kent sync with -current
 1.114.2.4 21-Jan-2008  yamt sync with head
 1.114.2.3 03-Sep-2007  yamt sync with head.
 1.114.2.2 26-Feb-2007  yamt sync with head.
 1.114.2.1 30-Dec-2006  yamt sync with head.
 1.115.8.2 14-Sep-2006  yamt sync with head.
 1.115.8.1 11-Aug-2006  yamt sync with head
 1.115.4.1 09-Sep-2006  rpaulo sync with head
 1.116.4.1 18-Nov-2006  ad Sync with head.
 1.116.2.1 16-Sep-2006  rpaulo Pull up following revision(s) (requested by mhitch in ticket #163):
sys/arch/amiga/amiga/pmap.c: revision 1.118
Uvm changes over 17 months ago resulted in the 68040/060 segment table
page being entered with pmap_kenter(), which does not record the mapping
in the pv table. Attempting to inhibit caching of that page as required
by the 68060 hardware no longer changes the PTE and caused varying degrees
of multiple faulting, sometimes resulting in an unusable system. Apparently
very few people attempted to run a 68060 based system since that change.
Fix to to change the caching bits directly rather than using pmap_changebit().
 1.118.8.2 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.118.8.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.118.6.3 17-May-2007  yamt sync with head.
 1.118.6.2 12-Mar-2007  rmind Sync with HEAD.
 1.118.6.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.118.4.5 04-Jun-2007  bouyer Pull up following revision(s) (requested by mhitch in ticket #694):
sys/arch/amiga/amiga/pmap.c: revision 1.129
Get rid of one more incompatibility with pmap_motorola.c from pmap_bootstrap().
 1.118.4.4 04-Jun-2007  bouyer Pull up following revision(s) (requested by mhitch in ticket #689):
sys/arch/amiga/amiga/pmap.c: revision 1.128 via patch
Got rid of too much - need to allocate virtual space for msgbuf.
 1.118.4.3 30-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #685):
sys/arch/amiga/amiga/pmap.c: revision 1.126
sys/arch/amiga/amiga/pmap.c: revision 1.127
Rework pmap_zero_page() and pmap_copy_page() so it doesn't need the pte
pointers from pmap_bootstrap(), and make pmap_bootstrap() more compatible
with the common m68k pmap_motorola.c.
Oops. I thought I had caught this before commiting the CMAP[12] removal,
but obviously I didn't. Non-DEBUG kernels were unbootable because I left
some code inside an #ifdef DEBUG group.
 1.118.4.2 30-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #682):
sys/arch/atari/atari/pmap.c: revision 1.99
sys/arch/amiga/amiga/pmap.c: revision 1.125
From pmap_motorols,c:
Allow pmap_enter_ptpage to fail, sometimes. Pass WAIT/NOWAIT flags and
fix some obvious locking problems. This allows us to run a LOCKDEBUG
ernel now.
 1.118.4.1 23-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #659):
sys/arch/amiga/amiga/amiga_init.c: revision 1.95
sys/arch/amiga/include/vmparam.h: revision 1.35
sys/arch/amiga/amiga/pmap.c: revision 1.123
Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).
- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.
A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.122.10.3 03-Oct-2007  garbled Sync with HEAD
 1.122.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.122.10.1 22-May-2007  matt Update to HEAD.
 1.122.4.1 11-Jul-2007  mjf Sync with head.
 1.122.2.4 20-Aug-2007  ad Sync with HEAD.
 1.122.2.3 15-Jul-2007  ad Sync with head.
 1.122.2.2 09-Jun-2007  ad Sync with head.
 1.122.2.1 27-May-2007  ad Sync with head.
 1.132.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.132.2.1 07-Aug-2007  matt Sync with HEAD.
 1.133.6.2 09-Jan-2008  matt sync with HEAD
 1.133.6.1 06-Nov-2007  matt sync with HEAD
 1.134.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.134.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.135.10.5 11-Mar-2010  yamt sync with head
 1.135.10.4 16-Sep-2009  yamt sync with head
 1.135.10.3 19-Aug-2009  yamt sync with head.
 1.135.10.2 04-May-2009  yamt sync with head.
 1.135.10.1 16-May-2008  yamt sync with head.
 1.135.8.1 18-May-2008  yamt sync with head.
 1.135.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.135.6.2 02-Jul-2008  mjf Sync with HEAD.
 1.135.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.136.4.1 03-Jul-2008  simonb Sync with head.
 1.136.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.137.4.2 28-Apr-2009  skrll Sync with HEAD.
 1.137.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.137.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.147.2.2 24-Oct-2010  jym Sync with HEAD
 1.147.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.10 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.9 06-Dec-2009  tsutsui branches: 1.9.22; 1.9.40; 1.9.44;
Move initialization of protection_codes[] and kernel_pmap()
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
 1.8 06-Dec-2009  tsutsui pm_stfree in struct pmap is a bitmap value so make it unsigned.
 1.7 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.6 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.5 17-Jan-2009  tsutsui branches: 1.5.2;
Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
 1.4 31-Dec-2008  tsutsui Add avail_start and avail_end for debug printf,
to sync with m68k/pmap_motorola.c.

XXX: virtual_avail (VA of first avail page) is not initialized?
 1.3 31-Dec-2008  tsutsui Misc cleanup:
- use proper types on variable declarations
- allocate Sysseg_pa in pmap_bootstrap.c where it's actually used
rather than in atari/pmap.c
- remove comments in pmap_bootstrap.c which were duplicated from pmap.c
- add explicit `extern' keywords for variables allocated elsewhere
- update comment for pmap_bootstrap() to sync with reality

No functional changes.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 09-Jun-2007  mhitch branches: 1.1.2; 1.1.4; 1.1.16; 1.1.36; 1.1.38; 1.1.40;
Separate pmap_bootstrap() into its own file; needed for common m68k
pmap_motorola.c.
 1.1.40.3 11-Mar-2010  yamt sync with head
 1.1.40.2 04-May-2009  yamt sync with head.
 1.1.40.1 16-May-2008  yamt sync with head.
 1.1.38.1 18-May-2008  yamt sync with head.
 1.1.36.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.36.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.16.2 03-Sep-2007  yamt sync with head.
 1.1.16.1 09-Jun-2007  yamt file pmap_bootstrap.c was added on branch yamt-lazymbuf on 2007-09-03 14:22:41 +0000
 1.1.4.2 15-Jul-2007  ad Sync with head.
 1.1.4.1 09-Jun-2007  ad file pmap_bootstrap.c was added on branch vmlocking on 2007-07-15 13:21:02 +0000
 1.1.2.2 11-Jul-2007  mjf Sync with head.
 1.1.2.1 09-Jun-2007  mjf file pmap_bootstrap.c was added on branch mjf-ufs-trans on 2007-07-11 19:57:45 +0000
 1.2.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.2.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.44.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.9.40.1 05-Feb-2017  skrll Sync with HEAD
 1.9.22.1 03-Dec-2017  jdolecek update from HEAD
 1.4 07-Dec-2004  chs use the m68k-common procfs_machdep.c on all m68k platforms.
 1.3 28-Jan-2002  aymeric branches: 1.3.16;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.2 18-Jan-2001  tv branches: 1.2.4; 1.2.8;
No-op commit to force update to a non-"-kk" revision.
 1.1 17-Jan-2001  fvdl branches: 1.1.2;
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.1.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.1.2.1 17-Jan-2001  bouyer file procfs_machdep.c was added on branch thorpej_scsipi on 2001-01-18 09:22:09 +0000
 1.2.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.16.1 18-Dec-2004  skrll Sync with HEAD.
 1.6 01-Mar-1995  mycroft Clean up deleted files.
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11 12-Feb-2012  matt Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.10 14-Sep-2011  rkujawa branches: 1.10.2; 1.10.6;
Fix typo, add missing include (make this compile again).
 1.9 13-Sep-2011  christos Use c99 struct initializers so that this compiles.
 1.8 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.7 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.
 1.6 03-Feb-2010  phx Ensure reorder protection for amigappc in all bus space functions.
The ne(4) driver (XSurf2), which is the only bus_space device I got,
works now.
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 28-Jan-2002  aymeric branches: 1.4.118; 1.4.120; 1.4.122;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 23-Jan-2000  aymeric branches: 1.2.6; 1.2.10; 1.2.14;
code factorisation and added stride 1 functions
 1.1 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.6.1 23-Jan-2000  bouyer file simple_busfuncs.c was added on branch thorpej_scsipi on 2000-11-20 19:58:21 +0000
 1.4.122.2 11-Mar-2010  yamt sync with head
 1.4.122.1 16-May-2008  yamt sync with head.
 1.4.120.1 18-May-2008  yamt sync with head.
 1.4.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.2 22-Apr-1995  christos remove sunos_machdep.c
 1.1 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.28 31-Jan-1997  thorpej This file is obsolete; this information is now generated by config(8).
 1.27 26-Jan-1997  rat Add missing #include <isofs/cd9660/cd9660_extern.h> to provide
prototype for 'cd9660_mountroot'.
 1.26 13-Oct-1996  christos branches: 1.26.2;
backout previous kprintf change
 1.25 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.24 21-May-1996  is Sync with the cpu.h change: setconf() only used if defined(GENERIC).
 1.23 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.22 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.21 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.20 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.19 19-Apr-1995  chopps allow boot from cdrom. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.18 28-Dec-1994  chopps fix extra arg thing.
 1.17 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.16 26-Oct-1994  cgd new RCS ID format.
 1.15 04-Jul-1994  chopps move to new disk minor encoding (parts have lowest 4 bits instead of 3)
 1.14 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 16-May-1994  chopps add macro and fix typo.
 1.12 09-May-1994  chopps update for recent sig changes and fix clock.c
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 22-Apr-1994  chopps fix typo.
 1.9 22-Apr-1994  chopps changes to allow fd as boot device.
 1.8 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.7 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.6 11-Feb-1994  chopps Add missing $Id$'s
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.26.2.1 30-Jan-1997  thorpej update from trunk
 1.4 16-Apr-1994  mycroft Clean up deleted files.
 1.3 15-Apr-1994  cgd convert vm system to use new queues. I'll never write code w/queues again.
 1.2 11-Feb-1994  chopps Add missing $Id$'s
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.34 03-Nov-2002  chs use a merged sys_machdep.c for all the motorola-MMU m68k platforms.
 1.33 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.32 27-Jan-2002  is make this really compile.
 1.31 27-Jan-2002  is Make this compile for specialized kernels.
 1.30 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.29 13-Dec-2000  jdolecek branches: 1.29.4; 1.29.8;
g/c obsolete vtrace(2) stuff
 1.28 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.27 28-Nov-1999  is Fix typo (&& -> &).
 1.26 25-Nov-1999  is From the 68040 User Manual, page 4-10:

"To fully support self-modifying code in any situation, it is imperative that
a CPUSHA intrcution is executed before the execution of the first self-modified
instruction. The CPUSHA instruction has the effect of ensuring that there is
no stale data iin memory, the pipeline is flushed, and instruction prefetches
are repeated and taken from external memory."

I verified that this is the only way (I can think of) to make the sigtramp
regression test work on 68040. doing cpushl dc; cinvl ic; over the affected
address range, then nop (to synchronize the pipeline) is not enough; apparently
the nop does not FLUSH the pipeline and prefetch...

Note that the 68060 UM has copied the above cited passage, but in fact this is
not true. This might be connected to the fact that the 68060 does ensure
memory access order under most conditions.
 1.25 06-Sep-1999  is branches: 1.25.2; 1.25.8;
Switch to cacheops. This closes PR 1960.
 1.24 08-Jul-1999  thorpej Fix a type problem.
 1.23 08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.22 26-Feb-1999  is branches: 1.22.2; 1.22.4;
synchronize types, and s/curproc/p/ in one forgotten place
 1.21 25-Feb-1999  is prepare for gdb fix
 1.20 19-Jan-1999  thorpej No need for <sys/mtio.h>
 1.19 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.18 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.17 25-Feb-1998  perry note second parm of sysarch() is now void *, + trivial KNF, etc.
 1.16 19-May-1997  veego Fix lossage from the latest vm_pmap changes.
 1.15 25-May-1996  is Fix few more places where 040+060 rlevant stuff was only compiled for 68040,
preventing 68060-only kernels to work. (68060 only kernel is tested now by
using it to commit this patch).
 1.14 21-Apr-1996  veego branches: 1.14.4;
Cleanup for -Wall and -Wstrict-prototypes
 1.13 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.12 09-Oct-1995  chopps branches: 1.12.2;
vtrace -> sys_vtrace
 1.11 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.10 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 20-Oct-1994  cgd update for new syscall args description mechanism
 1.7 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.6 02-Jun-1994  chopps more cache goodies from hp300
 1.5 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.12.2.1 10-Nov-1995  chopps bring up-to-date with name changes (#1728) from Bernd Ernesti <bernd@arresum.inka.de>
 1.14.4.1 26-May-1996  is Pullup from trunk: Retina blanking bug, misc. cleanup including #ifdef'ing
out of annoying (to the normal user) debug code.
 1.22.4.1 02-Aug-1999  thorpej Update from trunk.
 1.22.2.2 29-Nov-1999  he Pull up revision 1.27 (requested by is):
Fix a typo which caused excessive cache flushes.
 1.22.2.1 27-Nov-1999  he Pull up revision 1.26 (requested by is):
Fix i-cache/d-cache synchronization for M68040 cpus (see M68040
UM p.4-10). Makes regress/sys/kern/sigtramp work even on M68040.
 1.25.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.25.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.25.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.29.8.5 11-Nov-2002  nathanw Catch up to -current
 1.29.8.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.29.8.3 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.29.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.29.8.1 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.29.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.143 04-May-2024  mlelstv Don't panic on NULL pointer dereference when done by copyin, ...
 1.142 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.141 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.140 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.139 10-Aug-2020  rin branches: 1.139.20;
Fix siginfo support for amiga, mac68k, and sun3:

- T_ZERODIV is integer divide by zero. Therefore, ksi_code should be
FPE_INTDIV, not FPE_FLTDIV.

- Set ksi_addr for SIGTRAP. Also, set TRAP_BRKPT or TRAP_TRACE to
ksi_code appropriately.

This fixes some tests in lib/libc/sys and lib/libc/gen.

XXX
Apply similar fixes to other m68k ports.
 1.138 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.137 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.136 02-Jul-2017  christos branches: 1.136.6;
remove the single use of f_pad...
 1.135 04-Mar-2015  mlelstv Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF.
From martin@
 1.134 19-Feb-2012  rmind branches: 1.134.2; 1.134.16;
Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.133 08-Feb-2011  rmind branches: 1.133.4; 1.133.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.132 14-Jan-2011  rmind branches: 1.132.2; 1.132.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.131 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.130 07-Jul-2010  chs implement ucas_* for m68k.
 1.129 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.128 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.127 23-Nov-2009  rmind branches: 1.127.2; 1.127.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.126 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.125 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.124 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.123 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.122 27-Jan-2009  martin branches: 1.122.2;
Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.121 16-Dec-2008  christos replace bitmask_snprintf(9) with snprintb(3)
 1.120 15-Oct-2008  wrstuden branches: 1.120.2; 1.120.4;
Merge wrstuden-revivesa into HEAD.
 1.119 24-Apr-2008  ad branches: 1.119.2; 1.119.4; 1.119.8;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.118 05-Nov-2007  ad branches: 1.118.16; 1.118.18;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.117 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.116 01-Sep-2007  mhitch branches: 1.116.4;
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.

A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.

When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.

68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.

Fixes PR#36848.
 1.115 12-Jun-2007  mhitch branches: 1.115.4; 1.115.8; 1.115.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.114 21-May-2007  tsutsui curlwp can't be NULL so no need to check it.
 1.113 18-May-2007  mhitch Amiga changes for idlelwp.
 1.112 04-Mar-2007  christos branches: 1.112.2; 1.112.4; 1.112.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.111 09-Feb-2007  ad branches: 1.111.2;
Merge newlock2 to head.
 1.110 23-Jul-2006  ad branches: 1.110.4; 1.110.8; 1.110.10;
Use the LWP cached credentials where sane.
 1.109 19-Jul-2006  ad - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.108 15-May-2006  yamt include kauth.h for kauth_cred_geteuid.
 1.107 14-May-2006  elad integrate kauth.
 1.106 15-Mar-2006  drochner branches: 1.106.2;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.105 24-Dec-2005  perry branches: 1.105.4; 1.105.6; 1.105.8; 1.105.10;
bare asm -> __asm
 1.104 11-Dec-2005  christos merge ktrace-lwp.
 1.103 13-Jun-2005  jandberg branches: 1.103.2;
Constify pointers to string constants.
 1.102 28-Aug-2004  jdolecek use uvm_grow() to update stack segment size on stack page fault instead
of MD code
 1.101 16-May-2004  wiz "panicking" needs a k.
 1.100 14-Mar-2004  cl add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
 1.99 08-Nov-2003  tsutsui Remove obsolete comments about curproc.
 1.98 31-Oct-2003  cl Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
 1.97 21-Oct-2003  fvdl NULL -> 0 for preempt() argument.
 1.96 08-Oct-2003  thorpej * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
result of a trap. Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap. Expands to 0 if the ksiginfo_t was
not the result of a trap. This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.95 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.94 17-Sep-2003  cl add MD part of SA/pthread pagefault handling on all m68k ports
 1.93 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.92 23-Jun-2003  martin branches: 1.92.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.91 12-May-2003  jandberg Readd the call to preempt().
It was put to its current place in 1.85.8.2 and accidentally
removed in 1.85.8.3.
 1.90 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.89 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.88 14-Feb-2002  chs branches: 1.88.12;
allow writing to write-only mappings. fixes PR 3493.
 1.87 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.86 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.85 02-Jun-2001  chs branches: 1.85.2; 1.85.8;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.84 18-Mar-2001  chs missed some KERN_FAILUREs.
 1.83 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.82 14-Feb-2001  is branches: 1.82.2;
Missing: register prefixes, _FOO_LABEL(n) macros, etc, in preparation for
ELFing the port. Patch provided by scw.
 1.81 23-Dec-2000  jdolecek split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

XXX I wish m68k ports would share trap.c
 1.80 19-Dec-2000  scw Unification of the m68k syscall() function.
 1.79 21-Nov-2000  jdolecek restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
provide single struct emul per emulation
* elf:
- kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
per emulation and contains pointer to respective probe function
- interp is allocated via MALLOC() rather than on stack
- elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
part of appropriate execsw[] entry
* constify couple of structures
 1.78 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.77 27-Jun-2000  mrg remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h>
 1.76 06-Jun-2000  soren defopt SYSCALL_DEBUG.
 1.75 27-May-2000  sommerfeld branches: 1.75.2;
Reduce use of curproc in several places:

- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

- Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

- Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

- ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

- move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

- simplify interface to ktrwrite()
 1.74 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.73 24-May-2000  thorpej Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
 1.72 05-Dec-1999  ragge clrnd()/clbase() discarding.
 1.71 25-Sep-1999  is branches: 1.71.2; 1.71.8;
vm_offset_t -> vaddr_t/paddr_t
 1.70 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.69 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.68 18-Mar-1999  chs if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it. this will be used to recover from
out-of-swap conditions.
 1.67 15-Dec-1998  itohy Added COMPAT_LINUX support.
 1.66 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.65 01-Oct-1998  thorpej Adapt to signal changes.
 1.64 10-Jul-1998  mhitch Add UVM support to amiga
 1.63 04-Jul-1998  jonathan defopt DDB.
 1.62 25-Jun-1998  thorpej defopt COMPAT_SUNOS
 1.61 25-Jun-1998  thorpej defopt KTRACE
 1.60 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.59 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.58 12-May-1998  is pcb_ustp went away long ago.
 1.57 13-Feb-1998  scottr Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
 1.56 16-Jul-1997  is branches: 1.56.4;
Amiga glue code for the m68k fpu emulation subsystem.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
 1.55 08-Jul-1997  kleink From sun3:
Correct handling for Trap #2 in SunOS executables,
now that we know it is supposed to flush the cache.
(Was thought to be "some obscure FPU operation".)
 1.54 09-Apr-1997  thorpej regdump() takes a struct trapframe *
 1.53 16-Jan-1997  gwr Use db_regs_t instead of struct mc68020_saved_state
 1.52 13-Nov-1996  thorpej branches: 1.52.2;
Use bitmask_snprintf().
 1.51 13-Oct-1996  christos backout previous kprintf change
 1.50 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.49 08-Sep-1996  is s/reutrn/return/, although in normally inactive code.
 1.48 07-Sep-1996  mycroft Use SIGBUS iff we get a legitimate bus fault. Use SIGSEGV for page protection
violations (per Solaris, SVR4, AIX, Linux, Irix, and SunOS).
 1.47 10-May-1996  is Clean up the mess I left over from my yestereve's commit: partially unused
variables left over from color background debugging, partially wrong #ifdefs
making some variables unused in non-M68060 kernels.
 1.46 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.45 28-Apr-1996  mhitch More cleanup for -Wall warnings.
 1.44 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.43 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.42 09-Oct-1995  chopps branches: 1.42.2;
vtrace -> sys_vtrace
 1.41 09-Oct-1995  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.40 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.39 30-Sep-1995  chopps fix typo
 1.38 30-Sep-1995  chopps add conditionals around page zero debug stuff
 1.37 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.36 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.35 13-May-1995  chopps make recent cpu_fork() changes more similar with hp300.
 1.34 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.33 23-Apr-1995  chopps bring up-to-date with recent conf.c and sunos changes.
 1.32 22-Apr-1995  christos Fixed comparison in SYS__syscall to be against sysent instead of
p->p_emul->e_sysent [Thanks Charles for pointing this out].
I think that this code needs to be fixed anyway for emulations where
SYS_syscall is not the same number as the NetBSD one (0)... (Only the
alpha port so far?)
 1.31 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.30 26-Mar-1995  cgd invoke ktrsyscall with (vp, code, argsize, args) as args.
 1.29 09-Mar-1995  mycroft Fix last arg to scdebug_ret().
 1.28 08-Mar-1995  mycroft Panic if the emulation type is invalid.
 1.27 08-Mar-1995  mycroft Fix some types:
* code, args, and rval should use register_t.
* argsize should be a size_t.
Some general cleanup, and undo many of the differences between this syscall()
and the hp300 version.
 1.26 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.25 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.24 26-Oct-1994  cgd new RCS ID format.
 1.23 20-Oct-1994  cgd update for new syscall args description mechanism
 1.22 23-Jun-1994  chopps fix to writeback code from Michael Hitch, and some cleanup in cc.c from me
 1.21 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.20 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.19 21-May-1994  chopps sys/vmmeter.h, sys/user.h and vm/vm.h shuffle.
 1.18 18-May-1994  chopps mirror recent i386 changes to conf and regarding profiling in trap
and swtch nameing changes.
 1.17 13-May-1994  chopps setrq -> setrunqueue
 1.16 09-May-1994  chopps update for recent sig changes and fix clock.c
 1.15 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.14 04-May-1994  chopps update to match current proc flags.
 1.13 05-Apr-1994  chopps incorpaorated floppy code from Brad Pepers, needs work doesn't work on my
machine. more clenaup in trap.c
 1.12 04-Apr-1994  chopps theo fixed sun_syscall.h so now we unhardcode SUN_SYS_sigreturn.
 1.11 04-Apr-1994  chopps cleanup, bring syscall() up to date.
 1.10 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.9 11-Feb-1994  chopps Add missing $Id$'s
 1.8 03-Feb-1994  chopps softclock() and hardclock() calls now pass pointer to clockframe_t
 1.7 30-Jan-1994  chopps Removed chipmem limit for all but GODZILLA, added CEND() copper list macro,
added views back in conf and fixed misc compile warns and errors.
 1.6 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.5 31-Oct-1993  mw Back out of a stack-adjust (in COMPAT_SUNOS mode) after syscalls that
returned ERESTART.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.42.2.1 10-Nov-1995  chopps remove reporting of < 0 access for most people
 1.52.2.2 30-Jan-1997  thorpej update from trunk
 1.52.2.1 18-Jan-1997  thorpej Update from trunk.
 1.56.4.1 08-Sep-1997  thorpej Significantly restructure the way signal state for a process is stored.
Rather than using bitmasks to redundantly store the information kept
in the process's sigacts (because the sigacts was kept in the u-area),
hang sigacts directly off the process, and access it directly.

Simplify signal setup code tremendously by storing information in
the sigacts as an array of struct sigactions, rather than in a different
format, since userspace uses sigactions.

Make sigacts sharable by adding reference counting.
 1.71.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.71.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.71.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.71.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.71.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.71.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.75.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.82.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.82.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.85.8.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.85.8.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.85.8.5 28-Feb-2002  nathanw Catch up to -current.
 1.85.8.4 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.85.8.3 25-Nov-2001  scw Deal with `want_resched' with trap()'s T_ASTFLT case where it belongs
instead of in userret().
 1.85.8.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.85.8.1 02-Jun-2001  scw file trap.c was added on branch nathanw_sa on 2001-11-17 21:59:08 +0000
 1.85.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.85.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.88.12.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.92.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.92.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.92.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.92.2.2 03-Sep-2004  skrll Sync with HEAD
 1.92.2.1 03-Aug-2004  skrll Sync with HEAD
 1.103.2.5 15-Nov-2007  yamt sync with head.
 1.103.2.4 03-Sep-2007  yamt sync with head.
 1.103.2.3 26-Feb-2007  yamt sync with head.
 1.103.2.2 30-Dec-2006  yamt sync with head.
 1.103.2.1 21-Jun-2006  yamt sync with head.
 1.105.10.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.105.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.105.8.3 11-Aug-2006  yamt sync with head
 1.105.8.2 24-May-2006  yamt sync with head.
 1.105.8.1 01-Apr-2006  yamt sync with head.
 1.105.6.2 01-Jun-2006  kardel Sync with head.
 1.105.6.1 22-Apr-2006  simonb Sync with head.
 1.105.4.1 09-Sep-2006  rpaulo sync with head
 1.106.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.110.10.2 23-Sep-2007  wrstuden Sync with somewhat-recent netbsd-4.
 1.110.10.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.110.8.2 11-Sep-2007  msaitoh Pull up following revision(s) (requested by mhitch in ticket #866):
sys/arch/atari/atari/trap.c: 1.92
sys/arch/mac68k/mac68k/trap.c: 1.129
sys/arch/amiga/amiga/trap.c: 1.116
sys/arch/mvme68k/mvme68k/trap.c: 1.91
sys/arch/news68k/news68k/trap.c: 1.54
sys/arch/sun3/sun3/trap.c: 1.131
sys/arch/next68k/next68k/trap.c: 1.68
sys/arch/luna68k/luna68k/trap.c: 1.47
sys/arch/cesfic/cesfic/trap.c: 1.36
sys/arch/x68k/x68k/trap.c: 1.90
sys/arch/hp300/hp300/trap.c: 1.132
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.
A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.
When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.
68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.
Fixes PR#36848.
 1.110.8.1 26-Jul-2007  pavel Pull up following revision(s) (requested by mhitch in ticket #729):
sys/arch/atari/atari/trap.c: revision 1.91
sys/arch/amiga/amiga/trap.c: revision 1.115
sys/arch/hp300/hp300/trap.c: revision 1.131
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.110.4.2 06-Feb-2007  ad Make amiga & mac68k compile.
 1.110.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.111.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.112.10.3 03-Oct-2007  garbled Sync with HEAD
 1.112.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.112.10.1 22-May-2007  matt Update to HEAD.
 1.112.4.1 11-Jul-2007  mjf Sync with head.
 1.112.2.4 03-Dec-2007  ad Sync with HEAD.
 1.112.2.3 09-Oct-2007  ad Sync with head.
 1.112.2.2 15-Jul-2007  ad Sync with head.
 1.112.2.1 27-May-2007  ad Sync with head.
 1.115.10.1 06-Nov-2007  matt sync with HEAD
 1.115.8.2 06-Nov-2007  joerg Sync with HEAD.
 1.115.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.115.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.116.4.1 13-Nov-2007  bouyer Sync with HEAD
 1.118.18.1 18-May-2008  yamt sync with head.
 1.118.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.118.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.119.8.1 19-Oct-2008  haad Sync with HEAD.
 1.119.4.4 30-Jun-2008  wrstuden Change how we make SA threads not generate upcalls. Instead of clearing
LW_SA, use a private flag, LP_SA_NOBLOCK, that we set when we want
to not generate upcalls. This means we do NOT need to lock (l)
(ourselves) to set it.

Adjust tests that look at LW_SA. Now, we are an upcall-generating
lwp if ((l->l_flag & LW_SA) && (~l->l_pflag & LP_SA_NOBLOCK)).

Introduce code pattern to set & remember this:

f = ~l->l_pflag & LP_SA_NOBLOCK;
l->l_pflag |= LP_SA_NOBLOCK;

...

/* f is now LP_SA_NOBLOCK if it wasn't set in l_pflag before */

l->l_pflag ^= f;

I updated a lot of the trap handlers to do trap handling iff LP_SA_NOBLOCK
is not set. I tried to figure out if the trap handler could be triggered
for user-based faults as opposed to kernel faults to user addresses, and
only look at LP_SA_NOBLOCK for the latter.

Above is a result of discussions with rmind at to reduce lock twiddling.

Also, per same discussions, add locking to sys_sa_preempt(). p_lock is
the lock we want.

Also, per same discussions, remove use of LSSUSPENDED as a thread state.
We needed to use it when we were emulating the 4.X and previous behavior
of hiding cached threads. For the moment, we now have them instead
remain visible to all and have them sleeping on the "lwpcache" wait
channel.

sa_newcachelwp(): sa_putcachelwp() wants savp_mutex held, not p_lock.

Tweak some comments.
 1.119.4.3 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.119.4.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.119.4.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.119.2.4 11-Aug-2010  yamt sync with head.
 1.119.2.3 11-Mar-2010  yamt sync with head
 1.119.2.2 20-Jun-2009  yamt sync with head
 1.119.2.1 04-May-2009  yamt sync with head.
 1.120.4.1 02-Feb-2009  snj Pull up following revision(s) (requested by martin in ticket #332):
sys/arch/amiga/amiga/trap.c: revision 1.122
sys/arch/atari/atari/trap.c: revision 1.99
sys/arch/cesfic/cesfic/trap.c: revision 1.43
sys/arch/hp300/hp300/trap.c: revision 1.140
sys/arch/luna68k/luna68k/trap.c: revision 1.55
sys/arch/m68k/include/signal.h: revision 1.25
sys/arch/m68k/m68k/sig_machdep.c: revision 1.41
sys/arch/mac68k/mac68k/trap.c: revision 1.136 via patch
sys/arch/mvme68k/mvme68k/trap.c: revision 1.98
sys/arch/news68k/news68k/trap.c: revision 1.60
sys/arch/next68k/next68k/trap.c: revision 1.75
sys/arch/sun2/sun2/trap.c: revision 1.37
sys/arch/sun3/sun3/trap.c: revision 1.136
sys/arch/x68k/x68k/trap.c: revision 1.97
Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.120.2.3 28-Apr-2009  skrll Sync with HEAD.
 1.120.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.120.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.122.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.127.4.3 05-Mar-2011  rmind sync with head
 1.127.4.2 03-Jul-2010  rmind sync with head
 1.127.4.1 30-May-2010  rmind sync with head
 1.127.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.127.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.132.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.132.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.133.8.1 24-Feb-2012  mrg sync to -current.
 1.133.4.1 17-Apr-2012  yamt sync with head
 1.134.16.2 28-Aug-2017  skrll Sync with HEAD
 1.134.16.1 06-Apr-2015  skrll Sync with HEAD
 1.134.2.1 03-Dec-2017  jdolecek update from HEAD
 1.136.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.136.6.1 10-Jun-2019  christos Sync with HEAD
 1.139.20.1 12-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #845):

sys/arch/amiga/amiga/trap.c: revision 1.143

Don't panic on NULL pointer dereference when done by copyin, ...
 1.18 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.17 11-Dec-2005  christos branches: 1.17.100; 1.17.106; 1.17.108;
merge ktrace-lwp.
 1.16 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.14 14-Feb-2001  is branches: 1.14.24;
Missing: register prefixes, _FOO_LABEL(n) macros, etc, in preparation for
ELFing the port. Patch provided by scw.
 1.13 18-Oct-1998  itohy branches: 1.13.12;
Remove unwanted reference to "_trap1" if !defined(COMPAT_13).
 1.12 04-Oct-1998  thorpej Sigh, we are going to have to burn a vector for Just Sigreturn again,
for now, until we have a more generic {get,set}context(). Update the
comment for trap #3 accordingly.
 1.11 30-Sep-1998  thorpej If !COMPAT_13, make trap #1 produce an illegal instruction. Fix the comment
for trap #2 to reflect that it's the trace trap.
 1.10 30-Sep-1998  thorpej Note that trap #1 is compat_13_sigreturn, and give trap #3 to syscalls
which require special handling, e.g. sigreturn on m68k.

This differs from the old sigreturn trap in that we require the syscall
number to be in register d0, just like the regular syscall entry point.
This will allow sigreturn to be versioned in the future without the need
to allocate another trap vector.
 1.9 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 06-Jul-1994  chopps remove stranded .globl's
 1.6 06-Jul-1994  chopps similar changes as the hp300 for FPSP.
 1.5 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.4 11-Feb-1994  chopps Add missing $Id$'s
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.13.12.1 12-Mar-2001  bouyer Sync with HEAD.
 1.14.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.24.1 03-Aug-2004  skrll Sync with HEAD
 1.17.108.1 17-Feb-2011  bouyer Sync with HEAD
 1.17.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.100.1 05-Mar-2011  rmind sync with head
 1.65 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.64 04-Mar-2002  simonb Don't need to declare phys_map - it is declared in <uvm/uvm_extern.h>.
 1.63 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.62 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.61 10-Sep-2001  chris branches: 1.61.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.60 19-Aug-2001  chs branches: 1.60.2;
add missing pmap_update().
 1.59 04-Aug-2001  chs use pmap_k* in pagemove() (ie. for buffer cache pages)
and in vmapbuf() and vunmapbuf() (since there's no VAC on this platform).
 1.58 02-Jun-2001  chs branches: 1.58.2;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.57 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.56 29-Jun-2000  mrg branches: 1.56.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.55 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.54 28-May-2000  thorpej Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1(). In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
 1.53 20-Jan-2000  sommerfeld branches: 1.53.2;
Fix PR9240: comment above cpu_fork() out of synch with reality on most ports.
(comment change only, but was wrong for more than just i386).
 1.52 04-Dec-1999  ragge CL* discarding.
 1.51 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.50 25-Sep-1999  is branches: 1.50.2; 1.50.4; 1.50.8;
vm_offset_t -> vaddr_t/paddr_t
 1.49 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.48 03-Aug-1999  is In classic Amigae, physical address zero is perfectly reasonable (it is the
base of the Chipmem). With the new pmap_extract, we distinguish this from
an invalid kernel mapping. Don't confuse the reader with the old panic
message.
 1.47 08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.46 26-May-1999  thorpej Generally update the comment above vunmapbuf().
 1.45 26-May-1999  thorpej Generally update the comment above the vmapbuf() implementations.
 1.44 14-May-1999  nisimura - Adjust descriptive comment of cpu_fork() which returns nothing and
returns once.
- Minor fixes in mips/vm_machdep.c.
 1.43 13-May-1999  thorpej Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior). Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
 1.42 26-Mar-1999  mycroft branches: 1.42.4;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.41 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.40 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.39 09-Sep-1998  thorpej In cpu_coredump(), use MID_MACHINE rather than MID_* (whatever it expands
to).
 1.38 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.37 28-Jul-1998  thorpej Don't cast the null residual pointer passed to vn_rdwr().
 1.36 10-Jul-1998  mhitch Add UVM support to amiga
 1.35 17-Apr-1998  veego Add missing int after an register.
 1.34 22-Jan-1998  is If on the M68060, make cache-inhibited pages imprecise. Reads and writes
are still in-order, but cached reads dont wait for the last write to finish.
Xamiga on a Altais in 8bit-mode became 30% faster servicing xanim (well, 6%
if you count xanim, too).
 1.33 06-Jan-1998  thorpej Garbage-collect PMAP_ACTIVATE() call here; it's no longer necessary.
 1.32 11-Oct-1997  scottr Address PR 4120 by synchronizing v{,un}mapbuf() with the i386 vm_machdep.c,
v 1.27, pulling in changes made there by Charles Hannum. Also, incorporate
a few tweaks made by Gordon W. Ross in the sun3 version of this change.
 1.31 18-Sep-1997  mhitch Use the buffer length passed as a parameter to vmapbuf() and vunmapbuf()
instead of bp->b_bcount. The I/O operation may have changed bp->b_bcount,
and not all of the kernel virtual memory will be freed. This will result
in the VM system putting pages back on the free list which are still
mapped. This may cause a deadlock later trying to enter pages into
the kernel pmap. [See PR#4120 for more details.]
 1.30 19-May-1997  veego branches: 1.30.4;
Fix lossage from the latest vm_pmap changes.
 1.29 25-Apr-1996  veego another prototyp cleanup
 1.28 23-Apr-1996  veego The prototyp of cpu_coredump is now in sys/signalvar.h
Added an ifdef DEBUG for struct phys_segs
 1.27 21-Apr-1996  veego Cleanup for -Wall and -Wstrict-prototypes
 1.26 05-Feb-1996  christos vm prototype changes
 1.25 09-Dec-1995  mycroft cpu_fork() now returns void.
 1.24 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.23 26-Jun-1995  chopps setup pcb in cpu_fork.
 1.22 16-May-1995  chopps PS_STRINGS in A2. Add fputype, remove cpuspeed. switch to new coredump
 1.21 13-May-1995  chopps make recent cpu_fork() changes more similar with hp300.
 1.20 12-May-1995  chopps use stdframe from m68k/include/frame.h
 1.19 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.18 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.17 26-Oct-1994  cgd new RCS ID format.
 1.16 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.15 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.14 29-May-1994  chopps no more V_SWTCH, moved from cpu_switch to cpu_exit.
pointed out by osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.13 25-May-1994  chopps get up-to-date with recent vm changes and also with change of
m68k frame.
 1.12 21-May-1994  chopps sys/vmmeter.h, sys/user.h and vm/vm.h shuffle.
 1.11 19-May-1994  chopps need to include vnode.h
 1.10 19-May-1994  chopps add cpu_coredump from i386/vm_machdep.c
 1.9 18-May-1994  chopps mirror recent i386 changes to conf and regarding profiling in trap
and swtch nameing changes.
 1.8 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.7 05-Apr-1994  chopps need to copy current frame pointer (p_regs), very subtle bug as you needed
to have a signal pending for a child process that has not yet returned
from fork(). fun.
 1.6 13-Feb-1994  chopps merged most cc_* (all but one) into cc.c and cc.h, cleaned up include.
removed local pte.h use machine/pte.h
 1.5 11-Feb-1994  chopps Add missing $Id$'s
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
New collection of code to handle customchips.
in_chksum.c and oc_chksum.s migrated into arch/m68k.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.30.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.30.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.42.4.2 02-Aug-1999  thorpej Update from trunk.
 1.42.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.50.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.50.4.1 14-Nov-1999  fvdl Sync with -current.
 1.50.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.53.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.56.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.58.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.58.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.58.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.58.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.60.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.61.4.8 11-Nov-2002  nathanw Catch up to -current
 1.61.4.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.61.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.61.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.61.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.61.4.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.61.4.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.61.4.1 10-Sep-2001  scw file vm_machdep.c was added on branch nathanw_sa on 2001-11-17 21:59:08 +0000
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 27-Oct-2012  chs branches: 1.3.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 28-Jun-2012  rkujawa branches: 1.2.2;
Obtain sc using device_private(), cosmetic changes.
 1.1 17-Apr-2012  rkujawa branches: 1.1.2;
Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.1.2.3 30-Oct-2012  yamt sync with head
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 17-Apr-2012  yamt file a1k2cp.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.7 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.6 24-Apr-2021  thorpej branches: 1.6.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.5 30-Oct-2012  rkujawa branches: 1.5.52;
Add sc_dev removed previously in a moment of insanity. How did this ever work
is beyond me.
 1.4 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 28-Jun-2012  rkujawa branches: 1.3.2;
Obtain sc using device_private(), cosmetic changes.
 1.2 18-May-2012  rkujawa branches: 1.2.2;
Cosmetic change - print newline during autoconf.
 1.1 17-Apr-2012  rkujawa Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.2.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.3 30-Oct-2012  yamt sync with head
 1.2.2.2 23-May-2012  yamt sync with head.
 1.2.2.1 18-May-2012  yamt file clockport.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.3.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.5.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.5.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.5.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.5.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.6.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 17-Apr-2012  rkujawa branches: 1.1.2;
Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 17-Apr-2012  yamt file clockport_common.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.5 30-Oct-2012  rkujawa Add sc_dev removed previously in a moment of insanity. How did this ever work
is beyond me.
 1.4 09-Jul-2012  rkujawa branches: 1.4.2;
Remove unused sc_dev. Thanks to cegger@.
 1.3 28-Jun-2012  rkujawa Obtain sc using device_private(), cosmetic changes.
 1.2 15-May-2012  rkujawa branches: 1.2.2;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1 17-Apr-2012  rkujawa Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.2.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.2 23-May-2012  yamt sync with head.
 1.2.2.1 15-May-2012  yamt file clockportvar.h was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.4.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.1 17-Apr-2012  rkujawa branches: 1.1.2; 1.1.40; 1.1.42;
Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.1.42.1 10-Jun-2019  christos Sync with HEAD
 1.1.40.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 17-Apr-2012  yamt file com_ss.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.6 28-Apr-2021  rin clockport_common does not need its own interface attribute.
All children are attached to clockportbus.
 1.5 22-Dec-2013  rkujawa branches: 1.5.46;
Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.4 08-Nov-2012  rkujawa branches: 1.4.2;
Add driver for Delfina 1200 / Delfina Flipper. Useless now (doesn't support
audio or DSP), but is able to disable interrupts which is important if booting
NetBSD from AmigaOS to avoid unhandled interrupts.
 1.3 27-Oct-2012  phx Fixed dependencies for some new PCI and clockport devices, to make a
kernel compile without them.
 1.2 15-May-2012  rkujawa branches: 1.2.2; 1.2.4;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1 17-Apr-2012  rkujawa Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.2.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.3 30-Oct-2012  yamt sync with head
 1.2.2.2 23-May-2012  yamt sync with head.
 1.2.2.1 15-May-2012  yamt file files.clockport was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.4.2.1 18-May-2014  rmind sync with head
 1.5.46.1 13-May-2021  thorpej Sync with HEAD.
 1.1 08-Nov-2012  rkujawa branches: 1.1.2; 1.1.4;
Add driver for Delfina 1200 / Delfina Flipper. Useless now (doesn't support
audio or DSP), but is able to disable interrupts which is important if booting
NetBSD from AmigaOS to avoid unhandled interrupts.
 1.1.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.4.1 08-Nov-2012  yamt file flipper.c was added on branch yamt-pagecache on 2013-01-16 05:32:40 +0000
 1.1.2.2 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.1 08-Nov-2012  tls file flipper.c was added on branch tls-maxphys on 2012-11-20 03:00:56 +0000
 1.1 08-Nov-2012  rkujawa branches: 1.1.2; 1.1.4;
Add driver for Delfina 1200 / Delfina Flipper. Useless now (doesn't support
audio or DSP), but is able to disable interrupts which is important if booting
NetBSD from AmigaOS to avoid unhandled interrupts.
 1.1.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.4.1 08-Nov-2012  yamt file flipperreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:40 +0000
 1.1.2.2 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.1 08-Nov-2012  tls file flipperreg.h was added on branch tls-maxphys on 2012-11-20 03:00:56 +0000
 1.1 08-Nov-2012  rkujawa branches: 1.1.2; 1.1.4;
Add driver for Delfina 1200 / Delfina Flipper. Useless now (doesn't support
audio or DSP), but is able to disable interrupts which is important if booting
NetBSD from AmigaOS to avoid unhandled interrupts.
 1.1.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.4.1 08-Nov-2012  yamt file flippervar.h was added on branch yamt-pagecache on 2013-01-16 05:32:40 +0000
 1.1.2.2 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.1 08-Nov-2012  tls file flippervar.h was added on branch tls-maxphys on 2012-11-20 03:00:56 +0000
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.1 15-May-2012  rkujawa branches: 1.1.2; 1.1.56;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1.56.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 15-May-2012  yamt file gencp.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.2.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 22-Dec-2013  rkujawa branches: 1.1.4; 1.1.6; 1.1.10;
Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Dec-2013  tls file gencp_acafh.c was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Dec-2013  yamt file gencp_acafh.c was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Dec-2013  rmind file gencp_acafh.c was added on branch rmind-smpnet on 2014-05-18 17:44:54 +0000
 1.2 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 15-May-2012  rkujawa branches: 1.1.2; 1.1.4;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1.4.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.3 30-Oct-2012  yamt sync with head
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 15-May-2012  yamt file gencp_xsurf.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.3 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
 1.2 26-Oct-1994  cgd branches: 1.2.50;
new RCS ID format.
 1.1 05-Jul-1993  cgd get rid of specific compile dir, but make sure top level dir is kept...
 1.2.50.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1 06-Jan-2003  lukem branches: 1.1.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
 1.1.2.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 06-Jan-2003  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 20:56:18 +0000
 1.8 21-Oct-1996  veego This config files are no longer needed.
Copy the GENERIC config file and use that.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-Jun-1994  chopps some minor changes
 1.5 21-Jun-1994  chopps add ethernet driver to GENERIC and remove now uneeded ETHER options
 1.4 15-Jun-1994  chopps include more device .h files, update Makefile.amiga to use new
vnode_if.x gerating procedure
 1.3 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.2 26-May-1994  chopps update from steve.
 1.1 18-Apr-1994  chopps add A3000 (we use it in snapshot) and commented GENERIC. (pretty heafty)
 1.111 13-Dec-2016  christos wildcard speaker attachments, now that we can handle many of them.
 1.110 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.109 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.108 17-Oct-2007  garbled branches: 1.108.64; 1.108.84; 1.108.88;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.107 07-Sep-2007  lukem Change AMIGA to just include GENERIC and disable the DraCo stuff.
 1.106 20-Aug-2007  is branches: 1.106.2;
Regenerate after addition of wdc_buddha.
 1.105 19-Aug-2007  is regenerate after removal of OSI networking
 1.104 16-Jul-2007  he branches: 1.104.4; 1.104.8;
Regenerated files after adding COMPAT_40.
 1.103 06-Jun-2007  martin regen
 1.102 12-Nov-2006  jmmv branches: 1.102.2; 1.102.8; 1.102.10; 1.102.16; 1.102.18;
Regen. Per bernd@'s instructions.
 1.101 11-Nov-2006  jmmv Remove tmpfs's experimental status. OK'ed by core@.
 1.100 26-Aug-2006  christos branches: 1.100.2; 1.100.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.99 26-Aug-2006  tsutsui Regen from GENERIC.in:
1.54:
> Disable SYSTRACE by default on all kernels (discussed with core)
1.55:
> Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.98 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.97 30-Jun-2006  tsutsui branches: 1.97.2;
Regen from GENERIC.in rev 1.53:
> Add CARP to further platforms
 1.96 28-Mar-2006  pavel branches: 1.96.4;
regen (added stf).
 1.95 05-Feb-2006  cube branches: 1.95.2; 1.95.4; 1.95.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.94 04-Feb-2006  rpaulo regen
 1.93 03-Feb-2006  reinoud branches: 1.93.2;
Regen GENERIC config files.
 1.92 10-Dec-2005  tsutsui branches: 1.92.2; 1.92.4;
Regen from GENERIC.in rev 1.48:
> Add veriexec stuff to the common config file.
 1.91 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.47:
> Remove obsolete options VNODE_OP_NOINLINE.
 1.90 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.46:
> Adjust comments for options FFS_NO_SNAPSHOT.
 1.89 03-Nov-2005  chs regen
 1.88 07-Oct-2005  tsutsui Regen from GENERIC.in rev 1.44:
> Add (commented out) file-system TMPFS in a proper file.

XXX: It seems `INSTALL_CONFIGURATION' in GENERIC.in should be reorganaized.
 1.87 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.86 19-Aug-2005  christos 64 bit inode changes.
 1.85 31-Jul-2005  yamt regen.
 1.84 30-Jul-2005  yamt regen.
 1.83 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.82 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.81 26-Jun-2005  rpaulo branches: 1.81.2;
Correct RCS Ids.
 1.80 26-Jun-2005  rpaulo Add PTYFS (commented out) in the correct form.
 1.79 09-Jun-2005  tsutsui Regen from GENERIC.in rev 1.36:
> - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
> (still commented out)
> - Add (also commented out) options BUFQ_PRIOCSCAN.
>
> Suggested by perry and soda on tech-kern.
> Please refer options(4) for details for these options.
 1.78 01-Jun-2005  jandberg regen: wsmux added (enabled only in WSCONS)
 1.77 25-Feb-2005  simonb branches: 1.77.2;
Regen for COMPAT_20 addition.
 1.76 20-Feb-2005  jdolecek regen: add SMBFS/nsmb, per PR port-amiga/29066 by Florian Stoehr
 1.75 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.74 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.73 31-Jan-2005  hannken Regen.
 1.72 17-Jan-2005  cube branches: 1.72.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.71 13-Jan-2005  is branches: 1.71.2;
Regenerate from GENERIC.in: no more idesc - we're using wdc.
 1.70 10-Nov-2004  christos Add COMPAT_BSDPTY on all the kernels that have COMPAT options.
 1.69 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.68 28-Jun-2004  bouyer Regen, added P1003_1B_SEMAPHORE.
 1.67 26-Jun-2004  abs Regenerate from master config files
 1.66 23-Feb-2004  jandberg branches: 1.66.2;
regen after wsfont changes
 1.65 08-Oct-2003  bouyer Regen: add atabus
 1.64 22-Sep-2003  jandberg regen after wsmouse addition
 1.63 22-Sep-2003  cl regen
 1.62 27-Jul-2003  is Regenerate from GENERIC.in to include pseudo-device ksyms, where
appropriate.
 1.61 16-Apr-2003  is branches: 1.61.2;
make /dev/reload optional (it is implemented for a.out kernels only, at
the moment.)
 1.60 10-Apr-2003  christos Bye Bye UCONSOLE
 1.59 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.58 22-Nov-2002  wiz regen
 1.57 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.56 06-Oct-2002  provos regen from GENERIC.in
 1.55 18-Sep-2002  lukem regen for: enable USERCONF
 1.54 05-Jul-2002  abs Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
 1.53 18-Jun-2002  lukem Regenerate with new m4 mechanism (vs old cpp mechanism).
New files are same as old (except for whitespace differences), except
that the new GENERIC doesn't have melody, because GENERIC defines
DRACO and the latter can't have it.
 1.52 17-Jun-2002  lukem regen for clockctl
 1.51 30-May-2002  thorpej Regenerate.
 1.50 25-Apr-2002  atatat branches: 1.50.2; 1.50.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.49 19-Apr-2002  heinz regen after GENERIC v1.178
 1.48 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.47 04-Mar-2002  sommerfeld The "gif*" tunnelling interface does everything ipip does.
Move usage example from ipip.4 to gif.4
Excise ipip and stitch up the scars.
 1.46 15-Feb-2002  is Move Amiga PORT to ELF and new toolchain. Still missing:
support in UPGRADE to move old shared libs to /emul/aout
 1.45 13-Feb-2002  is move ELF32 to std.amiga
 1.44 27-Jan-2002  is *** empty log message ***
 1.43 27-Jan-2002  is add Toccata.
 1.42 27-Jan-2002  jdolecek regen: INSECURE, SCSIVERBOSE description change,
s/define/uncomment/, add raid stuff
 1.41 26-Jan-2002  aymeric remove trailing spaces and tabs
 1.40 14-Jan-2002  jandberg Regenerated AMIGA, INSTALL and DRACO from GENERIC.
 1.39 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.38 25-Aug-2001  is branches: 1.38.6;
synchronize (addition of repulse driver).
 1.37 08-Jul-2001  abs branches: 1.37.2;
(Regenerated atari and amiga)
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.36 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.35 10-Mar-2001  is - The ioblix zbus board comes in 24 MHz and 22.1184 MHz clock variants.
We default to the (newer, more sane) 22.1184 MHz value, but set it from
the iobzclock variable (in Hz), which is initialized from the IOBZCLOCK
configuration option and patchable.
XXX we should time the clock at system startup.
- add ioblix_zbus to the GENERIC configuration.
 1.34 21-Jan-2001  is branches: 1.34.2;
- Replace idesc by standard wdc attachment.
- Add A1200 pcmcia slot driver.
(Both where options already.)
 1.33 29-Dec-2000  is Update for vlan addition and Xsurf name addition.
 1.32 04-Oct-2000  is resync, mostly for the rnd addition.
 1.31 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.30 13-Aug-2000  itojun move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
 1.29 05-Jul-2000  sommerfeld regenerate
 1.28 14-Jun-2000  veego branches: 1.28.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.27 28-Mar-2000  is branches: 1.27.2;
synchronize to GENERIC
 1.26 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.25 05-Feb-2000  mhitch Regen (with commented MI wdc stuff)
 1.24 23-Jan-2000  aymeric regen.
 1.23 22-Jan-2000  is synchronize this with GENERIC.
 1.22 15-Oct-1999  is branches: 1.22.2;
regenerate
 1.21 29-Jul-1999  augustss branches: 1.21.2;
It's time to be COMPAT_14.
 1.20 28-Jul-1999  is regenerate: no gvpbus on DRACO
 1.19 18-Jun-1999  is less views, and comment them
 1.18 18-Jun-1999  is COMPAT_SVR4 does not compile witout EXEC_ELF32
 1.17 17-May-1999  is allow more than one ed, es or qn
 1.16 10-May-1999  is Add HyperCom 3+/4+ parallel port support
 1.15 01-May-1999  tron Regen from "GENERIC".
 1.14 10-Apr-1999  tron Regen from "GENERIC".
 1.13 01-Apr-1999  is branches: 1.13.2;
regenerate
 1.12 24-Mar-1999  is AGA: VGAonly timing (GRF_AGA_VGA), by Adam Ciarcinski
 1.11 09-Mar-1999  is Regenerate.
 1.10 09-Mar-1999  is Regenerated.
 1.9 15-Feb-1999  is regenerate
 1.8 15-Apr-1994  chopps add COMPAT_09
 1.7 12-Apr-1994  chopps vmunix? no, we are netbsd.
 1.6 09-Mar-1994  ws Make FFS optional
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 01-Feb-1994  chopps updated files for scsi re-org.
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.13.2.5 05-Jul-2000  he Pull up regenerated files (requested by sommerfeld):
Comment out EON ISO-over-ip tunneling pseudo-driver, and document
as broken/fragile. Unlikely to be of much use, and confuses new
users when their system crashes when they, or their dhclient
stumble over it. See PR#10500 and PR#8994 for the gory details.
 1.13.2.4 04-Feb-2000  he Pull up regenerated file (requested by is):
Add reboot code for Phase5 68040+PPC boards.
 1.13.2.3 18-Jun-1999  perry pullup 1.16->1.17 (is): Allow more than one ed,ed or qn i/f
 1.13.2.2 18-Jun-1999  perry pullup 1.15->1.16 (is): Support for HyperCom 3+/4+ lpt ports
 1.13.2.1 12-Apr-1999  tron branches: 1.13.2.1.2; 1.13.2.1.4;
Pull up AMIGA, 1.14 and DRACO, 1.33:
Regen from "GENERIC".
 1.13.2.1.4.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.13.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.13.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.21.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.22.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.22.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.22.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.22.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.27.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.28.2.3 01-May-2001  he Pull up regenerated files (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.28.2.2 25-Jan-2001  jhawk regen
 1.28.2.1 06-Jul-2000  sommerfeld Regenerate after change to GENERIC:

Comment out EON ISO-over-ip tunneling pseudo-driver, and document as
broken/fragile. Unlikely to be of much use, and confuses new users
when their system crashes when they, or their dhclient stumble over
it. See kern/10500, kern/8994 for the gory details.

[pullup approved by thorpej]
 1.34.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.34.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.37.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.37.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.37.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.37.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.37.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.37.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.37.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.38.6.9 11-Dec-2002  thorpej Sync with HEAD.
 1.38.6.8 18-Oct-2002  nathanw Catch up to -current.
 1.38.6.7 01-Aug-2002  nathanw Catch up to -current.
 1.38.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.38.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.38.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.38.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.38.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.38.6.1 25-Aug-2001  nathanw file AMIGA was added on branch nathanw_sa on 2002-01-08 00:22:57 +0000
 1.50.4.3 24-Oct-2002  lukem regen from GENERIC after ipfilter 3.4.29 upgrade
 1.50.4.2 01-Aug-2002  lukem Regenerate from GENERIC 1.179.4.2 (requested by lukem in ticket #314):
 1.50.4.1 30-May-2002  tv Pull up regen (requested by thorpej in ticket #94).
 1.50.2.2 16-Jul-2002  gehenna catch up with -current.
 1.50.2.1 09-Jul-2002  gehenna catch up with -current.
 1.61.2.11 11-Dec-2005  christos Sync with head.
 1.61.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.61.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.61.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.61.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.61.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.61.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.61.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.61.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.61.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.61.2.1 03-Aug-2004  skrll Sync with HEAD
 1.66.2.4 11-Aug-2007  bouyer Regen for ticket 11356
 1.66.2.3 15-Jul-2004  he branches: 1.66.2.3.2; 1.66.2.3.4;
Pull up regenerated files (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.66.2.2 02-Jul-2004  he Pull up regenerated files (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.66.2.1 30-Jun-2004  jdc Pull up revision 1.67 (requested by abs in ticket #567).

Regenerate from master config files
 1.66.2.3.4.1 11-Aug-2007  bouyer regen for ticket 11356
 1.66.2.3.2.1 11-Aug-2007  bouyer regen for ticket 11356
 1.71.2.1 29-Apr-2005  kent sync with -current
 1.72.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.72.2.1 12-Feb-2005  yamt sync with head.
 1.77.2.3 05-Nov-2005  tron Regen for ticket #929.
 1.77.2.2 14-Aug-2005  riz Pull up revision 1.83 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.77.2.1 18-Jul-2005  riz Pull up revision 1.82 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.81.2.4 27-Oct-2007  yamt sync with head.
 1.81.2.3 03-Sep-2007  yamt sync with head.
 1.81.2.2 30-Dec-2006  yamt sync with head.
 1.81.2.1 21-Jun-2006  yamt sync with head.
 1.92.4.1 09-Sep-2006  rpaulo sync with head
 1.92.2.1 18-Feb-2006  yamt sync with head.
 1.93.2.1 22-Apr-2006  simonb Sync with head.
 1.95.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.95.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.95.2.3 03-Sep-2006  yamt sync with head.
 1.95.2.2 11-Aug-2006  yamt sync with head
 1.95.2.1 01-Apr-2006  yamt sync with head.
 1.96.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.97.2.2 22-Sep-2006  riz Regen for ticket #170
 1.97.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.100.4.1 10-Dec-2006  yamt sync with head.
 1.100.2.1 18-Nov-2006  ad Sync with head.
 1.102.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.102.16.2 03-Oct-2007  garbled Sync with HEAD
 1.102.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.102.10.1 11-Jul-2007  mjf Sync with head.
 1.102.8.3 12-Oct-2007  ad Fix merge errors.
 1.102.8.2 20-Aug-2007  ad Sync with HEAD.
 1.102.8.1 09-Jun-2007  ad Sync with head.
 1.102.2.1 06-Jun-2007  bouyer Regen for ticket 699.
 1.104.8.2 02-Oct-2007  joerg Sync with HEAD.
 1.104.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.104.4.2 10-Sep-2007  skrll Sync with HEAD.
 1.104.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.106.2.1 06-Nov-2007  matt sync with HEAD
 1.108.88.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.108.84.1 05-Feb-2017  skrll Sync with HEAD
 1.108.64.1 03-Dec-2017  jdolecek update from HEAD
 1.3 02-Mar-1995  chopps enable tun support.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 27-Jun-1994  chopps some minor changes
 1.15 21-Oct-1996  veego This config files are no longer needed.
Copy the GENERIC config file and use that.
 1.14 26-Aug-1996  mrg add COMPAT_12.
 1.13 28-Jan-1996  chopps add UNION/UMAPFS accepts CR 1890
 1.12 09-Oct-1995  chopps new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.11 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 30-Sep-1995  chopps add arcnet device, (pr#1148)
 1.9 30-Sep-1995  chopps add msc device
 1.8 20-Aug-1995  chopps small cleanup
 1.7 20-Aug-1995  chopps change state (and rename) RH 64BIT option. Add ccd to COFFEE
 1.6 19-Aug-1995  chopps add more grful stuff
 1.5 18-Aug-1995  chopps add Ariadne driver
 1.4 12-May-1995  chopps added flsc and bzsc.
 1.3 23-Apr-1995  chopps bring up-to-date with recent conf.c and sunos changes.
 1.2 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 02-Mar-1995  chopps enable tun support.
 1.4 22-May-1994  mycroft Clean up deleted files.
 1.3 15-Apr-1994  chopps add COMPAT_09
 1.2 12-Apr-1994  chopps vmunix? no, we are netbsd.
 1.1 14-Mar-1994  chopps more generic generic files.
 1.202 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.201 07-Aug-2022  simonb UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.
 1.200 29-May-2022  rin Regen for GENERIC.in rev. 1.149.
 1.199 29-May-2022  andvar s/littel/little/ mainly in copy pasted comments.
 1.198 26-Jan-2021  rin Regen for previous commit to GENERIC.in.
 1.197 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.196 26-Oct-2020  rin branches: 1.196.2;
regen
 1.195 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.194 10-Aug-2020  rin regen
 1.193 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.192 03-May-2020  rin Regen to disable amiga/efa(4) in GENERIC, accidentally enabled in the
previous revision.

efa_probe() seems broken and misdetected even if absent on A1200.
 1.191 25-Mar-2020  jdolecek remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
 1.190 26-May-2019  sevan regen
 1.189 13-Apr-2019  isaki Regen.
> Add drvctl to kernel which has audio device.
> audiocfg(1) requires drvctl(4).
 1.188 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.187 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.186 05-Feb-2018  maxv branches: 1.186.2; 1.186.4;
Nuke DIRECTED_BROADCAST, it is not documented and not enabled anywhere. It
probably wouldn't have built correctly anyway, since there is no associated
defflag.

These ten lines of code in ip_input.c already look a lot better.
 1.185 23-Jan-2018  sevan Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.184 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.183 13-Sep-2017  sevan Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
 1.182 30-Jul-2017  maxv Disable svr4 and svr4_32 on sparc, sparc64 and amiga - the only places
where they were still enabled.
 1.181 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.180 13-Dec-2016  christos branches: 1.180.8;
wildcard speaker attachments, now that we can handle many of them.
 1.179 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.178 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.177 23-Aug-2014  dholland branches: 1.177.2; 1.177.4;
Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.176 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.175 05-Jul-2014  tsutsui branches: 1.175.2; 1.175.4; 1.175.8;
Regen from GENERIC.in rev 1.125:

> Use COPTS="-O2 -fno-reorder-blocks" for kernels except INSTALL_CONFIGURATION.
 1.174 05-Jul-2014  tsutsui Regen to reflect GENERIC.in rev 1.121-1.124:

rev 1.121:
> dd preliminary support for the Individual Computers ACA500 in the form of acahf
> driver. If ACA500 is equipped with supported accelerator with MMU, it allows
> running NetBSD on an Amiga 500.
>
> Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
> driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
> is commented out in the GENERIC kernel for now (at least until it stops being
> very experimental and hackish).
>
> When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...

rev 1.122:
> Changes to ACA500 support:
> - Add support for second (aux) CF slot.
> - Rework wdc attachment to be more sane.
> - Add support for clockport on ACA500.
> - Fix style where appropriate.

rev 1.123:
> Implement the probe procedure for ACA500. Now the user just needs acafh0
> compiled in his kernel and it all should(tm) work.
>
> Due to lack of obio in amiga port, the probe is called directly from mbattach().
> This is going to change with the introduction of obio for all non-autoconfig
> expansions.

rev 1.124:
> Disable X-Surf devices for DRACO's configuration.
>
> - ne at xsh requires ax88190 and ax88190 requires mii(4),
> but all mii devices are declared only inside AMIGA_CONFIGURATION
> - X-Surf also add wdc(4) but all children devices like atabus and
> atapibus are declared only for AMIGA_CONFIGURATION
>
> XXX: DRACO kernel is not built during build.sh release.
 1.173 04-Oct-2013  rkujawa branches: 1.173.2;
Nuke long dead NKPTADD and NKPTADDSHIFT options from config files.
 1.172 02-Sep-2013  skrll Re-gen. Hi rkujawa.
 1.171 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.170 05-Jun-2013  christos branches: 1.170.2;
remove obsolete networking options
 1.169 27-Apr-2013  christos the bogus number police
 1.168 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.167 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.166 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.165 01-Feb-2013  phx Include two MII PHY drivers, as needed by certain PCMCIA network cards.
More PHY drivers should be added when needed.
 1.164 29-Jan-2013  rkujawa Regen configs.
 1.163 28-Jan-2013  rkujawa Regen config files.
 1.162 25-Nov-2012  rkujawa Regen configs.
 1.161 21-Nov-2012  rkujawa Regen kernel configs.
 1.160 19-Nov-2012  rkujawa Regen configs.
 1.159 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.158 07-Jun-2012  rkujawa branches: 1.158.2;
Regen configs.
 1.157 15-May-2012  rkujawa regen configs
 1.156 17-Apr-2012  rkujawa regen configs
 1.155 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.154 24-Jan-2012  rkujawa branches: 1.154.2; 1.154.6; 1.154.8;
Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.153 19-Jan-2012  rkujawa Don\'t forget to disable atabus* when disabling the efa driver.
 1.152 19-Jan-2012  rkujawa User reported that efa driver attached when FastATA hardware was absent, but 4x EIDE splitter was present. Disable efa in GENERIC until problem is solved and/or better probe function is written.
 1.151 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.150 11-Jan-2012  rkujawa Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.149 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.148 26-Dec-2011  mlelstv regen from GENERIC.in
 1.147 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.146 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.145 22-Nov-2011  tls branches: 1.145.2;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.144 30-Oct-2011  rkujawa branches: 1.144.2;
regen kernel configs
 1.143 27-Oct-2011  rkujawa regen kernel configs
 1.142 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.141 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.140 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.139 01-Jul-2011  rkujawa Fix DRACO kernel breakage introduced by my previous commit.
 1.138 30-Jun-2011  wiz dependant -> dependent
 1.137 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.136 14-Jan-2011  phx branches: 1.136.2; 1.136.4;
regen
 1.135 08-May-2010  mrg regenerate these configurations from GENERIC.in.
 1.134 29-Apr-2010  chs regen
 1.133 16-Apr-2010  pooka regen
 1.132 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.131 05-Dec-2009  pooka branches: 1.131.2; 1.131.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.130 12-Jan-2009  mhitch Regen from GENERIC.in rev 1.72.
Add COMPAT_50.
 1.129 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.128 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.127 24-Sep-2008  tsutsui branches: 1.127.2;
Regen from GENERIC.in rev 1.69:
> Enable fss(4) in not only GENERIC but also all !INSTALL kernels (i.e. DRACO).
 1.126 24-Sep-2008  tsutsui Regen from GENERIC.in rev 1.68:
> Add accept filters to a proper file, as _READ_ME_FIRST_ claims.
 1.125 31-Jul-2008  simonb Regen for "options WAPBL".
 1.124 31-Dec-2007  ad branches: 1.124.6; 1.124.10; 1.124.12; 1.124.16;
Remove systrace. Ok core@.
 1.123 17-Oct-2007  garbled branches: 1.123.2; 1.123.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.122 20-Aug-2007  is branches: 1.122.2;
Regenerate after addition of wdc_buddha.
 1.121 19-Aug-2007  is regenerate after removal of OSI networking
 1.120 16-Jul-2007  he branches: 1.120.4; 1.120.8;
Regenerated files after adding COMPAT_40.
 1.119 06-Jun-2007  martin regen
 1.118 12-Nov-2006  jmmv branches: 1.118.2; 1.118.8; 1.118.10; 1.118.16; 1.118.18;
Regen. Per bernd@'s instructions.
 1.117 11-Nov-2006  jmmv Remove tmpfs's experimental status. OK'ed by core@.
 1.116 26-Aug-2006  christos branches: 1.116.2; 1.116.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.115 26-Aug-2006  tsutsui Regen from GENERIC.in:
1.54:
> Disable SYSTRACE by default on all kernels (discussed with core)
1.55:
> Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.114 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.113 30-Jun-2006  tsutsui branches: 1.113.2;
Regen from GENERIC.in rev 1.53:
> Add CARP to further platforms
 1.112 28-Mar-2006  pavel branches: 1.112.4;
regen (added stf).
 1.111 05-Feb-2006  cube branches: 1.111.2; 1.111.4; 1.111.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.110 04-Feb-2006  rpaulo regen
 1.109 03-Feb-2006  reinoud branches: 1.109.2;
Regen GENERIC config files.
 1.108 10-Dec-2005  tsutsui branches: 1.108.2; 1.108.4;
Regen from GENERIC.in rev 1.48:
> Add veriexec stuff to the common config file.
 1.107 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.47:
> Remove obsolete options VNODE_OP_NOINLINE.
 1.106 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.46:
> Adjust comments for options FFS_NO_SNAPSHOT.
 1.105 03-Nov-2005  chs regen
 1.104 07-Oct-2005  tsutsui Regen from GENERIC.in rev 1.44:
> Add (commented out) file-system TMPFS in a proper file.

XXX: It seems `INSTALL_CONFIGURATION' in GENERIC.in should be reorganaized.
 1.103 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.102 19-Aug-2005  christos 64 bit inode changes.
 1.101 31-Jul-2005  yamt regen.
 1.100 30-Jul-2005  yamt regen.
 1.99 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.98 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.97 26-Jun-2005  rpaulo branches: 1.97.2;
Correct RCS Ids.
 1.96 26-Jun-2005  rpaulo Add PTYFS (commented out) in the correct form.
 1.95 09-Jun-2005  tsutsui Regen from GENERIC.in rev 1.36:
> - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
> (still commented out)
> - Add (also commented out) options BUFQ_PRIOCSCAN.
>
> Suggested by perry and soda on tech-kern.
> Please refer options(4) for details for these options.
 1.94 01-Jun-2005  jandberg regen: wsmux added (enabled only in WSCONS)
 1.93 25-Feb-2005  simonb branches: 1.93.2;
Regen for COMPAT_20 addition.
 1.92 20-Feb-2005  jdolecek regen: add SMBFS/nsmb, per PR port-amiga/29066 by Florian Stoehr
 1.91 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.90 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.89 31-Jan-2005  hannken Regen.
 1.88 17-Jan-2005  cube branches: 1.88.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.87 13-Jan-2005  is branches: 1.87.2;
Regenerate from GENERIC.in: no more idesc - we're using wdc.
 1.86 10-Nov-2004  christos Add COMPAT_BSDPTY on all the kernels that have COMPAT options.
 1.85 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.84 28-Jun-2004  bouyer Regen, added P1003_1B_SEMAPHORE.
 1.83 26-Jun-2004  abs Regenerate from master config files
 1.82 23-Feb-2004  jandberg branches: 1.82.2;
regen after wsfont changes
 1.81 08-Oct-2003  bouyer Regen: add atabus
 1.80 22-Sep-2003  jandberg regen after wsmouse addition
 1.79 22-Sep-2003  cl regen
 1.78 27-Jul-2003  is Regenerate from GENERIC.in to include pseudo-device ksyms, where
appropriate.
 1.77 16-Apr-2003  is branches: 1.77.2;
make /dev/reload optional (it is implemented for a.out kernels only, at
the moment.)
 1.76 10-Apr-2003  christos Bye Bye UCONSOLE
 1.75 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.74 22-Nov-2002  wiz regen
 1.73 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.72 06-Oct-2002  provos regen from GENERIC.in
 1.71 18-Sep-2002  lukem regen for: enable USERCONF
 1.70 05-Jul-2002  abs Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
 1.69 18-Jun-2002  lukem Regenerate with new m4 mechanism (vs old cpp mechanism).
New files are same as old (except for whitespace differences), except
that the new GENERIC doesn't have melody, because GENERIC defines
DRACO and the latter can't have it.
 1.68 17-Jun-2002  lukem regen for clockctl
 1.67 30-May-2002  thorpej Regenerate.
 1.66 25-Apr-2002  atatat branches: 1.66.2; 1.66.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.65 19-Apr-2002  heinz regen after GENERIC v1.178
 1.64 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.63 04-Mar-2002  sommerfeld The "gif*" tunnelling interface does everything ipip does.
Move usage example from ipip.4 to gif.4
Excise ipip and stitch up the scars.
 1.62 15-Feb-2002  is Move Amiga PORT to ELF and new toolchain. Still missing:
support in UPGRADE to move old shared libs to /emul/aout
 1.61 13-Feb-2002  is move ELF32 to std.amiga
 1.60 27-Jan-2002  is *** empty log message ***
 1.59 27-Jan-2002  is add Toccata.
 1.58 27-Jan-2002  jdolecek regen: INSECURE, SCSIVERBOSE description change,
s/define/uncomment/, add raid stuff
 1.57 14-Jan-2002  jandberg Regenerated AMIGA, INSTALL and DRACO from GENERIC.
 1.56 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.55 25-Aug-2001  is branches: 1.55.6;
synchronize (addition of repulse driver).
 1.54 08-Jul-2001  abs branches: 1.54.2;
(Regenerated atari and amiga)
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.53 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.52 10-Mar-2001  is - The ioblix zbus board comes in 24 MHz and 22.1184 MHz clock variants.
We default to the (newer, more sane) 22.1184 MHz value, but set it from
the iobzclock variable (in Hz), which is initialized from the IOBZCLOCK
configuration option and patchable.
XXX we should time the clock at system startup.
- add ioblix_zbus to the GENERIC configuration.
 1.51 29-Dec-2000  is branches: 1.51.2;
Update for vlan addition and Xsurf name addition.
 1.50 04-Oct-2000  is resync, mostly for the rnd addition.
 1.49 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.48 13-Aug-2000  itojun move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
 1.47 05-Jul-2000  sommerfeld regenerate
 1.46 14-Jun-2000  veego branches: 1.46.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.45 28-Mar-2000  is branches: 1.45.2;
synchronize to GENERIC
 1.44 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.43 05-Feb-2000  mhitch Regen (with commented MI wdc stuff)
 1.42 22-Jan-2000  is synchronize this with GENERIC.
 1.41 15-Oct-1999  is branches: 1.41.2;
regenerate
 1.40 29-Jul-1999  augustss branches: 1.40.2;
It's time to be COMPAT_14.
 1.39 28-Jul-1999  is regenerate: no gvpbus on DRACO
 1.38 18-Jun-1999  is less views, and comment them
 1.37 18-Jun-1999  is COMPAT_SVR4 does not compile witout EXEC_ELF32
 1.36 17-May-1999  is allow more than one ed, es or qn
 1.35 10-May-1999  is Add HyperCom 3+/4+ parallel port support
 1.34 01-May-1999  tron Regen from "GENERIC".
 1.33 10-Apr-1999  tron Regen from "GENERIC".
 1.32 01-Apr-1999  is branches: 1.32.2;
regenerate
 1.31 09-Mar-1999  is Regenerate.
 1.30 09-Mar-1999  is Regenerated.
 1.29 28-Feb-1999  is Regenerate.
 1.28 15-Feb-1999  is Create a RCS id in the generated configuration file
 1.27 04-Feb-1999  is regenerate from template
 1.26 28-Nov-1998  is Add ne (AriadneII).
 1.25 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.24 07-Apr-1998  is ser.c, mfc.c and msc.c dont compile currently.
 1.23 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.22 22-Feb-1998  is Actually fix, rather than mask, the Amiga big machine panic: the pmap needs
to (pre)allocate enough kernel page table pages to (among others) map the
buffer cache buffers.
 1.21 05-Feb-1998  is Get rid of std.draco file.
Amiga specific devices must be named in GENERIC, too.
While here, add vnd pseudo-devices to DRACO.
 1.20 01-Dec-1997  kleink Add COMPAT_13.
 1.19 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.18 18-Oct-1997  is Driver for the VMC HyperCom3/zbus and the VMC HyperCom4.
lpt on HyperCom3 isn't supported yet.
 1.17 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.16 12-Sep-1997  mycroft Move definition of FPCOPROC into the Makefile, since it's always required.
 1.15 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.14 17-Jul-1997  is branches: 1.14.2;
Make the DraCo hardware clock an autoconfiguration device.
 1.13 06-Jul-1997  is Implement the RTC_OFFSET kernel option/rtc_offset variable for the Amiga port.
To get the old behaviour, set options RTC_OFFSET=0 in your kernel configuration
file.
 1.12 30-Mar-1997  is The DraCo has had a com driver for quite a while.
 1.11 27-Mar-1997  veego Remove the ae entries for the Ariadne, it's now supported bye the le driver
 1.10 31-Jan-1997  mhitch "options GENERIC" is obsolute.
 1.9 31-Jan-1997  thorpej Adopt for new file system and root spec grammar.
 1.8 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.7 20-Dec-1996  veego branches: 1.7.2;
- Move SWAPPAGER, VNODEPAGER and DEVPAGER to std.draco.
- Remove not working KGDB.
- Remove unused PANICWAIT.
- Add ch and uk devices.
 1.6 21-Oct-1996  veego include update for config(8)
 1.5 26-Aug-1996  mrg add COMPAT_12.
 1.4 11-Aug-1996  veego Bring in changes from the 1.2 branch which where only in the release
 1.3 11-Aug-1996  veego Disable the Hardwarecursor on the RetinaZ3 to solve the problems with
wrong mouse jumps under X11.
Remove the not working options KGDB from DRACO and GENERIC and added
an option to enable the HWC for the RetinaZ3
 1.2 16-May-1996  is branches: 1.2.4;
cleanup comment.
 1.1 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.2.4.2 06-Sep-1996  jtc Pulled up rev 1.4 by request from Bernd Ernesti
 1.2.4.1 30-May-1996  is Add Motorola 68060 and DraCo support to GENERIC and INSTALL, now that
dual machine kernels have been tested, and clean up DRACO a bit.
 1.7.2.3 30-Jan-1997  thorpej update from trunk
 1.7.2.2 18-Jan-1997  thorpej Update from trunk.
 1.7.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.14.2.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.2.2 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.2.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.32.2.4 05-Jul-2000  he Pull up regenerated files (requested by sommerfeld):
Comment out EON ISO-over-ip tunneling pseudo-driver, and document
as broken/fragile. Unlikely to be of much use, and confuses new
users when their system crashes when they, or their dhclient
stumble over it. See PR#10500 and PR#8994 for the gory details.
 1.32.2.3 18-Jun-1999  perry pullup 1.35->1.36 (is): Allow more than one ed,ed or qn i/f
 1.32.2.2 18-Jun-1999  perry pullup 1.34->1.35 (is): Support for HyperCom 3+/4+ lpt ports
 1.32.2.1 12-Apr-1999  tron branches: 1.32.2.1.2; 1.32.2.1.4;
Pull up AMIGA, 1.14 and DRACO, 1.33:
Regen from "GENERIC".
 1.32.2.1.4.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.32.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.32.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.40.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.41.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.41.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.41.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.45.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.46.2.3 01-May-2001  he Pull up regenerated files (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.46.2.2 25-Jan-2001  jhawk regen
 1.46.2.1 06-Jul-2000  sommerfeld Regenerate after change to GENERIC:

Comment out EON ISO-over-ip tunneling pseudo-driver, and document as
broken/fragile. Unlikely to be of much use, and confuses new users
when their system crashes when they, or their dhclient stumble over
it. See kern/10500, kern/8994 for the gory details.

[pullup approved by thorpej]
 1.51.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.51.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.54.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.54.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.54.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.54.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.54.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.54.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.54.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.55.6.9 11-Dec-2002  thorpej Sync with HEAD.
 1.55.6.8 18-Oct-2002  nathanw Catch up to -current.
 1.55.6.7 01-Aug-2002  nathanw Catch up to -current.
 1.55.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.55.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.55.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.55.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.55.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.55.6.1 25-Aug-2001  nathanw file DRACO was added on branch nathanw_sa on 2002-01-08 00:22:57 +0000
 1.66.4.3 24-Oct-2002  lukem regen from GENERIC after ipfilter 3.4.29 upgrade
 1.66.4.2 01-Aug-2002  lukem Regenerate from GENERIC 1.179.4.2 (requested by lukem in ticket #314):
 1.66.4.1 30-May-2002  tv Pull up regen (requested by thorpej in ticket #94).
 1.66.2.2 16-Jul-2002  gehenna catch up with -current.
 1.66.2.1 09-Jul-2002  gehenna catch up with -current.
 1.77.2.11 11-Dec-2005  christos Sync with head.
 1.77.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.77.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.77.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.77.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.77.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.77.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.77.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.77.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.77.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.77.2.1 03-Aug-2004  skrll Sync with HEAD
 1.82.2.4 11-Aug-2007  bouyer Regen for ticket 11356
 1.82.2.3 15-Jul-2004  he branches: 1.82.2.3.2; 1.82.2.3.4;
Pull up regenerated files (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.82.2.2 02-Jul-2004  he Pull up regenerated files (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.82.2.1 30-Jun-2004  jdc Pull up revision 1.83 (requested by abs in ticket #567).

Regenerate from master config files
 1.82.2.3.4.1 11-Aug-2007  bouyer regen for ticket 11356
 1.82.2.3.2.1 11-Aug-2007  bouyer regen for ticket 11356
 1.87.2.1 29-Apr-2005  kent sync with -current
 1.88.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.88.2.1 12-Feb-2005  yamt sync with head.
 1.93.2.3 05-Nov-2005  tron Regen for ticket #929.
 1.93.2.2 14-Aug-2005  riz Pull up revision 1.99 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.93.2.1 18-Jul-2005  riz Pull up revision 1.98 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.97.2.4 21-Jan-2008  yamt sync with head
 1.97.2.3 03-Sep-2007  yamt sync with head.
 1.97.2.2 30-Dec-2006  yamt sync with head.
 1.97.2.1 21-Jun-2006  yamt sync with head.
 1.108.4.1 09-Sep-2006  rpaulo sync with head
 1.108.2.1 18-Feb-2006  yamt sync with head.
 1.109.2.1 22-Apr-2006  simonb Sync with head.
 1.111.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.111.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.111.2.3 03-Sep-2006  yamt sync with head.
 1.111.2.2 11-Aug-2006  yamt sync with head
 1.111.2.1 01-Apr-2006  yamt sync with head.
 1.112.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.113.2.2 22-Sep-2006  riz Regen for ticket #170
 1.113.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.116.4.1 10-Dec-2006  yamt sync with head.
 1.116.2.1 18-Nov-2006  ad Sync with head.
 1.118.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.118.16.2 03-Oct-2007  garbled Sync with HEAD
 1.118.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.118.10.1 11-Jul-2007  mjf Sync with head.
 1.118.8.2 20-Aug-2007  ad Sync with HEAD.
 1.118.8.1 09-Jun-2007  ad Sync with head.
 1.118.2.1 06-Jun-2007  bouyer Regen for ticket 699.
 1.120.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.120.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.122.2.2 09-Jan-2008  matt sync with HEAD
 1.122.2.1 06-Nov-2007  matt sync with HEAD
 1.123.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.123.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.124.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.124.16.1 19-Oct-2008  haad Sync with HEAD.
 1.124.12.2 10-Oct-2008  skrll Sync with HEAD.
 1.124.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.124.10.3 11-Aug-2010  yamt sync with head.
 1.124.10.2 11-Mar-2010  yamt sync with head
 1.124.10.1 04-May-2009  yamt sync with head.
 1.124.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.124.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.127.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.131.4.3 21-Apr-2011  rmind sync with head
 1.131.4.2 05-Mar-2011  rmind sync with head
 1.131.4.1 30-May-2010  rmind sync with head
 1.131.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.131.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.136.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.136.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.144.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.144.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.144.2.3 30-Oct-2012  yamt sync with head
 1.144.2.2 23-May-2012  yamt sync with head.
 1.144.2.1 17-Apr-2012  yamt sync with head
 1.145.2.4 02-Jun-2012  mrg sync to latest -current.
 1.145.2.3 29-Apr-2012  mrg sync to latest -current.
 1.145.2.2 11-Mar-2012  mrg sync to latest -current
 1.145.2.1 18-Feb-2012  mrg merge to -current.
 1.154.8.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.154.6.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.154.2.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.158.2.5 03-Dec-2017  jdolecek update from HEAD
 1.158.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.158.2.3 23-Jun-2013  tls resync from head
 1.158.2.2 25-Feb-2013  tls resync with head
 1.158.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.170.2.2 18-May-2014  rmind sync with head
 1.170.2.1 28-Aug-2013  rmind sync with head
 1.173.2.1 10-Aug-2014  tls Rebase.
 1.175.8.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.175.4.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.175.2.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.177.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.177.2.2 28-Aug-2017  skrll Sync with HEAD
 1.177.2.1 05-Feb-2017  skrll Sync with HEAD
 1.180.8.2 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.180.8.1 31-Aug-2017  bouyer apply paych, requested by maxv in ticket #237:
sys/arch/amiga/conf/DRACO patch
sys/arch/amiga/conf/GENERIC patch
sys/arch/amiga/conf/GENERIC.in patch
sys/arch/i386/conf/ALL patch
sys/arch/i386/conf/GENERIC patch
sys/arch/i386/conf/XEN3_DOM0 patch
sys/arch/i386/conf/XEN3_DOMU patch
sys/arch/sparc/conf/GENERIC patch
sys/arch/sparc/conf/KRUPS patch
sys/arch/sparc/conf/MRCOFFEE patch
sys/arch/sparc/conf/TADPOLE3GX patch
sys/arch/sparc64/conf/GENERIC patch
sys/arch/sparc64/conf/NONPLUS64 patch
sys/kern/kern_exec.c patch

Disables compat_svr4 and compat_svr4_32 on each architecture,
and removes the associated module autoload entries.
 1.186.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.186.4.1 10-Jun-2019  christos Sync with HEAD
 1.186.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.186.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.196.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.339 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.338 12-Feb-2023  abs Add optoion GENERIC.local include to the end of ~all GENERIC configs

This excludes atari, sgimips, evbmips, evbppc, evbsh3, and hpcarm
all of which have somewhat specific kernel config file layouts
 1.337 29-Sep-2022  riastradh swwdog(4): Add to GENERIC kernels.

Plus a handful of others that I'm familiar with. Lots of special-
purpose kernels should probably have this too but I'm not going
through all the arm, mips, and ppc evaluation board kernels to see
which ones are relevant.

Omitted from systems I know to be very small:
- sun2/GENERIC
- dreamcast/GENERIC
Feel free to remove it from others that need to be kept smaller.

Compile-tested a few of these just in case:
- alpha/GENERIC
- amd64/GENERIC
- evbmips/OCTEON
- i386/GENERIC
- riscv/GENERIC

PR kern/29702
 1.336 07-Aug-2022  simonb Regen.
 1.335 29-May-2022  rin Regen for GENERIC.in rev. 1.149.
 1.334 29-May-2022  andvar s/littel/little/ mainly in copy pasted comments.
 1.333 26-Jan-2021  rin Regen for previous commit to GENERIC.in.
 1.332 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.331 26-Oct-2020  rin branches: 1.331.2;
regen
 1.330 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.329 10-Aug-2020  rin regen
 1.328 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.327 03-May-2020  rin Regen to disable amiga/efa(4) in GENERIC, accidentally enabled in the
previous revision.

efa_probe() seems broken and misdetected even if absent on A1200.
 1.326 25-Mar-2020  jdolecek remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
 1.325 26-May-2019  sevan regen
 1.324 26-Apr-2019  sevan Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
 1.323 13-Apr-2019  isaki Regen.
> Add drvctl to kernel which has audio device.
> audiocfg(1) requires drvctl(4).
 1.322 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.321 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.320 05-Feb-2018  maxv branches: 1.320.2; 1.320.4;
Nuke DIRECTED_BROADCAST, it is not documented and not enabled anywhere. It
probably wouldn't have built correctly anyway, since there is no associated
defflag.

These ten lines of code in ip_input.c already look a lot better.
 1.319 23-Jan-2018  sevan Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.318 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.317 13-Sep-2017  sevan Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
 1.316 30-Jul-2017  maxv Disable svr4 and svr4_32 on sparc, sparc64 and amiga - the only places
where they were still enabled.
 1.315 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.314 13-Dec-2016  christos branches: 1.314.8;
wildcard speaker attachments, now that we can handle many of them.
 1.313 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.312 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.311 16-Nov-2014  manu branches: 1.311.2; 1.311.4;
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.310 12-Nov-2014  manu Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels

This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.309 23-Aug-2014  dholland Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.308 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.307 05-Jul-2014  tsutsui branches: 1.307.2;
Regen from GENERIC.in rev 1.125:

> Use COPTS="-O2 -fno-reorder-blocks" for kernels except INSTALL_CONFIGURATION.
 1.306 05-Jul-2014  tsutsui Regen to reflect GENERIC.in rev 1.121-1.124:

rev 1.121:
> dd preliminary support for the Individual Computers ACA500 in the form of acahf
> driver. If ACA500 is equipped with supported accelerator with MMU, it allows
> running NetBSD on an Amiga 500.
>
> Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
> driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
> is commented out in the GENERIC kernel for now (at least until it stops being
> very experimental and hackish).
>
> When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...

rev 1.122:
> Changes to ACA500 support:
> - Add support for second (aux) CF slot.
> - Rework wdc attachment to be more sane.
> - Add support for clockport on ACA500.
> - Fix style where appropriate.

rev 1.123:
> Implement the probe procedure for ACA500. Now the user just needs acafh0
> compiled in his kernel and it all should(tm) work.
>
> Due to lack of obio in amiga port, the probe is called directly from mbattach().
> This is going to change with the introduction of obio for all non-autoconfig
> expansions.

rev 1.124:
> Disable X-Surf devices for DRACO's configuration.
>
> - ne at xsh requires ax88190 and ax88190 requires mii(4),
> but all mii devices are declared only inside AMIGA_CONFIGURATION
> - X-Surf also add wdc(4) but all children devices like atabus and
> atapibus are declared only for AMIGA_CONFIGURATION
>
> XXX: DRACO kernel is not built during build.sh release.
 1.305 04-Oct-2013  rkujawa branches: 1.305.2;
Nuke long dead NKPTADD and NKPTADDSHIFT options from config files.
 1.304 02-Sep-2013  skrll Re-gen. Hi rkujawa.
 1.303 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.302 05-Jun-2013  christos branches: 1.302.2;
remove obsolete networking options
 1.301 27-Apr-2013  christos the bogus number police
 1.300 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.299 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.298 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.297 01-Feb-2013  phx Include two MII PHY drivers, as needed by certain PCMCIA network cards.
More PHY drivers should be added when needed.
 1.296 29-Jan-2013  rkujawa Regen configs.
 1.295 28-Jan-2013  rkujawa Regen config files.
 1.294 25-Nov-2012  rkujawa Regen configs.
 1.293 25-Nov-2012  rkujawa Add z3rambd, commented out.
 1.292 21-Nov-2012  rkujawa Regen kernel configs.
 1.291 19-Nov-2012  rkujawa Regen configs.
 1.290 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.289 17-Aug-2012  abs branches: 1.289.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.288 07-Jun-2012  rkujawa Regen configs.
 1.287 15-May-2012  rkujawa regen configs
 1.286 17-Apr-2012  rkujawa regen configs
 1.285 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.284 24-Jan-2012  rkujawa branches: 1.284.2; 1.284.6; 1.284.8;
Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.283 19-Jan-2012  rkujawa Don\'t forget to disable atabus* when disabling the efa driver.
 1.282 19-Jan-2012  rkujawa User reported that efa driver attached when FastATA hardware was absent, but 4x EIDE splitter was present. Disable efa in GENERIC until problem is solved and/or better probe function is written.
 1.281 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.280 11-Jan-2012  rkujawa Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.279 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.278 26-Dec-2011  mlelstv regen from GENERIC.in
 1.277 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.276 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.275 22-Nov-2011  tls branches: 1.275.2;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.274 30-Oct-2011  rkujawa branches: 1.274.2;
regen kernel configs
 1.273 27-Oct-2011  rkujawa regen kernel configs
 1.272 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.271 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.270 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.269 01-Jul-2011  rkujawa Fix DRACO kernel breakage introduced by my previous commit.
 1.268 01-Jul-2011  rkujawa Add Bluetooth stack to Amiga. Tested with 3Com 3CRWB6096B on an A1200. Change approved by phx.
 1.267 30-Jun-2011  wiz dependant -> dependent
 1.266 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.265 14-Jan-2011  phx branches: 1.265.2; 1.265.4;
regen
 1.264 08-May-2010  mrg regenerate these configurations from GENERIC.in.
 1.263 29-Apr-2010  chs regen
 1.262 16-Apr-2010  pooka regen
 1.261 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.260 05-Dec-2009  pooka branches: 1.260.2; 1.260.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.259 12-Jan-2009  mhitch Regen from GENERIC.in rev 1.72.
Add COMPAT_50.
 1.258 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.257 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.256 24-Sep-2008  tsutsui branches: 1.256.2;
Regen from GENERIC.in rev 1.69:
> Enable fss(4) in not only GENERIC but also all !INSTALL kernels (i.e. DRACO).
 1.255 24-Sep-2008  tsutsui Regen from GENERIC.in rev 1.68:
> Add accept filters to a proper file, as _READ_ME_FIRST_ claims.
 1.254 10-Aug-2008  tls Add accept filters to GENERIC kernels where they exist.
 1.253 31-Jul-2008  simonb Regen for "options WAPBL".
 1.252 31-Dec-2007  ad branches: 1.252.6; 1.252.10; 1.252.12; 1.252.16;
Remove systrace. Ok core@.
 1.251 17-Oct-2007  garbled branches: 1.251.2; 1.251.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.250 20-Aug-2007  is branches: 1.250.2;
Regenerate after addition of wdc_buddha.
 1.249 19-Aug-2007  is regenerate after removal of OSI networking
 1.248 06-Aug-2007  adrianp Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.247 16-Jul-2007  he branches: 1.247.2; 1.247.4; 1.247.8;
Regenerated files after adding COMPAT_40.
 1.246 06-Jun-2007  martin regen
 1.245 04-Jun-2007  martin Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.244 12-Nov-2006  jmmv branches: 1.244.2; 1.244.8; 1.244.10; 1.244.16; 1.244.18;
Regen. Per bernd@'s instructions.
 1.243 11-Nov-2006  jmmv Remove tmpfs's experimental status. OK'ed by core@.
 1.242 26-Aug-2006  christos branches: 1.242.2; 1.242.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.241 26-Aug-2006  tsutsui Regen from GENERIC.in:
1.54:
> Disable SYSTRACE by default on all kernels (discussed with core)
1.55:
> Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.240 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.239 31-Jul-2006  hubertf branches: 1.239.2;
spc(4) can also attach to pcmcia(4), as was already in hpcmips/GENERIC
for quite some time. Add it to all systems that have pcmcia SCSI.

Pointed out by Bj�rn Johannesson <rherdware@yahoo.com> in private mail,
OK'd by matt@
 1.238 30-Jun-2006  tsutsui Regen from GENERIC.in rev 1.53:
> Add CARP to further platforms
 1.237 28-Mar-2006  pavel branches: 1.237.4;
regen (added stf).
 1.236 05-Feb-2006  cube branches: 1.236.2; 1.236.4; 1.236.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.235 04-Feb-2006  rpaulo regen
 1.234 03-Feb-2006  reinoud branches: 1.234.2;
Regen GENERIC config files.
 1.233 02-Feb-2006  reinoud Add commented out UDF file-system entry in all GENERIC configurations.
 1.232 10-Dec-2005  tsutsui branches: 1.232.2; 1.232.4;
Regen from GENERIC.in rev 1.48:
> Add veriexec stuff to the common config file.
 1.231 09-Dec-2005  elad Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.230 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.47:
> Remove obsolete options VNODE_OP_NOINLINE.
 1.229 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.46:
> Adjust comments for options FFS_NO_SNAPSHOT.
 1.228 03-Nov-2005  chs regen
 1.227 07-Oct-2005  tsutsui Regen from GENERIC.in rev 1.44:
> Add (commented out) file-system TMPFS in a proper file.

XXX: It seems `INSTALL_CONFIGURATION' in GENERIC.in should be reorganaized.
 1.226 10-Sep-2005  jmmv Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program. This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*. Therefore, it is disabled by
default in all kernels. However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
 1.225 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.224 19-Aug-2005  christos 64 bit inode changes.
 1.223 31-Jul-2005  yamt regen.
 1.222 30-Jul-2005  yamt regen.
 1.221 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.220 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.219 26-Jun-2005  rpaulo branches: 1.219.2;
Correct RCS Ids.
 1.218 26-Jun-2005  rpaulo Add PTYFS (commented out) in the correct form.
 1.217 25-Jun-2005  rpaulo Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.216 09-Jun-2005  tsutsui Regen from GENERIC.in rev 1.36:
> - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
> (still commented out)
> - Add (also commented out) options BUFQ_PRIOCSCAN.
>
> Suggested by perry and soda on tech-kern.
> Please refer options(4) for details for these options.
 1.215 01-Jun-2005  jandberg regen: wsmux added (enabled only in WSCONS)
 1.214 25-Feb-2005  simonb branches: 1.214.2;
Regen for COMPAT_20 addition.
 1.213 20-Feb-2005  jdolecek regen: add SMBFS/nsmb, per PR port-amiga/29066 by Florian Stoehr
 1.212 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.211 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.210 31-Jan-2005  hannken Regen.
 1.209 28-Jan-2005  rumble Sprinkle options UFS_DIRHASH on GENERIC kernels. It's presently
commented out and labeled experimental pending further review and
testing.
 1.208 17-Jan-2005  cube branches: 1.208.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.207 13-Jan-2005  is branches: 1.207.2;
Regenerate from GENERIC.in: no more idesc - we're using wdc.
 1.206 10-Nov-2004  christos Add COMPAT_BSDPTY on all the kernels that have COMPAT options.
 1.205 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.204 28-Jun-2004  bouyer Regen, added P1003_1B_SEMAPHORE.
 1.203 26-Jun-2004  abs Regenerate from master config files
 1.202 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.201 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.200 23-Feb-2004  jandberg branches: 1.200.2;
regen after wsfont changes
 1.199 08-Oct-2003  bouyer Regen: add atabus
 1.198 22-Sep-2003  jandberg regen after wsmouse addition
 1.197 22-Sep-2003  cl regen
 1.196 27-Jul-2003  is Regenerate from GENERIC.in to include pseudo-device ksyms, where
appropriate.
 1.195 26-Apr-2003  ragge branches: 1.195.2;
Add pseudo-device ksyms.
 1.194 16-Apr-2003  is make /dev/reload optional (it is implemented for a.out kernels only, at
the moment.)
 1.193 10-Apr-2003  christos Bye Bye UCONSOLE
 1.192 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.191 22-Nov-2002  wiz regen
 1.190 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.189 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.188 06-Oct-2002  provos regen from GENERIC.in
 1.187 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.186 25-Sep-2002  martti Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK"
 1.185 20-Sep-2002  martti Added (commented out) IPFILTER_DEFAULT_BLOCK.
 1.184 18-Sep-2002  lukem regen for: enable USERCONF
 1.183 05-Jul-2002  abs Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
 1.182 18-Jun-2002  lukem Regenerate with new m4 mechanism (vs old cpp mechanism).
New files are same as old (except for whitespace differences), except
that the new GENERIC doesn't have melody, because GENERIC defines
DRACO and the latter can't have it.
 1.181 17-Jun-2002  lukem Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.180 30-May-2002  thorpej Tweak a comment so that it doens't turn into a trigraph if
the config file is included in the kernel source.
 1.179 25-Apr-2002  atatat branches: 1.179.2; 1.179.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.178 19-Apr-2002  heinz Add options for console fonts
 1.177 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.176 04-Mar-2002  sommerfeld The "gif*" tunnelling interface does everything ipip does.
Move usage example from ipip.4 to gif.4
Excise ipip and stitch up the scars.
 1.175 15-Feb-2002  is Move Amiga PORT to ELF and new toolchain. Still missing:
support in UPGRADE to move old shared libs to /emul/aout
 1.174 13-Feb-2002  is move ELF32 to std.amiga
 1.173 27-Jan-2002  is Don't include audio devices in INSTALL kernels.
 1.172 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.171 27-Jan-2002  is Add toccata to the GENERIC configuration.
 1.170 27-Jan-2002  jdolecek avoid '# define', this is processed by cpp
 1.169 27-Jan-2002  jdolecek normalize description of INSECURE and SCSIVERBOSE
 1.168 26-Jan-2002  aymeric remove trailing spaces and tabs
 1.167 19-Jan-2002  oster Add new RF_* options for RAIDframe bits that are no longer built by default.

While we're here, enable RAIDframe (and RAID_AUTOCONFIG) by default for
architectures that I'm comfortable can deal with it being on by default.

Also: bump the number of 'raid' devices from 4 to 8, since 4 seems to
be insufficient in practise.
 1.166 13-Jan-2002  jandberg Amiga wsdisplay updates.

conf/GENERIC:
conf/files.amiga:
- Bring in wsfont definitions.

dev/grfabs_reg.h:
- Add macros for decomposing palette entries.

dev/amidisplaycc.c:
- Support for fonts, either wsfonts compiled into kernel
or runtime-loadable by ioctl. Font width still limited to 8,
height may vary.
- Limited support for mapped displays. No way to adjust display
mode. Palette setting works.
- Prettier default palette (white on black).
- Probes correctly as WSDISPLAY_TYPE_AMIGACC.
- Support for screen blanking.
 1.165 28-Dec-2001  martin Add PPPoE to all generic kernels that should be able to use it.
XXX TODO: do this for INSTALL kernels too, add sysinst support and make the
XXX needed binaries available on the ramdisk root fs.
 1.164 14-Dec-2001  gmcgarry Add a blurb to the top of all GENERIC files. This serves three purposes:
- to clarify some terminology
- to clarify the intention of the GENERIC file
- to cross-reference some useful man pages
 1.163 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.162 01-Sep-2001  atatat branches: 1.162.6;
Add bridge pseudo devices to GENERIC configs
 1.161 25-Aug-2001  is Driver for the ALiENDESiGN Repulse board.
- only 8/16 bit precision supported
- no support for the Repulse special S/P-DIF I/O yet
- I think ac97.c needs some work.
 1.160 08-Jul-2001  abs branches: 1.160.2;
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.159 30-Jun-2001  darcy Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores. It appears that there are no overrides
in the code and each file has the following added.

options SYSVSEM # System V semaphores
+#options SEMMNI=10 # number of semaphore identifiers
+#options SEMMNS=60 # number of semaphores in system
+#options SEMUME=10 # max number of undo entries per process
+#options SEMMNU=30 # number of undo structures in system
options SYSVSHM # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten. It was done separately.
 1.158 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.157 10-Mar-2001  is - The ioblix zbus board comes in 24 MHz and 22.1184 MHz clock variants.
We default to the (newer, more sane) 22.1184 MHz value, but set it from
the iobzclock variable (in Hz), which is initialized from the IOBZCLOCK
configuration option and patchable.
XXX we should time the clock at system startup.
- add ioblix_zbus to the GENERIC configuration.
 1.156 02-Feb-2001  is branches: 1.156.2;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.155 21-Jan-2001  is - Replace idesc driver by standard wdc attachment.
- Add PCMCIA driver for A1200.
(Both where options already.)
 1.154 29-Dec-2000  is Add name of X-surf Ethernet board. Patch by Petri Koistinen.
 1.153 19-Dec-2000  tsutsui Remove "rnd is EXPERIMENTAL" comments.
 1.152 19-Dec-2000  bouyer Add pseudo-device vlan
 1.151 04-Oct-2000  is Reimplement the INSTALL changes in GENERIC and Makefile.
 1.150 04-Oct-2000  itojun enable rnd device. they are now mandatory for ssh/sshd support,
so it makes more sense to enable it.
please disable them if there's any issues, but in that case, in-tree
ssh/sshd won't work.
 1.149 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.148 13-Aug-2000  itojun move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
 1.147 27-Jul-2000  mason Moving to a default of 64 PTYs.
 1.146 05-Jul-2000  sommerfeld Comment out EON ISO-over-ip tunneling pseudo-driver, and document as
broken/fragile. Unlikely to be of much use, and confuses new users
when their system crashes when they, or their dhclient stumble over
it. See kern/10500, kern/8994 for the gory details.
 1.145 30-Jun-2000  itojun add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
 1.144 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.143 14-Jun-2000  veego branches: 1.143.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.142 19-Apr-2000  itojun branches: 1.142.2;
add stf pseudo interface (commented out due to possible security risks)
 1.141 01-Apr-2000  is Start to define an INSTALL kernel.
 1.140 23-Mar-2000  is Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).
 1.139 29-Feb-2000  simonb Do the "<space><tab>" thing with the RAID_AUTOCONFIG option.
 1.138 26-Feb-2000  oster Defopt 'RAID_AUTOCONFIG'. Adding 'options RAID_AUTOCONFIG' turns on
the component auto-detection and auto-configuration of RAID sets.
Also, add "#options RAID_AUTOCONFIG" to the GENERIC config files.
 1.137 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.136 05-Feb-2000  mhitch Add commented out configuration for MI wdc.
Note: enabling these will cause disk device renumbering if any IDE were
present (i.e. if sd0 was IDE drive 0, that drive will become wd0 and sd0
will be the first real SCSI drive.
 1.135 23-Jan-2000  hubertf Add commented out "ident"-command
 1.134 23-Jan-2000  aymeric add (commented out) PCMCIA devices entries
 1.133 22-Jan-2000  is Tell changers to commit AMIGA and DRACO, too.
 1.132 20-Jan-2000  wrstuden Add overlay to kernel configs.
 1.131 21-Nov-1999  itojun bring in content of GENERIC.v6 into GENERIC.
remove GENERIC.v6 file (as it is part of GENERIC now).

"faith" interface is commented out by default as it is not really for
general use.
IPsec items are commented out as well, though we can enable "options IPSEC"
without export-related issue ("options IPSEC" will enable authentication
portion only). We may need to think about it again.

if you have problem compiling with INET6 on archs I do not have access to,
please contact me.

XXX what to do with arch/arm32/SHARK{,.v6}?
 1.130 15-Nov-1999  fvdl Add commented out option SOFTDEP to all GENERIC kernels.
 1.129 15-Oct-1999  is branches: 1.129.2;
Reboot support for P5PPC+68K boards, compiled in by "options P5PPC68KBOARD".
Without this, at least cyberppc+040 boards won't reboot, but just hang when
down.
The method is similar to what LinuxPPC/APUS does, but without EIEIO.
 1.128 29-Jul-1999  augustss branches: 1.128.2;
It's time to be COMPAT_14.
 1.127 28-Jul-1999  is no gvpbus on DRACO
 1.126 18-Jun-1999  is less views, and comment them
 1.125 18-Jun-1999  is COMPAT_SVR4 does not compile without EXEC_ELF32.
 1.124 17-May-1999  is Allow for more than 1 of ed, es or qn
 1.123 10-May-1999  is Add HyperCom 3+/4+ parallel port support
 1.122 01-May-1999  tron Add ext2 filesystem.
 1.121 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.120 10-Apr-1999  tron Add commented out declaration for "ipip" interfaces.
 1.119 24-Mar-1999  is branches: 1.119.2;
AGA: VGAonly timing (GRF_AGA_VGA), by Adam Ciarcinski
 1.118 09-Mar-1999  is Fix language.
 1.117 09-Mar-1999  is Pacify CPP.
 1.116 09-Mar-1999  is Add an entry for the Cyberstorm Mk. III / CyberstormPPC SCSI driver by
Michael Hitch.
 1.115 28-Feb-1999  is Alas, Melody boards don't configure in a DraCo.
 1.114 04-Feb-1999  is In the future, the AMIGA and DRACO example files will be generated from
GENERIC by make in this directory. This way, they hopefully will stay
up-to-date.
 1.113 15-Dec-1998  itohy Added options COMPAT_LINUX and EXEC_ELF32 as comments
to GENERIC configuration files.
 1.112 28-Nov-1998  is Sorry. Hypercom1 and Hypercom3 code is not yet available.
 1.111 25-Nov-1998  hwr Add (commented out) 'gre' pseudo device line. Feedback is welcome.
Inspired by Klaus Klein.
 1.110 16-Nov-1998  oster Added a (commented out) configuration line for the RAIDframe device driver.
 1.109 11-Nov-1998  veego New driver for the Ariadne II.
 1.108 28-Oct-1998  is Switch the Amiga port to UVM.
 1.107 01-Sep-1998  mhitch Re-enable mfc and msc serial drivers. Both compile, but only mfc is
currently known to work [I can't test the msc changes].
Add commented-out UVM option (until UVM is standard).
 1.106 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.105 11-Apr-1998  is Make ser.c compile again (preliminary release). It needs still a lot of
cleanup, but at least mainstream usage should be possible again (worked
for me 5 minutes ago).
 1.104 07-Apr-1998  is ser.c, mfc.c and msc.c dont compile currently.
 1.103 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.102 18-Mar-1998  bouyer Add commented out "options FFS_EI"
 1.101 22-Feb-1998  is Actually fix, rather than mask, the Amiga big machine panic: the pmap needs
to (pre)allocate enough kernel page table pages to (among others) map the
buffer cache buffers.
 1.100 17-Feb-1998  is Cosmetics. Pointed out by Matthias Scheler.
 1.99 09-Feb-1998  is Add the LIMITMEM workaround for the kernel address space size problem.
Will be removed as soon as the kernel can auto-adapt to its address space.
 1.98 05-Feb-1998  is Get rid of std.draco file.
Amiga specific devices must be named in GENERIC, too.
While here, add vnd pseudo-devices to DRACO.
 1.97 01-Dec-1997  kleink Add COMPAT_13.
 1.96 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.95 02-Nov-1997  chopps make GENERIC more generic
 1.94 29-Oct-1997  veego Remove the unsuported options COMPAT_HPUX.
Enable COMAPT_09 and COMPAT_10 for old binaries.
Enable the console options for the CyberVision 64/3D and fix a typo for
ite7.
 1.93 19-Oct-1997  veego branches: 1.93.2;
Add CyberVision 64/3D support.
 1.92 18-Oct-1997  is Driver for the VMC HyperCom3/zbus and the VMC HyperCom4.
lpt on HyperCom3 isn't supported yet.
 1.91 16-Oct-1997  is TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c
 1.90 10-Oct-1997  mhitch The Blizzard-IV SCSI driver is now separate from the Blizzard-II.
 1.89 04-Oct-1997  mhitch Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.88 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.87 19-Sep-1997  mhitch Enable the 800x600 Super72 display mode in the generic kernel.
 1.86 12-Sep-1997  mycroft Move definition of FPCOPROC into the Makefile, since it's always required.
 1.85 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.84 23-Aug-1997  mjacob add a before tab to SCSIVERBOSE
 1.83 20-Aug-1997  mjacob add commented out reference SCSIVERBOSE option
 1.82 19-Aug-1997  augustss Change the MI audio driver so it attaches to the MD driver in the
normal way. This requires adding a line to the config files to
get audio to work again.
 1.81 19-Jul-1997  is branches: 1.81.2;
Make Amiga battery clocks autoconfiguration devices, so that they can be
left out of specialized configurations.
 1.80 17-Jul-1997  is Make the DraCo hardware clock an autoconfiguration device.
 1.79 16-Jul-1997  is Amiga glue code for the m68k fpu emulation subsystem.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
 1.78 06-Jul-1997  is Implement the RTC_OFFSET kernel option/rtc_offset variable for the Amiga port.
To get the old behaviour, set options RTC_OFFSET=0 in your kernel configuration
file.
 1.77 16-Jun-1997  is Add option BB060STUPIDROM, which makes the early kernel startup probe for
an 68060/68LC060, possibly switching on the 68060 FPU, instead of trusting
the value passed from the ROM OS to us by the bootblock.

Most 68060 boards, unlike the DraCo (which seems to have heavily patched OS
ROMs) don't set the AMIGA_68060 flag; instead, upon detecting an 68060, its
FPU is disabled to make the ROM scheduler work, and at a much later time (at
least, later than bootblock booting time), the "68060.library" installs the
Motorola 68060 software support, patches the scheduler for the 68060 FPU, and
re-enables the FPU.

Maybe this will be fixed one day, if Amiga International sells upgraded OS
ROMs which know about the 68060. Until then, and for legacy machines, this
kludge is needed if we want to boot a non-DraCo 68060.

Btw, thats why this is NOT in std.amiga, but in GENERIC; the DRACO
configuration doesn't need it (and I still plan to make std.draco go away).
 1.76 14-Jun-1997  is Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.75 25-May-1997  veego - Add and change some comments and options.
- Use 'options<SPACE><TAB>...'
 1.74 30-Mar-1997  is The DraCo has had a com driver for quite a while.
 1.73 27-Mar-1997  veego Remove the ae entries for the Ariadne, it's now supported bye the le driver
 1.72 18-Feb-1997  mrg comment PFIL_HOOKS as it is redundant (as an option) when used with ipfilter.
 1.71 31-Jan-1997  mhitch branches: 1.71.4;
"options GENERIC" is obsolute.
 1.70 31-Jan-1997  thorpej Adopt for new file system and root spec grammar.
 1.69 17-Jan-1997  is Fix PR 3090. While here, fix two other comments.
 1.68 15-Jan-1997  perry Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
 1.67 07-Jan-1997  mrg branches: 1.67.2;
use pseudo-device ipfilter, not ipl.
 1.66 06-Jan-1997  veego Add PFIL_HOOKS and NSIP.
 1.65 05-Jan-1997  veego add a ipl pseudo-device.
 1.64 20-Dec-1996  veego - Move SWAPPAGER, VNODEPAGER and DEVPAGER to std.amiga.
- Remove not working KGDB.
- Add a warning for KBDRESET.
- Add ch and uk devices.
 1.63 16-Dec-1996  is The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.62 26-Oct-1996  is enable bznsc driver
 1.61 21-Oct-1996  veego include update for config(8)
increase the number of bpfilters to 16
 1.60 26-Aug-1996  mrg add COMPAT_12.
 1.59 11-Aug-1996  veego Bring in changes from the 1.2 branch which where only in the release
 1.58 11-Aug-1996  veego Disable the Hardwarecursor on the RetinaZ3 to solve the problems with
wrong mouse jumps under X11.
Remove the not working options KGDB from DRACO and GENERIC and added
an option to enable the HWC for the RetinaZ3
 1.57 19-May-1996  veego branches: 1.57.4;
GENERIC - added scsi scanner entry
- enable MS-DOS file system support
- removed unsed GRF_CL5426 entry
- added new graphics driver (grf6) for oMniBus, Domino and Merlin
 1.56 30-Apr-1996  is Give example for INSECURE option in the GENERIC config file in a comment.
Closes PR 2355 giving a different explanation of the option than proposed.
 1.55 27-Apr-1996  veego Fixed a compile bug which come from the new mouse driver
Remove the fd* entry from the GENERIC config and changed the std.amiga
entry for the floppy
 1.54 21-Apr-1996  veego Added support for multiple floppy drives
Added entry for the emplant scsi driver
 1.53 05-Mar-1996  veego ups, ite5 is at grf5 and not at grf4
 1.52 02-Mar-1996  veego Updated for the new CyberVision64 console
and a small cleanup in the GENERIC config
 1.51 24-Feb-1996  chopps cleanup, add (commented-out) serial buffer and lev6_defer options
 1.50 28-Jan-1996  chopps add UNION/UMAPFS accepts CR 1890
 1.49 27-Dec-1995  chopps add vnd (pr#1744) from Robert Leland
 1.48 09-Oct-1995  chopps revert last commits was a mistake
 1.47 09-Oct-1995  chopps add prototypes for isr stuff fixes pr# 1284 and 1569
 1.46 09-Oct-1995  chopps new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.45 07-Oct-1995  chopps new quicknet ethernet driver from Kortelainen Mika <k125374@cs.tut.fi>
 1.44 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.43 30-Sep-1995  chopps add arcnet device, (pr#1148)
 1.42 30-Sep-1995  chopps changes for msc device
 1.41 20-Aug-1995  chopps small cleanup
 1.40 20-Aug-1995  chopps change state (and rename) RH 64BIT option. Add ccd to COFFEE
 1.39 19-Aug-1995  chopps add more grful stuff
 1.38 18-Aug-1995  chopps new Ariadne driver from Bernd Ernesti <bernd@arresum.inka.de>
 1.37 12-May-1995  chopps added flsc and bzsc.
 1.36 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.35 06-Apr-1995  chopps add new option to enable faster (and on some boards non-working) scroll
code for retina grahpics cards.
 1.34 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.33 02-Mar-1995  chopps enable tun support.
 1.32 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.31 03-Feb-1995  chopps comment out fastlane driver.
 1.30 28-Dec-1994  chopps support some newer stuff and some cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.29 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.28 26-Oct-1994  cgd new RCS ID format.
 1.27 08-Oct-1994  chopps branches: 1.27.2;
fix typo and add 4091 controller
 1.26 31-Jul-1994  chopps GENERIC has AGA, otherwise some people can't run (i.e. monitors do not sync
at 15KHz).
 1.25 31-Jul-1994  chopps remove hardcoded targets for sd0-7 now use sd*.
 1.24 18-Jul-1994  chopps enable CD9660, and remove DEBUG.
 1.23 16-Jul-1994  chopps add ed0 to GENERIC config.
 1.22 29-Jun-1994  chopps branches: 1.22.2;
aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.21 21-Jun-1994  chopps add ethernet driver to GENERIC and remove now uneeded ETHER options
 1.20 20-Jun-1994  chopps make smaller remove lots of networking options
 1.19 17-Jun-1994  chopps add back adosfs
 1.18 15-Jun-1994  chopps include more device .h files, update Makefile.amiga to use new
vnode_if.x gerating procedure
 1.17 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.16 05-Jun-1994  chopps forgot to add RETINACONSOLE option
 1.15 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.14 02-Jun-1994  chopps define cpu type options
 1.13 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 22-May-1994  chopps lowercase options in files.amiga.newconf required, remove SYS* for now
from GENERIC and remove old configs that serve no current purpose.
 1.11 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 21-May-1994  chopps bye MAXFDESCS
 1.9 16-May-1994  chopps remove SYSVSHM
 1.8 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.7 11-May-1994  chopps compile genassym static and add adosfs to GENERIC
 1.6 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.5 22-Apr-1994  chopps add commented out options for selecting font.
 1.4 18-Apr-1994  chopps add A3000 (we use it in snapshot) and commented GENERIC. (pretty heafty)
 1.3 15-Apr-1994  chopps add COMPAT_09
 1.2 12-Apr-1994  chopps vmunix? no, we are netbsd.
 1.1 14-Mar-1994  chopps more generic generic files.
 1.22.2.3 03-Aug-1994  cgd from trunk.
 1.22.2.2 18-Jul-1994  cgd update from trunk, per chopps
 1.22.2.1 16-Jul-1994  cgd update from trunk, per chopps
 1.27.2.2 08-Oct-1994  chopps fix typo and add 4091 controller
 1.27.2.1 08-Oct-1994  chopps file GENERIC was added on branch netbsd-1-0 on 1994-10-08 09:53:16 +0000
 1.57.4.4 06-Sep-1996  jtc Pulled up rev 1.59 by request from Bernd Ernesti
 1.57.4.3 04-Jun-1996  is Forgot to attach a scsibus to drsc0 in my earlier addition. (Yes, I really
should have first *really* tested it).
 1.57.4.2 04-Jun-1996  is We need the DraCo onboard scsi, too.
 1.57.4.1 30-May-1996  is Add Motorola 68060 and DraCo support to GENERIC and INSTALL, now that
dual machine kernels have been tested, and clean up DRACO a bit.
 1.67.2.3 30-Jan-1997  thorpej update from trunk
 1.67.2.2 18-Jan-1997  thorpej Update from trunk.
 1.67.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.71.4.1 11-Mar-1997  is merge in changes from Trunk.
 1.81.2.6 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.81.2.5 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.81.2.4 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.81.2.3 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.81.2.2 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.81.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.93.2.5 10-May-1998  mycroft Undo part of the previous pullup, per request of chopps.
 1.93.2.4 08-May-1998  mycroft Pull up 1.101, per request of is.
 1.93.2.3 10-Feb-1998  mellon Pull up 1.99 (is)
 1.93.2.2 02-Nov-1997  mellon Pull rev 1.95 up from trunk (chopps)
 1.93.2.1 30-Oct-1997  mellon Pull rev 1.94 up from trunk (veego)
 1.119.2.7 05-Jul-2000  he Pull up revision 1.146 (requested by sommerfeld):
Comment out EON ISO-over-ip tunneling pseudo-driver, and document
as broken/fragile. Unlikely to be of much use, and confuses new
users when their system crashes when they, or their dhclient
stumble over it. See PR#10500 and PR#8994 for the gory details.
 1.119.2.6 03-Jun-2000  he Apply patch (requested by he):
Disable the UNION file system, to avoid a repeat of the 1.4.1
and 1.4.2 LAST_MINUTE changes. It is reportedly buggy, and can
be used by ordinary users to crash the system.
 1.119.2.5 04-Feb-2000  he Pull up revision 1.129 (requested by is):
Add reboot code for Phase5 68040+PPC boards.
 1.119.2.4 15-Jan-2000  he Apply patch (requested by abs):
Add commented-out ext2fs entries.
 1.119.2.3 18-Jun-1999  perry pullup 1.123->1.124 (is): Allow more than one ed,ed or qn i/f
 1.119.2.2 18-Jun-1999  perry pullup 1.122->1.123 (is): Support for HyperCom 3+/4+ lpt ports
 1.119.2.1 12-Apr-1999  tron branches: 1.119.2.1.2; 1.119.2.1.4;
Pull up revision 1.120:
Add commented out declaration for "ipip" interfaces.
 1.119.2.1.4.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.119.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.119.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.128.2.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.128.2.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.129.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.129.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.129.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.129.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.142.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.143.2.6 01-May-2001  he Pull up revision 1.152 (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.143.2.5 25-Jan-2001  jhawk Pull up revision 1.154 (requested by is):
Correct and add (Respectively) the name of the X-surf board in comments.
 1.143.2.4 04-Oct-2000  itojun pullup (approved by releng-1-5)

enable rnd device. they are now mandatory for ssh/sshd support,
so it makes more sense to enable it.
please disable them if there's any issues, but in that case, in-tree
ssh/sshd won't work.

cvs rdiff -r1.166 -r1.167 syssrc/sys/arch/alpha/conf/GENERIC
cvs rdiff -r1.149 -r1.150 syssrc/sys/arch/amiga/conf/GENERIC
cvs rdiff -r1.11 -r1.12 syssrc/sys/arch/arm26/conf/GENERIC
cvs rdiff -r1.72 -r1.73 syssrc/sys/arch/atari/conf/GENERIC
cvs rdiff -r1.60 -r1.61 syssrc/sys/arch/hp300/conf/GENERIC
cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/luna68k/conf/GENERIC
cvs rdiff -r1.35 -r1.36 syssrc/sys/arch/next68k/conf/GENERIC
cvs rdiff -r1.32 -r1.33 syssrc/sys/arch/ofppc/conf/GENERIC
cvs rdiff -r1.73 -r1.74 syssrc/sys/arch/sun3/conf/GENERIC
cvs rdiff -r1.80 -r1.81 syssrc/sys/arch/vax/conf/GENERIC
cvs rdiff -r1.52 -r1.53 syssrc/sys/arch/x68k/conf/GENERIC
 1.143.2.3 11-Aug-2000  mason Move to default of 64 PTYs in GENERIC kernel config.
Requested by mason, approved by jhawk.
 1.143.2.2 06-Jul-2000  sommerfeld Comment out EON ISO-over-ip tunneling pseudo-driver, and document as
broken/fragile. Unlikely to be of much use, and confuses new users
when their system crashes when they, or their dhclient stumble over
it. See kern/10500, kern/8994 for the gory details.
[pull up approved by thorpej]
 1.143.2.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.156.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.156.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.160.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.160.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.160.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.160.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.160.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.160.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.160.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.162.6.10 11-Dec-2002  thorpej Sync with HEAD.
 1.162.6.9 11-Nov-2002  nathanw Catch up to -current
 1.162.6.8 18-Oct-2002  nathanw Catch up to -current.
 1.162.6.7 01-Aug-2002  nathanw Catch up to -current.
 1.162.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.162.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.162.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.162.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.162.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.162.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:22:57 +0000
 1.179.4.3 24-Oct-2002  lukem Pull up upgrade to IPfilter 3.4.29 (requested by martti in ticket #905).
Affected files & revisions:

dist/ipf/HISTORY 1.14
dist/ipf/fils.c 1.17-1.21
dist/ipf/ipf.c 1.11-1.13
dist/ipf/ipfs.c 1.8-1.10
dist/ipf/ipft_ef.c 1.6-1.7
dist/ipf/ipft_td.c 1.6-1.7
dist/ipf/ipft_tx.c 1.7-1.8
dist/ipf/ipmon.c 1.12-1.17
dist/ipf/ipnat.c 1.11-1.12
dist/ipf/ipsend/ip_var.h 1.2
dist/ipf/ipsend/ipsend.c 1.8
dist/ipf/ipsend/iptests.c 1.5
dist/ipf/ipt.c 1.8-1.10
dist/ipf/kmem.c 1.8-1.10
dist/ipf/man/ipf.4 1.10
dist/ipf/man/ipf.5 1.8
dist/ipf/man/ipftest.1 1.3
dist/ipf/man/ipmon.8 1.10
dist/ipf/man/ipnat.5 1.9-1.10
dist/ipf/man/ipnat.8 1.4
dist/ipf/misc.c 1.7
dist/ipf/natparse.c 1.10
dist/ipf/parse.c 1.13
dist/ipf/printnat.c 1.8-1.10
dist/ipf/relay.c 1.5-1.6
dist/ipf/rules/example.9 1.2
etc/rc.d/ipnat 1.8
regress/sys/kern/ipf/Makefile 1.3-1.4
regress/sys/kern/ipf/dotest6 1.2
regress/sys/kern/ipf/expected/f13 1.1.1.2
regress/sys/kern/ipf/expected/i12 1.1.1.1
regress/sys/kern/ipf/expected/ni3 1.1.1.1
regress/sys/kern/ipf/expected/ni5 1.2
regress/sys/kern/ipf/input/f13 1.1.1.2
regress/sys/kern/ipf/input/ipv6.1 1.1.1.1
regress/sys/kern/ipf/input/ni3 1.1.1.1
regress/sys/kern/ipf/regress/i12 1.1.1.1
regress/sys/kern/ipf/regress/ipv6.1 1.1.1.1
regress/sys/kern/ipf/regress/ni3.ipf 1.1.1.1
regress/sys/kern/ipf/regress/ni3.nat 1.1.1.1
sys/arch/alpha/conf/ALPHA 1.169,1.171
sys/arch/amiga/conf/GENERIC 1.185-1.186
sys/arch/arc/conf/GENERIC 1.71-1.72
sys/arch/atari/conf/GENERIC.in 1.24-1.25
sys/arch/cats/conf/GENERIC 1.31-1.32
sys/arch/cobalt/conf/GENERIC 1.34-1.35
sys/arch/hp300/conf/GENERIC 1.83-1.84
sys/arch/i386/conf/CARDBUS 1.66-1.67
sys/arch/i386/conf/GENERIC 1.510,1.512
sys/arch/i386/conf/GENERIC_LAPTOP 1.58-1.59
sys/arch/i386/conf/GENERIC_PS2TINY 1.19-1.20
sys/arch/i386/conf/GENERIC_TINY 1.47-1.48
sys/arch/luna68k/conf/GENERIC 1.33-1.33
sys/arch/mac68k/conf/GENERIC 1.130-1.131
sys/arch/mac68k/conf/GENERICSBC 1.21-1.22
sys/arch/mac68k/conf/SMALLRAM 1.4-1.5
sys/arch/macppc/conf/GENERIC 1.142-1.143
sys/arch/mipsco/conf/GENERIC 1.21-1.22
sys/arch/mmeye/conf/GENERIC 1.44-1.45
sys/arch/news68k/conf/GENERIC 1.36-1.37
sys/arch/news68k/conf/GENERIC_TINY 1.18-1.19
sys/arch/newsmips/conf/GENERIC 1.50-1.51
sys/arch/ofppc/conf/GENERIC 1.56-1.57
sys/arch/pmax/conf/GENERIC 1.103-1.104
sys/arch/prep/conf/GENERIC 1.55-1.56
sys/arch/sbmips/conf/GENERIC 1.11-1.12
sys/arch/sgimips/conf/GENERIC 1.7-1.8
sys/arch/sparc/conf/GENERIC 1.138-1.139
sys/arch/sparc64/conf/GENERIC32 1.46-1.47
sys/arch/vax/conf/GENERIC 1.102-1.103
sys/arch/x68k/conf/ALL 1.55-1.56
sys/arch/x68k/conf/GENERIC 1.80-1.81
sys/lkm/netinet/if_ipl/mln_ipl.c 1.29
sys/netinet/fil.c 1.57-1.58
sys/netinet/ip_auth.c 1.29-1.30
sys/netinet/ip_compat.h 1.30-1.31
sys/netinet/ip_fil.c 1.81-1.86
sys/netinet/ip_fil.h 1.46-1.49
sys/netinet/ip_frag.c 1.33-1.34
sys/netinet/ip_frag.h 1.18
sys/netinet/ip_ftp_pxy.c 1.25-1.26
sys/netinet/ip_h323_pxy.c 1.5-1.6
sys/netinet/ip_log.c 1.22-1.23
sys/netinet/ip_nat.c 1.51-1.53
sys/netinet/ip_nat.h 1.27
sys/netinet/ip_netbios_pxy.c 1.4
sys/netinet/ip_proxy.c 1.35-1.36
sys/netinet/ip_proxy.h 1.18
sys/netinet/ip_state.c 1.41-1.42
sys/netinet/ip_state.h 1.23
sys/netinet/ipl.h 1.14
 1.179.4.2 01-Aug-2002  lukem Pull up revision 1.181 (requested by lukem in ticket #312):
Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
 1.179.4.1 30-May-2002  tv Pull up revision 1.180 (requested by thorpej in ticket #95):
Tweak a comment so that it doens't turn into a trigraph if
the config file is included in the kernel source.
 1.179.2.2 16-Jul-2002  gehenna catch up with -current.
 1.179.2.1 09-Jul-2002  gehenna catch up with -current.
 1.195.2.11 11-Dec-2005  christos Sync with head.
 1.195.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.195.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.195.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.195.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.195.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.195.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.195.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.195.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.195.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.195.2.1 03-Aug-2004  skrll Sync with HEAD
 1.200.2.5 11-Aug-2007  bouyer Regen for ticket 11356
 1.200.2.4 11-Aug-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11356):
sys/arch/acorn32/conf/GENERIC 1.80 via patch
sys/arch/amd64/conf/GENERIC 1.154 via patch
sys/arch/amiga/conf/GENERIC.in 1.61 via patch
sys/arch/arc/conf/GENERIC 1.148 via patch
sys/arch/atari/conf/GENERIC.in 1.68 via patch
sys/arch/cats/conf/GENERIC 1.116 via patch
sys/arch/hp300/conf/GENERIC 1.141 via patch
sys/arch/hp700/conf/GENERIC patch
sys/arch/i386/conf/GENERIC 1.840 via patch
sys/arch/i386/conf/GENERIC_LAPTOP 1.239 via patch
sys/arch/i386/conf/GENERIC.MPACPI patch
sys/arch/mac68k/conf/GENERIC 1.182 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x 1.68 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x 1.66 via patch
sys/arch/sparc/conf/GENERIC 1.200 via patch
sys/arch/sparc64/conf/GENERIC32 patch
sys/arch/xen/conf/GENERIC patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.200.2.3 15-Jul-2004  he branches: 1.200.2.3.2; 1.200.2.3.4;
Pull up regenerated files (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.200.2.2 02-Jul-2004  he Pull up regenerated files (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.200.2.1 30-Jun-2004  jdc Pull up revision 1.203 (requested by abs in ticket #567).

Regenerate from master config files
 1.200.2.3.4.2 11-Aug-2007  bouyer regen for ticket 11356
 1.200.2.3.4.1 11-Aug-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11356):
sys/arch/acorn32/conf/GENERIC 1.80 via patch
sys/arch/amd64/conf/GENERIC 1.154 via patch
sys/arch/amiga/conf/GENERIC.in 1.61 via patch
sys/arch/arc/conf/GENERIC 1.148 via patch
sys/arch/atari/conf/GENERIC.in 1.68 via patch
sys/arch/cats/conf/GENERIC 1.116 via patch
sys/arch/hp300/conf/GENERIC 1.141 via patch
sys/arch/hp700/conf/GENERIC patch
sys/arch/i386/conf/GENERIC 1.840 via patch
sys/arch/i386/conf/GENERIC_LAPTOP 1.239 via patch
sys/arch/i386/conf/GENERIC.MPACPI patch
sys/arch/mac68k/conf/GENERIC 1.182 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x 1.68 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x 1.66 via patch
sys/arch/sparc/conf/GENERIC 1.200 via patch
sys/arch/sparc64/conf/GENERIC32 patch
sys/arch/xen/conf/GENERIC patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.200.2.3.2.1 11-Aug-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11356):
sys/arch/acorn32/conf/GENERIC 1.80 via patch
sys/arch/amd64/conf/GENERIC 1.154 via patch
sys/arch/amiga/conf/GENERIC.in 1.61 via patch
sys/arch/arc/conf/GENERIC 1.148 via patch
sys/arch/atari/conf/GENERIC.in 1.68 via patch
sys/arch/cats/conf/GENERIC 1.116 via patch
sys/arch/hp300/conf/GENERIC 1.141 via patch
sys/arch/hp700/conf/GENERIC patch
sys/arch/i386/conf/GENERIC 1.840 via patch
sys/arch/i386/conf/GENERIC_LAPTOP 1.239 via patch
sys/arch/i386/conf/GENERIC.MPACPI patch
sys/arch/mac68k/conf/GENERIC 1.182 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x 1.68 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x 1.66 via patch
sys/arch/sparc/conf/GENERIC 1.200 via patch
sys/arch/sparc64/conf/GENERIC32 patch
sys/arch/xen/conf/GENERIC patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.207.2.1 29-Apr-2005  kent sync with -current
 1.208.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.208.2.1 12-Feb-2005  yamt sync with head.
 1.214.2.4 28-Aug-2007  ghen Pull up following revision(s) (requested by adrianp in ticket #1826):
sys/arch/hp300/conf/GENERIC: revision 1.141 via patch
sys/arch/amd64/conf/GENERIC: revision 1.154 via patch
sys/arch/cats/conf/GENERIC: revision 1.116 via patch
sys/arch/arc/conf/GENERIC: revision 1.148 via patch
sys/arch/acorn32/conf/GENERIC: revision 1.80 via patch
sys/arch/sparc/conf/GENERIC: revision 1.200 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.88 via patch
sys/arch/atari/conf/GENERIC.in: revision 1.68 via patch
sys/arch/amiga/conf/GENERIC: revision 1.248 via patch
sys/arch/i386/conf/GENERIC.MPACPI: patch
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66 via patch
sys/arch/i386/conf/GENERIC: revision 1.840 via patch
sys/arch/amiga/conf/GENERIC.in: revision 1.61 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68 via patch
sys/arch/mac68k/conf/GENERIC: revision 1.182 via patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net&#64;
Ok'ed by core&#64;
 1.214.2.3 05-Nov-2005  tron branches: 1.214.2.3.2; 1.214.2.3.4;
Regen for ticket #929.
 1.214.2.2 14-Aug-2005  riz Pull up revision 1.221 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.214.2.1 18-Jul-2005  riz Pull up revision 1.220 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.214.2.3.4.1 28-Aug-2007  ghen Pull up following revision(s) (requested by adrianp in ticket #1826):
sys/arch/hp300/conf/GENERIC: revision 1.141 via patch
sys/arch/amd64/conf/GENERIC: revision 1.154 via patch
sys/arch/cats/conf/GENERIC: revision 1.116 via patch
sys/arch/arc/conf/GENERIC: revision 1.148 via patch
sys/arch/acorn32/conf/GENERIC: revision 1.80 via patch
sys/arch/sparc/conf/GENERIC: revision 1.200 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.88 via patch
sys/arch/atari/conf/GENERIC.in: revision 1.68 via patch
sys/arch/amiga/conf/GENERIC: revision 1.248 via patch
sys/arch/i386/conf/GENERIC.MPACPI: patch
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66 via patch
sys/arch/i386/conf/GENERIC: revision 1.840 via patch
sys/arch/amiga/conf/GENERIC.in: revision 1.61 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68 via patch
sys/arch/mac68k/conf/GENERIC: revision 1.182 via patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.214.2.3.2.1 28-Aug-2007  ghen Pull up following revision(s) (requested by adrianp in ticket #1826):
sys/arch/hp300/conf/GENERIC: revision 1.141 via patch
sys/arch/amd64/conf/GENERIC: revision 1.154 via patch
sys/arch/cats/conf/GENERIC: revision 1.116 via patch
sys/arch/arc/conf/GENERIC: revision 1.148 via patch
sys/arch/acorn32/conf/GENERIC: revision 1.80 via patch
sys/arch/sparc/conf/GENERIC: revision 1.200 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.88 via patch
sys/arch/atari/conf/GENERIC.in: revision 1.68 via patch
sys/arch/amiga/conf/GENERIC: revision 1.248 via patch
sys/arch/i386/conf/GENERIC.MPACPI: patch
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66 via patch
sys/arch/i386/conf/GENERIC: revision 1.840 via patch
sys/arch/amiga/conf/GENERIC.in: revision 1.61 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68 via patch
sys/arch/mac68k/conf/GENERIC: revision 1.182 via patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.219.2.4 21-Jan-2008  yamt sync with head
 1.219.2.3 03-Sep-2007  yamt sync with head.
 1.219.2.2 30-Dec-2006  yamt sync with head.
 1.219.2.1 21-Jun-2006  yamt sync with head.
 1.232.4.1 09-Sep-2006  rpaulo sync with head
 1.232.2.1 18-Feb-2006  yamt sync with head.
 1.234.2.1 22-Apr-2006  simonb Sync with head.
 1.236.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.236.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.236.2.3 03-Sep-2006  yamt sync with head.
 1.236.2.2 11-Aug-2006  yamt sync with head
 1.236.2.1 01-Apr-2006  yamt sync with head.
 1.237.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.239.2.2 22-Sep-2006  riz Regen for ticket #170
 1.239.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.242.4.1 10-Dec-2006  yamt sync with head.
 1.242.2.1 18-Nov-2006  ad Sync with head.
 1.244.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.244.16.2 03-Oct-2007  garbled Sync with HEAD
 1.244.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.244.10.1 11-Jul-2007  mjf Sync with head.
 1.244.8.2 20-Aug-2007  ad Sync with HEAD.
 1.244.8.1 09-Jun-2007  ad Sync with head.
 1.244.2.3 25-Aug-2007  liamjfoy Pull up following revision(s) (requested by adrianp in ticket #820):
sys/arch/hp300/conf/GENERIC: revision 1.141
sys/arch/alpha/conf/GENERIC: revision 1.315
sys/arch/amd64/conf/GENERIC: revision 1.154
sys/arch/cats/conf/GENERIC: revision 1.116
sys/arch/arc/conf/GENERIC: revision 1.148
sys/arch/acorn32/conf/GENERIC: revision 1.80
sys/arch/sparc/conf/GENERIC: revision 1.200
sys/arch/sparc64/conf/GENERIC: revision 1.88
sys/arch/atari/conf/GENERIC.in: revision 1.68
sys/arch/amiga/conf/GENERIC: revision 1.248
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66
sys/arch/i386/conf/GENERIC: revision 1.840
sys/arch/amiga/conf/GENERIC.in: revision 1.61
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68
sys/arch/mac68k/conf/GENERIC: revision 1.182
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.244.2.2 06-Jun-2007  bouyer Regen for ticket 699.
 1.244.2.1 05-Jun-2007  bouyer Pull up following revision(s) (requested by martin in ticket #699):
sys/arch/hpcmips/conf/GENERIC: revision 1.196
sys/arch/hp700/conf/GENERIC: revision 1.74
sys/arch/i386/conf/GENERIC: revision 1.831
sys/arch/next68k/conf/GENERIC: revision 1.108
sys/arch/alpha/conf/GENERIC: revision 1.313
sys/arch/arc/conf/GENERIC: revision 1.146
sys/arch/cats/conf/GENERIC: revision 1.115
sys/arch/ews4800mips/conf/GENERIC: revision 1.18
sys/arch/landisk/conf/GENERIC: revision 1.8 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.85
sys/arch/pmax/conf/GENERIC: revision 1.152
sys/arch/iyonix/conf/GENERIC: revision 1.38 via patch
sys/arch/amiga/conf/GENERIC: revision 1.245
sys/arch/vax/conf/GENERIC: revision 1.157
sys/arch/prep/conf/GENERIC: revision 1.135
sys/arch/pc532/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.61
sys/arch/mipsco/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.108
sys/arch/ofppc/conf/GENERIC: revision 1.98
sys/arch/amd64/conf/GENERIC: revision 1.148
sys/arch/acorn26/conf/GENERIC: revision 1.50
sys/arch/dreamcast/conf/GENERIC: revision 1.78
sys/arch/mac68k/conf/GENERIC: revision 1.181
sys/arch/hp300/conf/GENERIC: revision 1.139
sys/arch/mmeye/conf/GENERIC: revision 1.88
sys/arch/news68k/conf/GENERIC: revision 1.88
sys/arch/mvme68k/conf/GENERIC: revision 1.71
sys/arch/acorn32/conf/GENERIC: revision 1.79
sys/arch/sparc/conf/GENERIC: revision 1.199
sys/arch/luna68k/conf/GENERIC: revision 1.78
sys/arch/bebox/conf/GENERIC: revision 1.105
sys/arch/macppc/conf/GENERIC: revision 1.256 via patch
sys/arch/x68k/conf/GENERIC: revision 1.134
sys/arch/sun3/conf/GENERIC: revision 1.138
sys/arch/newsmips/conf/GENERIC: revision 1.98
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.247.8.2 03-Sep-2007  jmcneill Sync with HEAD.
 1.247.8.1 09-Aug-2007  jmcneill Sync with HEAD.
 1.247.4.2 03-Sep-2007  skrll Sync with HEAD.
 1.247.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.247.2.1 07-Aug-2007  matt Sync with HEAD.
 1.250.2.2 09-Jan-2008  matt sync with HEAD
 1.250.2.1 06-Nov-2007  matt sync with HEAD
 1.251.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.251.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.252.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.252.16.1 19-Oct-2008  haad Sync with HEAD.
 1.252.12.2 10-Oct-2008  skrll Sync with HEAD.
 1.252.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.252.10.3 11-Aug-2010  yamt sync with head.
 1.252.10.2 11-Mar-2010  yamt sync with head
 1.252.10.1 04-May-2009  yamt sync with head.
 1.252.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.252.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.256.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.260.4.3 21-Apr-2011  rmind sync with head
 1.260.4.2 05-Mar-2011  rmind sync with head
 1.260.4.1 30-May-2010  rmind sync with head
 1.260.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.260.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.265.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.265.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.274.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.274.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.274.2.3 30-Oct-2012  yamt sync with head
 1.274.2.2 23-May-2012  yamt sync with head.
 1.274.2.1 17-Apr-2012  yamt sync with head
 1.275.2.4 02-Jun-2012  mrg sync to latest -current.
 1.275.2.3 29-Apr-2012  mrg sync to latest -current.
 1.275.2.2 11-Mar-2012  mrg sync to latest -current
 1.275.2.1 18-Feb-2012  mrg merge to -current.
 1.284.8.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.284.6.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.284.2.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.289.2.6 03-Dec-2017  jdolecek fix back some more incorrect sync
 1.289.2.5 03-Dec-2017  jdolecek update from HEAD
 1.289.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.289.2.3 23-Jun-2013  tls resync from head
 1.289.2.2 25-Feb-2013  tls resync with head
 1.289.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.302.2.2 18-May-2014  rmind sync with head
 1.302.2.1 28-Aug-2013  rmind sync with head
 1.305.2.1 10-Aug-2014  tls Rebase.
 1.307.2.3 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.307.2.2 18-Nov-2014  snj branches: 1.307.2.2.2; 1.307.2.2.6;
Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.307.2.1 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.307.2.2.6.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.307.2.2.2.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.311.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.311.2.2 28-Aug-2017  skrll Sync with HEAD
 1.311.2.1 05-Feb-2017  skrll Sync with HEAD
 1.314.8.2 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.314.8.1 31-Aug-2017  bouyer apply paych, requested by maxv in ticket #237:
sys/arch/amiga/conf/DRACO patch
sys/arch/amiga/conf/GENERIC patch
sys/arch/amiga/conf/GENERIC.in patch
sys/arch/i386/conf/ALL patch
sys/arch/i386/conf/GENERIC patch
sys/arch/i386/conf/XEN3_DOM0 patch
sys/arch/i386/conf/XEN3_DOMU patch
sys/arch/sparc/conf/GENERIC patch
sys/arch/sparc/conf/KRUPS patch
sys/arch/sparc/conf/MRCOFFEE patch
sys/arch/sparc/conf/TADPOLE3GX patch
sys/arch/sparc64/conf/GENERIC patch
sys/arch/sparc64/conf/NONPLUS64 patch
sys/kern/kern_exec.c patch

Disables compat_svr4 and compat_svr4_32 on each architecture,
and removes the associated module autoload entries.
 1.320.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.320.4.1 10-Jun-2019  christos Sync with HEAD
 1.320.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.320.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.331.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 14-Mar-1994  mycroft Clean up deleted files.
 1.3 09-Mar-1994  ws Make FFS optional
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.152 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.151 12-Feb-2023  abs Add optoion GENERIC.local include to the end of ~all GENERIC configs

This excludes atari, sgimips, evbmips, evbppc, evbsh3, and hpcarm
all of which have somewhat specific kernel config file layouts
 1.150 07-Aug-2022  simonb UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.
 1.149 29-May-2022  andvar s/littel/little/ mainly in copy pasted comments.
 1.148 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.147 26-Oct-2020  rin branches: 1.147.2;
Build in full debug symbols by default.
 1.146 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.145 10-Aug-2020  rin Add -fno-omit-frame-pointer to m68k kernels with DDB for backtraces.
-omit-frame-pointer is enabled for -O1 and higher for GCC8 by default.
 1.144 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.143 25-Mar-2020  jdolecek remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
 1.142 26-May-2019  sevan The config files supported by this port are regened from this template.
Apply the changes which I previously made directly to the config files by
mistake.
 1.141 13-Apr-2019  isaki Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
 1.140 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.139 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.138 05-Feb-2018  maxv branches: 1.138.2; 1.138.4;
Nuke DIRECTED_BROADCAST, it is not documented and not enabled anywhere. It
probably wouldn't have built correctly anyway, since there is no associated
defflag.

These ten lines of code in ip_input.c already look a lot better.
 1.137 23-Jan-2018  sevan Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.136 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.135 13-Sep-2017  sevan Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
 1.134 30-Jul-2017  maxv Disable svr4 and svr4_32 on sparc, sparc64 and amiga - the only places
where they were still enabled.
 1.133 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.132 13-Dec-2016  christos branches: 1.132.8;
wildcard speaker attachments, now that we can handle many of them.
 1.131 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.130 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.129 16-Nov-2014  manu branches: 1.129.2; 1.129.4;
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.128 12-Nov-2014  manu Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels

This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.127 23-Aug-2014  dholland Systematize (and in many cases, fix) the comments on options COMPAT_NN.

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.126 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.125 05-Jul-2014  tsutsui branches: 1.125.2;
Use COPTS="-O2 -fno-reorder-blocks" for kernels except INSTALL_CONFIGURATION.
 1.124 05-Jul-2014  tsutsui Disable X-Surf devices for DRACO's configuration.

- ne at xsh requires ax88190 and ax88190 requires mii(4),
but all mii devices are declared only inside AMIGA_CONFIGURATION
- X-Surf also add wdc(4) but all children devices like atabus and
atapibus are declared only for AMIGA_CONFIGURATION

XXX: DRACO kernel is not built during build.sh release.
 1.123 26-Dec-2013  rkujawa branches: 1.123.2;
Implement the probe procedure for ACA500. Now the user just needs acafh0
compiled in his kernel and it all should(tm) work.

Due to lack of obio in amiga port, the probe is called directly from mbattach().
This is going to change with the introduction of obio for all non-autoconfig
expansions.
 1.122 22-Dec-2013  rkujawa Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.121 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.120 04-Oct-2013  rkujawa Nuke long dead NKPTADD and NKPTADDSHIFT options from config files.
 1.119 11-Aug-2013  rkujawa Add the new xsh(4) driver to GENERIC.in template.
 1.118 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.117 05-Jun-2013  christos branches: 1.117.2;
remove obsolete networking options
 1.116 27-Apr-2013  rkujawa Add slhci at zbus (Thylacine) and some USB HID devices.
 1.115 27-Apr-2013  christos the bogus number police
 1.114 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.113 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.112 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.111 01-Feb-2013  phx Include two MII PHY drivers, as needed by certain PCMCIA network cards.
More PHY drivers should be added when needed.
 1.110 29-Jan-2013  rkujawa Add forgotten atabus at ata. Needed for satalink.
 1.109 29-Jan-2013  rkujawa Add em4k(4).
 1.108 28-Jan-2013  rkujawa Add empm(4) driver to config files.
 1.107 25-Nov-2012  rkujawa Argh, commited wrong file. Add z3rambd.
 1.106 21-Nov-2012  rkujawa Enable wdc at xsurf, remove WDC_NO_IDS (phx@ confirmed it's not needed).
 1.105 19-Nov-2012  rkujawa Add (commented out for now) driver for X-Surf IDE.
 1.104 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.103 17-Aug-2012  abs branches: 1.103.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.102 09-Jul-2012  rkujawa Don't enable wsmouse in a non-WSCONS kernel.
 1.101 07-Jun-2012  rkujawa Enable empb in GENERIC, fix build, rearrange files.amiga.
 1.100 30-May-2012  rkujawa Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
 1.99 15-May-2012  rkujawa - Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.98 17-Apr-2012  rkujawa Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.97 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.96 24-Jan-2012  rkujawa branches: 1.96.2; 1.96.6; 1.96.8;
Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.95 19-Jan-2012  rkujawa Don\'t forget to disable atabus* when disabling the efa driver.
 1.94 19-Jan-2012  rkujawa User reported that efa driver attached when FastATA hardware was absent, but 4x EIDE splitter was present. Disable efa in GENERIC until problem is solved and/or better probe function is written.
 1.93 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.92 11-Jan-2012  rkujawa Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.91 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.90 26-Dec-2011  mlelstv Add putter device to generic kernels.
 1.89 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.88 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.87 22-Nov-2011  tls branches: 1.87.2;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.86 30-Oct-2011  rkujawa branches: 1.86.2;
Enable efa in GENERIC.
 1.85 27-Oct-2011  rkujawa Add driver for ELBOX FastATA 1200 Mk-III/Mk-IV (and the man page).
 1.84 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.83 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.82 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.81 01-Jul-2011  rkujawa Fix DRACO kernel breakage introduced by my previous commit.
 1.80 01-Jul-2011  rkujawa Add Bluetooth stack to Amiga. Tested with 3Com 3CRWB6096B on an A1200. Change approved by phx.
 1.79 30-Jun-2011  wiz dependant -> dependent
 1.78 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.77 14-Jan-2011  phx branches: 1.77.2; 1.77.4;
Driver for BlizzardPPC 603e+ SCSI host adatper.
Patch submitted by Radoslaw Kujawa.
 1.76 08-May-2010  mrg enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
 1.75 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.74 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.73 05-Dec-2009  pooka branches: 1.73.2; 1.73.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.72 12-Jan-2009  mhitch Add COMPAT_50.
 1.71 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

Proposed on tech-kern@.
 1.70 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.69 24-Sep-2008  tsutsui branches: 1.69.2;
Enable fss(4) in not only GENERIC but also all !INSTALL kernels (i.e. DRACO).
 1.68 24-Sep-2008  tsutsui Add accept filters to a proper file, as _READ_ME_FIRST_ claims.
 1.67 31-Jul-2008  simonb Move "options WAPBL" so that it also gets added to INSTALL kernels.
 1.66 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.65 31-Dec-2007  ad branches: 1.65.6; 1.65.10; 1.65.12; 1.65.16;
Remove systrace. Ok core@.
 1.64 04-Nov-2007  xtraeme branches: 1.64.2; 1.64.8;
Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
 1.63 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.62 20-Aug-2007  is branches: 1.62.2; 1.62.6;
wdc frontent for the buddha and catweazle Z2 hardware. From an old prototype
by me which was never committed due to lack of testers, adopted to 4.99 and
fixed by Frank Wille.
 1.61 06-Aug-2007  adrianp Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.60 16-Jul-2007  he branches: 1.60.2; 1.60.4; 1.60.8;
The option COMPAT_AOUT_M68K now requires COMPAT_40 (recent mount changes),
so make sure to define COMPAT_40 too.
 1.59 06-Jun-2007  martin Grr, do the addition of pseudo-device agr the right way
 1.58 11-Nov-2006  jmmv branches: 1.58.2; 1.58.8; 1.58.10; 1.58.16; 1.58.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.57 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.56 26-Aug-2006  christos branches: 1.56.2; 1.56.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.55 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.54 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.53 29-Jun-2006  liamjfoy branches: 1.53.2;
Add CARP to further platforms

ok christos, julian coleman and matthew green
 1.52 28-Mar-2006  pavel branches: 1.52.4;
Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
 1.51 05-Feb-2006  cube branches: 1.51.2; 1.51.4; 1.51.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.50 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.49 03-Feb-2006  reinoud branches: 1.49.2;
Add uncommented file-system UDF for generated config GENERIC files.
 1.48 10-Dec-2005  tsutsui branches: 1.48.2; 1.48.4;
Add veriexec stuff to the common config file.
 1.47 07-Dec-2005  tsutsui Remove obsolete options VNODE_OP_NOINLINE.
 1.46 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.45 03-Nov-2005  chs turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.44 07-Oct-2005  tsutsui Add (commented out) file-system TMPFS in a proper file.
 1.43 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.42 19-Aug-2005  christos 64 bit inode changes.
 1.41 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.40 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.39 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.38 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.37 26-Jun-2005  rpaulo branches: 1.37.2;
Add PTYFS (commented out) in the correct form.
 1.36 09-Jun-2005  tsutsui - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
(still commented out)
- Add (also commented out) options BUFQ_PRIOCSCAN.

Suggested by perry and soda on tech-kern.
Please refer options(4) for details for these options.
 1.35 01-Jun-2005  jandberg Add wsmux.
 1.34 25-Feb-2005  simonb branches: 1.34.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.33 20-Feb-2005  jdolecek add SMBFS/nsmb, per PR port-amiga/29066 by Florian Stoehr
 1.32 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.31 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.30 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

- File system snapshot device fss(4) added to all kernel configs that
have a disk. Device is commented out on all non-GENERIC kernels.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.29 28-Jan-2005  rumble Sprinkle options UFS_DIRHASH on GENERIC kernels. It's presently
commented out and labeled experimental pending further review and
testing.
 1.28 17-Jan-2005  cube branches: 1.28.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.27 13-Jan-2005  is branches: 1.27.2;
No more idesc please - we use the wdc driver.
 1.26 10-Nov-2004  christos Add COMPAT_BSDPTY on all the kernels that have COMPAT options.
 1.25 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.24 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.23 28-Jun-2004  bouyer Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
 1.22 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.21 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.20 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.19 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.18 23-Feb-2004  jandberg branches: 1.18.2;
Add wsfont pseudo-device.

With this the custom font loading code isn't needed and is removed.
 1.17 23-Feb-2004  jandberg Replace an IBM-encoded wsfont with ISO-encoded one
 1.16 08-Oct-2003  bouyer Add atabus
 1.15 22-Sep-2003  jandberg added wsmouse
 1.14 22-Sep-2003  cl add COMPAT_15/COMPAT_16
 1.13 27-Jul-2003  is This was missing pseudo-device ksyms. Pointed out by J. Andberg.
 1.12 16-Apr-2003  is branches: 1.12.2;
make /dev/reload optional. (It is only implemented for a.out kernels at the
moment.)
 1.11 10-Apr-2003  christos Bye Bye UCONSOLE
 1.10 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.9 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.8 19-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.7 14-Oct-2002  elric Added a commented out cgd(4).
 1.6 06-Oct-2002  provos add SYSTRACE here; pointed out by lukem
 1.5 25-Sep-2002  martti Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK"
 1.4 20-Sep-2002  martti Added (commented out) IPFILTER_DEFAULT_BLOCK.
 1.3 18-Sep-2002  lukem enable USERCONF
 1.2 05-Jul-2002  abs branches: 1.2.2; 1.2.4;
Ensure INSTALL media has PIPE_SOCKETPAIR, MALLOC_NOINLINE and VNODE_OP_NOINLINE
 1.1 18-Jun-2002  lukem branches: 1.1.2;
Use m4 instead of cpp to generate the various kernel configurations,
since cpp is the "C compiler pre-processor", and as such, isn't really
suited to parsing non-C-language files...
 1.1.2.6 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.5 11-Nov-2002  nathanw Catch up to -current
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.1 18-Jun-2002  nathanw file GENERIC.in was added on branch nathanw_sa on 2002-06-20 03:37:51 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 05-Jul-2002  jdolecek file GENERIC.in was added on branch kqueue on 2002-09-06 08:31:42 +0000
 1.2.2.2 16-Jul-2002  gehenna catch up with -current.
 1.2.2.1 05-Jul-2002  gehenna file GENERIC.in was added on branch gehenna-devsw on 2002-07-16 00:38:04 +0000
 1.12.2.11 11-Dec-2005  christos Sync with head.
 1.12.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.12.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.12.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.12.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.12.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.18.2.4 11-Aug-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11356):
sys/arch/acorn32/conf/GENERIC 1.80 via patch
sys/arch/amd64/conf/GENERIC 1.154 via patch
sys/arch/amiga/conf/GENERIC.in 1.61 via patch
sys/arch/arc/conf/GENERIC 1.148 via patch
sys/arch/atari/conf/GENERIC.in 1.68 via patch
sys/arch/cats/conf/GENERIC 1.116 via patch
sys/arch/hp300/conf/GENERIC 1.141 via patch
sys/arch/hp700/conf/GENERIC patch
sys/arch/i386/conf/GENERIC 1.840 via patch
sys/arch/i386/conf/GENERIC_LAPTOP 1.239 via patch
sys/arch/i386/conf/GENERIC.MPACPI patch
sys/arch/mac68k/conf/GENERIC 1.182 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x 1.68 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x 1.66 via patch
sys/arch/sparc/conf/GENERIC 1.200 via patch
sys/arch/sparc64/conf/GENERIC32 patch
sys/arch/xen/conf/GENERIC patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.18.2.3 15-Jul-2004  he branches: 1.18.2.3.2; 1.18.2.3.4;
Pull up revision 1.24 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.18.2.2 02-Jul-2004  he Pull up revision 1.23 (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.18.2.1 30-Jun-2004  jdc Pull up revision 1.22 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.18.2.3.4.1 11-Aug-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11356):
sys/arch/acorn32/conf/GENERIC 1.80 via patch
sys/arch/amd64/conf/GENERIC 1.154 via patch
sys/arch/amiga/conf/GENERIC.in 1.61 via patch
sys/arch/arc/conf/GENERIC 1.148 via patch
sys/arch/atari/conf/GENERIC.in 1.68 via patch
sys/arch/cats/conf/GENERIC 1.116 via patch
sys/arch/hp300/conf/GENERIC 1.141 via patch
sys/arch/hp700/conf/GENERIC patch
sys/arch/i386/conf/GENERIC 1.840 via patch
sys/arch/i386/conf/GENERIC_LAPTOP 1.239 via patch
sys/arch/i386/conf/GENERIC.MPACPI patch
sys/arch/mac68k/conf/GENERIC 1.182 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x 1.68 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x 1.66 via patch
sys/arch/sparc/conf/GENERIC 1.200 via patch
sys/arch/sparc64/conf/GENERIC32 patch
sys/arch/xen/conf/GENERIC patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.18.2.3.2.1 11-Aug-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11356):
sys/arch/acorn32/conf/GENERIC 1.80 via patch
sys/arch/amd64/conf/GENERIC 1.154 via patch
sys/arch/amiga/conf/GENERIC.in 1.61 via patch
sys/arch/arc/conf/GENERIC 1.148 via patch
sys/arch/atari/conf/GENERIC.in 1.68 via patch
sys/arch/cats/conf/GENERIC 1.116 via patch
sys/arch/hp300/conf/GENERIC 1.141 via patch
sys/arch/hp700/conf/GENERIC patch
sys/arch/i386/conf/GENERIC 1.840 via patch
sys/arch/i386/conf/GENERIC_LAPTOP 1.239 via patch
sys/arch/i386/conf/GENERIC.MPACPI patch
sys/arch/mac68k/conf/GENERIC 1.182 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x 1.68 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x 1.66 via patch
sys/arch/sparc/conf/GENERIC 1.200 via patch
sys/arch/sparc64/conf/GENERIC32 patch
sys/arch/xen/conf/GENERIC patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.27.2.1 29-Apr-2005  kent sync with -current
 1.28.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.28.2.1 12-Feb-2005  yamt sync with head.
 1.34.2.4 28-Aug-2007  ghen Pull up following revision(s) (requested by adrianp in ticket #1826):
sys/arch/hp300/conf/GENERIC: revision 1.141 via patch
sys/arch/amd64/conf/GENERIC: revision 1.154 via patch
sys/arch/cats/conf/GENERIC: revision 1.116 via patch
sys/arch/arc/conf/GENERIC: revision 1.148 via patch
sys/arch/acorn32/conf/GENERIC: revision 1.80 via patch
sys/arch/sparc/conf/GENERIC: revision 1.200 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.88 via patch
sys/arch/atari/conf/GENERIC.in: revision 1.68 via patch
sys/arch/amiga/conf/GENERIC: revision 1.248 via patch
sys/arch/i386/conf/GENERIC.MPACPI: patch
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66 via patch
sys/arch/i386/conf/GENERIC: revision 1.840 via patch
sys/arch/amiga/conf/GENERIC.in: revision 1.61 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68 via patch
sys/arch/mac68k/conf/GENERIC: revision 1.182 via patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net&#64;
Ok'ed by core&#64;
 1.34.2.3 05-Nov-2005  tron branches: 1.34.2.3.2; 1.34.2.3.4;
Pull up following revision(s) (requested by chs in ticket #929):
sys/arch/hp300/conf/GENERIC: revision 1.124
sys/arch/acorn32/conf/GENERIC: revision 1.62
sys/arch/pdp10/conf/GENERIC: revision 1.19
sys/arch/mvme68k/conf/GENERIC: revision 1.61
sys/arch/netwinder/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.46
sys/arch/macppc/conf/GENERIC: revision 1.214
sys/arch/bebox/conf/GENERIC: revision 1.89
sys/arch/cobalt/conf/GENERIC: revision 1.83
sys/arch/cats/conf/GENERIC: revision 1.92
sys/arch/shark/conf/GENERIC: revision 1.53
sys/arch/amiga/conf/GENERIC.in: revision 1.45
sys/arch/acorn26/conf/GENERIC: revision 1.37
sys/arch/cesfic/conf/GENERIC: revision 1.38
sys/arch/iyonix/conf/GENERIC: revision 1.21
sys/arch/alpha/conf/GENERIC: revision 1.277
sys/arch/vax/conf/GENERIC: revision 1.143
sys/arch/atari/conf/GENERIC.in: revision 1.56
sys/arch/mipsco/conf/GENERIC: revision 1.53
sys/arch/ofppc/conf/GENERIC: revision 1.85
sys/arch/next68k/conf/GENERIC: revision 1.96
sys/arch/arc/conf/GENERIC: revision 1.125
sys/arch/dreamcast/conf/GENERIC: revision 1.62
turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
 1.34.2.2 14-Aug-2005  riz Pull up revision 1.39 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.34.2.1 18-Jul-2005  riz Pull up revision 1.38 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.34.2.3.4.1 28-Aug-2007  ghen Pull up following revision(s) (requested by adrianp in ticket #1826):
sys/arch/hp300/conf/GENERIC: revision 1.141 via patch
sys/arch/amd64/conf/GENERIC: revision 1.154 via patch
sys/arch/cats/conf/GENERIC: revision 1.116 via patch
sys/arch/arc/conf/GENERIC: revision 1.148 via patch
sys/arch/acorn32/conf/GENERIC: revision 1.80 via patch
sys/arch/sparc/conf/GENERIC: revision 1.200 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.88 via patch
sys/arch/atari/conf/GENERIC.in: revision 1.68 via patch
sys/arch/amiga/conf/GENERIC: revision 1.248 via patch
sys/arch/i386/conf/GENERIC.MPACPI: patch
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66 via patch
sys/arch/i386/conf/GENERIC: revision 1.840 via patch
sys/arch/amiga/conf/GENERIC.in: revision 1.61 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68 via patch
sys/arch/mac68k/conf/GENERIC: revision 1.182 via patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.34.2.3.2.1 28-Aug-2007  ghen Pull up following revision(s) (requested by adrianp in ticket #1826):
sys/arch/hp300/conf/GENERIC: revision 1.141 via patch
sys/arch/amd64/conf/GENERIC: revision 1.154 via patch
sys/arch/cats/conf/GENERIC: revision 1.116 via patch
sys/arch/arc/conf/GENERIC: revision 1.148 via patch
sys/arch/acorn32/conf/GENERIC: revision 1.80 via patch
sys/arch/sparc/conf/GENERIC: revision 1.200 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.88 via patch
sys/arch/atari/conf/GENERIC.in: revision 1.68 via patch
sys/arch/amiga/conf/GENERIC: revision 1.248 via patch
sys/arch/i386/conf/GENERIC.MPACPI: patch
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239 via patch
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66 via patch
sys/arch/i386/conf/GENERIC: revision 1.840 via patch
sys/arch/amiga/conf/GENERIC.in: revision 1.61 via patch
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68 via patch
sys/arch/mac68k/conf/GENERIC: revision 1.182 via patch
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.37.2.5 21-Jan-2008  yamt sync with head
 1.37.2.4 15-Nov-2007  yamt sync with head.
 1.37.2.3 03-Sep-2007  yamt sync with head.
 1.37.2.2 30-Dec-2006  yamt sync with head.
 1.37.2.1 21-Jun-2006  yamt sync with head.
 1.48.4.1 09-Sep-2006  rpaulo sync with head
 1.48.2.1 18-Feb-2006  yamt sync with head.
 1.49.2.1 22-Apr-2006  simonb Sync with head.
 1.51.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.51.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.51.2.3 03-Sep-2006  yamt sync with head.
 1.51.2.2 11-Aug-2006  yamt sync with head
 1.51.2.1 01-Apr-2006  yamt sync with head.
 1.52.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.53.2.2 22-Sep-2006  riz Pull up following revision(s) (requested by tsutsui in ticket #170):
sys/arch/sparc64/conf/GENERIC: revision 1.63
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.55
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.54
sys/arch/next68k/conf/GENERIC: revision 1.105
sys/arch/ews4800mips/conf/GENERIC: revision 1.12
sys/arch/arc/conf/GENERIC: revision 1.142
sys/arch/sun3/conf/GENERIC3X: revision 1.91
sys/arch/amd64/conf/GENERIC: revision 1.105
sys/arch/sun2/conf/GENERIC: revision 1.58
sys/arch/amiga/conf/GENERIC.in: revision 1.55
sys/arch/mac68k/conf/GENERIC: revision 1.175
sys/arch/acorn26/conf/GENERIC: revision 1.46
sys/arch/shark/conf/GENERIC: revision 1.65
sys/arch/cesfic/conf/GENERIC: revision 1.45
sys/arch/sandpoint/conf/GENERIC: revision 1.36
sys/arch/iyonix/conf/GENERIC: revision 1.32
sys/arch/mvme68k/conf/GENERIC: revision 1.69
sys/arch/evbarm/conf/ARMADILLO210: revision 1.3
sys/arch/vax/conf/GENERIC: revision 1.154
sys/arch/mipsco/conf/GENERIC: revision 1.61
sys/arch/evbarm/conf/ARMADILLO9: revision 1.14
sys/arch/cobalt/conf/GENERIC: revision 1.103
sys/arch/ofppc/conf/GENERIC: revision 1.94
sys/arch/hp700/conf/GENERIC: revision 1.69
sys/arch/playstation2/conf/GENERIC: revision 1.8
sys/arch/dreamcast/conf/GENERIC: revision 1.73
sys/arch/news68k/conf/GENERIC: revision 1.81
sys/arch/macppc/conf/GENERIC: revision 1.234
sys/arch/hp300/conf/GENERIC: revision 1.134
sys/arch/mmeye/conf/GENERIC: revision 1.83
sys/arch/ibmnws/conf/GENERIC: revision 1.26
sys/arch/cats/conf/GENERIC: revision 1.109
sys/arch/sparc/conf/GENERIC: revision 1.191
sys/arch/pdp10/conf/GENERIC: revision 1.27
sys/arch/acorn32/conf/GENERIC: revision 1.75
sys/arch/luna68k/conf/GENERIC: revision 1.74
sys/arch/bebox/conf/GENERIC: revision 1.101
sys/arch/pmax/conf/GENERIC: revision 1.148
sys/arch/x68k/conf/GENERIC: revision 1.130
sys/arch/sun3/conf/GENERIC: revision 1.134
sys/arch/prep/conf/GENERIC: revision 1.126
sys/arch/alpha/conf/GENERIC: revision 1.293
sys/arch/newsmips/conf/GENERIC: revision 1.94
sys/arch/netwinder/conf/GENERIC: revision 1.83
sys/arch/hpcsh/conf/GENERIC: revision 1.69
sys/arch/sbmips/conf/GENERIC: revision 1.55
sys/arch/pc532/conf/GENERIC: revision 1.65
sys/arch/hpcmips/conf/GENERIC: revision 1.192
Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.53.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.56.4.2 10-Dec-2006  yamt sync with head.
 1.56.4.1 22-Oct-2006  yamt sync with head
 1.56.2.1 18-Nov-2006  ad Sync with head.
 1.58.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.58.16.2 03-Oct-2007  garbled Sync with HEAD
 1.58.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.58.10.1 11-Jul-2007  mjf Sync with head.
 1.58.8.3 03-Dec-2007  ad Sync with HEAD.
 1.58.8.2 20-Aug-2007  ad Sync with HEAD.
 1.58.8.1 09-Jun-2007  ad Sync with head.
 1.58.2.2 25-Aug-2007  liamjfoy Pull up following revision(s) (requested by adrianp in ticket #820):
sys/arch/hp300/conf/GENERIC: revision 1.141
sys/arch/alpha/conf/GENERIC: revision 1.315
sys/arch/amd64/conf/GENERIC: revision 1.154
sys/arch/cats/conf/GENERIC: revision 1.116
sys/arch/arc/conf/GENERIC: revision 1.148
sys/arch/acorn32/conf/GENERIC: revision 1.80
sys/arch/sparc/conf/GENERIC: revision 1.200
sys/arch/sparc64/conf/GENERIC: revision 1.88
sys/arch/atari/conf/GENERIC.in: revision 1.68
sys/arch/amiga/conf/GENERIC: revision 1.248
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.239
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.66
sys/arch/i386/conf/GENERIC: revision 1.840
sys/arch/amiga/conf/GENERIC.in: revision 1.61
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.68
sys/arch/mac68k/conf/GENERIC: revision 1.182
Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
 1.58.2.1 06-Jun-2007  bouyer pullup the following revisions (requested my martin in ticket #699):
sys/arch/acorn26/conf/GENERIC 1.50
sys/arch/acorn32/conf/GENERIC 1.79
sys/arch/alpha/conf/GENERIC 1.313
sys/arch/amd64/conf/GENERIC 1.148
sys/arch/amiga/conf/GENERIC 1.245
sys/arch/arc/conf/GENERIC 1.146
sys/arch/bebox/conf/GENERIC 1.105
sys/arch/cats/conf/GENERIC 1.115
sys/arch/cobalt/conf/GENERIC 1.108
sys/arch/dreamcast/conf/GENERIC 1.78
sys/arch/ews4800mips/conf/GENERIC 1.18
sys/arch/hp300/conf/GENERIC 1.139
sys/arch/hp700/conf/GENERIC 1.74
sys/arch/hpcmips/conf/GENERIC 1.196
sys/arch/i386/conf/GENERIC 1.831
sys/arch/iyonix/conf/GENERIC 1.38 via patch
sys/arch/landisk/conf/GENERIC 1.8 via patch
sys/arch/luna68k/conf/GENERIC 1.78
sys/arch/mac68k/conf/GENERIC 1.181
sys/arch/macppc/conf/GENERIC 1.256 via patch
sys/arch/mipsco/conf/GENERIC 1.65
sys/arch/mmeye/conf/GENERIC 1.88
sys/arch/mvme68k/conf/GENERIC 1.71
sys/arch/news68k/conf/GENERIC 1.88
sys/arch/newsmips/conf/GENERIC 1.98
sys/arch/next68k/conf/GENERIC 1.108
sys/arch/ofppc/conf/GENERIC 1.98
sys/arch/pc532/conf/GENERIC 1.70
sys/arch/pmax/conf/GENERIC 1.152
sys/arch/prep/conf/GENERIC 1.135
sys/arch/sbmips/conf/GENERIC 1.61
sys/arch/sparc/conf/GENERIC 1.199
sys/arch/sparc64/conf/GENERIC 1.85
sys/arch/sun3/conf/GENERIC 1.138
sys/arch/vax/conf/GENERIC 1.157
sys/arch/x68k/conf/GENERIC 1.134
sys/arch/amiga/conf/GENERIC.in 1.59
sys/arch/sgimips/conf/GENERIC32_IP2x 1.66
sys/arch/sgimips/conf/GENERIC32_IP3x 1.63
sys/arch/sun3/conf/GENERIC3X 1.95
sys/arch/atari/conf/GENERIC.in 1.66

Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.60.8.3 04-Nov-2007  jmcneill Sync with HEAD.
 1.60.8.2 03-Sep-2007  jmcneill Sync with HEAD.
 1.60.8.1 09-Aug-2007  jmcneill Sync with HEAD.
 1.60.4.2 03-Sep-2007  skrll Sync with HEAD.
 1.60.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.60.2.1 07-Aug-2007  matt Sync with HEAD.
 1.62.6.1 13-Nov-2007  bouyer Sync with HEAD
 1.62.2.2 09-Jan-2008  matt sync with HEAD
 1.62.2.1 06-Nov-2007  matt sync with HEAD
 1.64.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.64.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.65.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.65.16.1 19-Oct-2008  haad Sync with HEAD.
 1.65.12.2 10-Oct-2008  skrll Sync with HEAD.
 1.65.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.65.10.3 11-Aug-2010  yamt sync with head.
 1.65.10.2 11-Mar-2010  yamt sync with head
 1.65.10.1 04-May-2009  yamt sync with head.
 1.65.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.65.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.69.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.73.4.3 21-Apr-2011  rmind sync with head
 1.73.4.2 05-Mar-2011  rmind sync with head
 1.73.4.1 30-May-2010  rmind sync with head
 1.73.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.73.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.77.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.77.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.86.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.86.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.86.2.3 30-Oct-2012  yamt sync with head
 1.86.2.2 23-May-2012  yamt sync with head.
 1.86.2.1 17-Apr-2012  yamt sync with head
 1.87.2.4 02-Jun-2012  mrg sync to latest -current.
 1.87.2.3 29-Apr-2012  mrg sync to latest -current.
 1.87.2.2 11-Mar-2012  mrg sync to latest -current
 1.87.2.1 18-Feb-2012  mrg merge to -current.
 1.96.8.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.96.6.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.96.2.1 22-May-2018  martin Apply patch requested by maxv in ticket #1500:

* disable compat_svr4 and compat_svr4_32 everywhere
* disable compat_ibcs2 everywhere but on Vax
* remove the svr4/svr4_32/ibcs2/freebsd entries from the autoload list
 1.103.2.5 03-Dec-2017  jdolecek update from HEAD
 1.103.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.103.2.3 23-Jun-2013  tls resync from head
 1.103.2.2 25-Feb-2013  tls resync with head
 1.103.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.117.2.2 18-May-2014  rmind sync with head
 1.117.2.1 28-Aug-2013  rmind sync with head
 1.123.2.1 10-Aug-2014  tls Rebase.
 1.125.2.3 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.125.2.2 18-Nov-2014  snj branches: 1.125.2.2.2; 1.125.2.2.6;
Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.125.2.1 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.125.2.2.6.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.125.2.2.2.1 25-Feb-2018  snj Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list
 1.129.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.129.2.2 28-Aug-2017  skrll Sync with HEAD
 1.129.2.1 05-Feb-2017  skrll Sync with HEAD
 1.132.8.2 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.132.8.1 31-Aug-2017  bouyer apply paych, requested by maxv in ticket #237:
sys/arch/amiga/conf/DRACO patch
sys/arch/amiga/conf/GENERIC patch
sys/arch/amiga/conf/GENERIC.in patch
sys/arch/i386/conf/ALL patch
sys/arch/i386/conf/GENERIC patch
sys/arch/i386/conf/XEN3_DOM0 patch
sys/arch/i386/conf/XEN3_DOMU patch
sys/arch/sparc/conf/GENERIC patch
sys/arch/sparc/conf/KRUPS patch
sys/arch/sparc/conf/MRCOFFEE patch
sys/arch/sparc/conf/TADPOLE3GX patch
sys/arch/sparc64/conf/GENERIC patch
sys/arch/sparc64/conf/NONPLUS64 patch
sys/kern/kern_exec.c patch

Disables compat_svr4 and compat_svr4_32 on each architecture,
and removes the associated module autoload entries.
 1.138.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.138.4.1 10-Jun-2019  christos Sync with HEAD
 1.138.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.138.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.147.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 21-Nov-1999  itojun bring in content of GENERIC.v6 into GENERIC.
remove GENERIC.v6 file (as it is part of GENERIC now).

"faith" interface is commented out by default as it is not really for
general use.
IPsec items are commented out as well, though we can enable "options IPSEC"
without export-related issue ("options IPSEC" will enable authentication
portion only). We may need to think about it again.

if you have problem compiling with INET6 on archs I do not have access to,
please contact me.

XXX what to do with arch/arm32/SHARK{,.v6}?
 1.2 09-Jul-1999  thorpej branches: 1.2.2; 1.2.8;
Add examples for including the kernel crypto bits from either crypto-us
or crypto-intl, commented out, with instructions to use only one, and
adjust the prefix as necessary.
 1.1 01-Jul-1999  itojun branches: 1.1.2;
kernel configuration for IPv6/IPsec. should be in GENERIC in the future.
(source code will be committed soon)
 1.1.2.3 02-Aug-1999  thorpej Update from trunk.
 1.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.1.2.1 01-Jul-1999  thorpej file GENERIC.v6 was added on branch chs-ubc2 on 1999-07-01 23:01:44 +0000
 1.2.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.7 22-May-1994  mycroft Clean up deleted files.
 1.6 15-Apr-1994  chopps add COMPAT_09
 1.5 09-Mar-1994  ws Make FFS optional
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.142 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.141 07-Aug-2022  simonb Regen.
 1.140 29-May-2022  rin Regen for GENERIC.in rev. 1.149.
 1.139 29-May-2022  andvar s/littel/little/ mainly in copy pasted comments.
 1.138 26-Jan-2021  rin Regen for previous commit to GENERIC.in.
 1.137 26-Oct-2020  rin branches: 1.137.2;
regen
 1.136 27-Sep-2020  roy vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.135 10-Aug-2020  rin regen
 1.134 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.133 03-May-2020  rin Regen to disable amiga/efa(4) in GENERIC, accidentally enabled in the
previous revision.

efa_probe() seems broken and misdetected even if absent on A1200.
 1.132 26-May-2019  sevan regen
 1.131 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.130 05-Feb-2018  maxv branches: 1.130.2; 1.130.4;
Nuke DIRECTED_BROADCAST, it is not documented and not enabled anywhere. It
probably wouldn't have built correctly anyway, since there is no associated
defflag.

These ten lines of code in ip_input.c already look a lot better.
 1.129 23-Jan-2018  sevan Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.128 14-Sep-2017  mrg clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
 1.127 13-Sep-2017  sevan Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
 1.126 21-Aug-2015  uebayasi branches: 1.126.10;
Add `pseudo-device ksyms' where `options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
 1.125 05-Jul-2014  tsutsui branches: 1.125.4;
Regen from GENERIC.in rev 1.125:

> Use COPTS="-O2 -fno-reorder-blocks" for kernels except INSTALL_CONFIGURATION.
 1.124 05-Jul-2014  tsutsui Regen to reflect GENERIC.in rev 1.121-1.124:

rev 1.121:
> dd preliminary support for the Individual Computers ACA500 in the form of acahf
> driver. If ACA500 is equipped with supported accelerator with MMU, it allows
> running NetBSD on an Amiga 500.
>
> Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
> driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
> is commented out in the GENERIC kernel for now (at least until it stops being
> very experimental and hackish).
>
> When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...

rev 1.122:
> Changes to ACA500 support:
> - Add support for second (aux) CF slot.
> - Rework wdc attachment to be more sane.
> - Add support for clockport on ACA500.
> - Fix style where appropriate.

rev 1.123:
> Implement the probe procedure for ACA500. Now the user just needs acafh0
> compiled in his kernel and it all should(tm) work.
>
> Due to lack of obio in amiga port, the probe is called directly from mbattach().
> This is going to change with the introduction of obio for all non-autoconfig
> expansions.

rev 1.124:
> Disable X-Surf devices for DRACO's configuration.
>
> - ne at xsh requires ax88190 and ax88190 requires mii(4),
> but all mii devices are declared only inside AMIGA_CONFIGURATION
> - X-Surf also add wdc(4) but all children devices like atabus and
> atapibus are declared only for AMIGA_CONFIGURATION
>
> XXX: DRACO kernel is not built during build.sh release.
 1.123 04-Oct-2013  rkujawa branches: 1.123.2;
Nuke long dead NKPTADD and NKPTADDSHIFT options from config files.
 1.122 02-Sep-2013  skrll Re-gen. Hi rkujawa.
 1.121 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.120 05-Jun-2013  christos branches: 1.120.2;
remove obsolete networking options
 1.119 27-Apr-2013  christos the bogus number police
 1.118 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.117 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.116 01-Feb-2013  phx Include two MII PHY drivers, as needed by certain PCMCIA network cards.
More PHY drivers should be added when needed.
 1.115 29-Jan-2013  rkujawa Regen configs.
 1.114 28-Jan-2013  rkujawa Regen config files.
 1.113 25-Nov-2012  rkujawa Regen configs.
 1.112 21-Nov-2012  rkujawa Regen kernel configs.
 1.111 19-Nov-2012  rkujawa Regen configs.
 1.110 17-Aug-2012  abs branches: 1.110.2;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.109 07-Jun-2012  rkujawa Regen configs.
 1.108 15-May-2012  rkujawa regen configs
 1.107 17-Apr-2012  rkujawa regen configs
 1.106 24-Jan-2012  rkujawa Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.105 19-Jan-2012  rkujawa Don\'t forget to disable atabus* when disabling the efa driver.
 1.104 19-Jan-2012  rkujawa User reported that efa driver attached when FastATA hardware was absent, but 4x EIDE splitter was present. Disable efa in GENERIC until problem is solved and/or better probe function is written.
 1.103 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.102 11-Jan-2012  rkujawa Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.101 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.100 26-Dec-2011  mlelstv regen from GENERIC.in
 1.99 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.98 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.97 22-Nov-2011  tls branches: 1.97.2;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.96 30-Oct-2011  rkujawa branches: 1.96.2;
regen kernel configs
 1.95 27-Oct-2011  rkujawa regen kernel configs
 1.94 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.93 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.92 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.91 01-Jul-2011  rkujawa Fix DRACO kernel breakage introduced by my previous commit.
 1.90 30-Jun-2011  wiz dependant -> dependent
 1.89 14-Jan-2011  phx regen
 1.88 08-May-2010  mrg regenerate these configurations from GENERIC.in.
 1.87 29-Apr-2010  chs regen
 1.86 16-Apr-2010  pooka regen
 1.85 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.84 12-Jan-2009  mhitch branches: 1.84.4; 1.84.6;
Regen from GENERIC.in rev 1.72.
Add COMPAT_50.
 1.83 24-Sep-2008  tsutsui branches: 1.83.2;
Regen from GENERIC.in rev 1.69:
> Enable fss(4) in not only GENERIC but also all !INSTALL kernels (i.e. DRACO).
 1.82 24-Sep-2008  tsutsui Regen from GENERIC.in rev 1.68:
> Add accept filters to a proper file, as _READ_ME_FIRST_ claims.
 1.81 31-Jul-2008  simonb Regen for "options WAPBL".
 1.80 31-Dec-2007  ad branches: 1.80.6; 1.80.10; 1.80.12; 1.80.16;
Remove systrace. Ok core@.
 1.79 17-Oct-2007  garbled branches: 1.79.2; 1.79.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.78 20-Aug-2007  is branches: 1.78.2;
Regenerate after addition of wdc_buddha.
 1.77 19-Aug-2007  is regenerate after removal of OSI networking
 1.76 16-Jul-2007  he branches: 1.76.4; 1.76.8;
Regenerated files after adding COMPAT_40.
 1.75 06-Jun-2007  martin regen
 1.74 12-Nov-2006  jmmv branches: 1.74.2; 1.74.8; 1.74.10; 1.74.16; 1.74.18;
Regen. Per bernd@'s instructions.
 1.73 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.72 26-Aug-2006  christos branches: 1.72.2; 1.72.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.71 26-Aug-2006  tsutsui Regen from GENERIC.in:
1.54:
> Disable SYSTRACE by default on all kernels (discussed with core)
1.55:
> Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.70 30-Jun-2006  tsutsui branches: 1.70.2;
Regen from GENERIC.in rev 1.53:
> Add CARP to further platforms
 1.69 28-Mar-2006  pavel branches: 1.69.4;
regen (added stf).
 1.68 05-Feb-2006  cube branches: 1.68.2; 1.68.4; 1.68.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.67 04-Feb-2006  rpaulo regen
 1.66 03-Feb-2006  reinoud branches: 1.66.2;
Regen GENERIC config files.
 1.65 10-Dec-2005  tsutsui branches: 1.65.2; 1.65.4;
Regen from GENERIC.in rev 1.48:
> Add veriexec stuff to the common config file.
 1.64 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.47:
> Remove obsolete options VNODE_OP_NOINLINE.
 1.63 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.46:
> Adjust comments for options FFS_NO_SNAPSHOT.
 1.62 03-Nov-2005  chs regen
 1.61 07-Oct-2005  tsutsui Regen from GENERIC.in rev 1.44:
> Add (commented out) file-system TMPFS in a proper file.

XXX: It seems `INSTALL_CONFIGURATION' in GENERIC.in should be reorganaized.
 1.60 31-Jul-2005  yamt regen.
 1.59 30-Jul-2005  yamt regen.
 1.58 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.57 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.56 26-Jun-2005  rpaulo branches: 1.56.2;
Correct RCS Ids.
 1.55 26-Jun-2005  rpaulo Add PTYFS (commented out) in the correct form.
 1.54 09-Jun-2005  tsutsui Regen from GENERIC.in rev 1.36:
> - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
> (still commented out)
> - Add (also commented out) options BUFQ_PRIOCSCAN.
>
> Suggested by perry and soda on tech-kern.
> Please refer options(4) for details for these options.
 1.53 01-Jun-2005  jandberg regen: wsmux added (enabled only in WSCONS)
 1.52 25-Feb-2005  simonb branches: 1.52.2;
Regen for COMPAT_20 addition.
 1.51 20-Feb-2005  jdolecek regen: add SMBFS/nsmb, per PR port-amiga/29066 by Florian Stoehr
 1.50 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.49 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.48 31-Jan-2005  hannken Regen.
 1.47 17-Jan-2005  cube branches: 1.47.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.46 13-Jan-2005  is branches: 1.46.2;
Regenerate from GENERIC.in: no more idesc - we're using wdc.
 1.45 10-Nov-2004  christos Add COMPAT_BSDPTY to the rest of the config files.
 1.44 26-Jun-2004  abs Regenerate from master config files
 1.43 23-Feb-2004  jandberg branches: 1.43.2;
regen after wsfont changes
 1.42 08-Oct-2003  bouyer Regen: add atabus
 1.41 22-Sep-2003  jandberg regen after wsmouse addition
 1.40 22-Sep-2003  cl regen
 1.39 27-Jul-2003  is Regenerate from GENERIC.in to include pseudo-device ksyms, where
appropriate.
 1.38 16-Apr-2003  is branches: 1.38.2;
make /dev/reload optional (it is implemented for a.out kernels only, at
the moment.)
 1.37 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.36 22-Nov-2002  wiz regen
 1.35 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.34 06-Oct-2002  provos regen from GENERIC.in
 1.33 18-Sep-2002  lukem regen for: enable USERCONF
 1.32 05-Jul-2002  abs Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
 1.31 18-Jun-2002  lukem Regenerate with new m4 mechanism (vs old cpp mechanism).
New files are same as old (except for whitespace differences), except
that the new GENERIC doesn't have melody, because GENERIC defines
DRACO and the latter can't have it.
 1.30 17-Jun-2002  lukem regen for clockctl
 1.29 30-May-2002  thorpej Regenerate.
 1.28 25-Apr-2002  atatat branches: 1.28.2; 1.28.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.27 19-Apr-2002  heinz regen after GENERIC v1.178
 1.26 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.25 04-Mar-2002  sommerfeld The "gif*" tunnelling interface does everything ipip does.
Move usage example from ipip.4 to gif.4
Excise ipip and stitch up the scars.
 1.24 15-Feb-2002  is Move Amiga PORT to ELF and new toolchain. Still missing:
support in UPGRADE to move old shared libs to /emul/aout
 1.23 13-Feb-2002  is move ELF32 to std.amiga
 1.22 27-Jan-2002  is *** empty log message ***
 1.21 27-Jan-2002  jdolecek regen: INSECURE, SCSIVERBOSE description change,
s/define/uncomment/, add raid stuff
 1.20 26-Jan-2002  aymeric remove trailing spaces and tabs
 1.19 14-Jan-2002  jandberg Regenerated AMIGA, INSTALL and DRACO from GENERIC.
 1.18 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.17 25-Aug-2001  is branches: 1.17.6;
synchronize (addition of repulse driver).
 1.16 08-Jul-2001  abs branches: 1.16.2;
(Regenerated atari and amiga)
Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
 1.15 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.14 10-Mar-2001  is - The ioblix zbus board comes in 24 MHz and 22.1184 MHz clock variants.
We default to the (newer, more sane) 22.1184 MHz value, but set it from
the iobzclock variable (in Hz), which is initialized from the IOBZCLOCK
configuration option and patchable.
XXX we should time the clock at system startup.
- add ioblix_zbus to the GENERIC configuration.
 1.13 21-Jan-2001  is branches: 1.13.2;
- Replace idesc by standard wdc attachment.
- Add A1200 pcmcia slot driver.
(Both where options already.)
 1.12 29-Dec-2000  is Update for vlan addition and Xsurf name addition.
 1.11 19-Dec-2000  tsutsui Remove "rnd is EXPERIMENTAL" comments.
 1.10 04-Oct-2000  is regenerate: INSTALL changes as implemented in GENERIC and Makefile.
 1.9 04-Oct-2000  is resync, mostly for the rnd addition.
 1.8 02-Oct-2000  abs Ensure all INSTALL* kernels have two ptys, and a note explaining why:
pseudo-device pty 2 # pseudo-terminals (Sysinst needs two)
(Some installers may not be using sysinst, in which case this just reduces
the number of ptys from 16 that are not used to 2 that are not used)
For i386 conf files, no change other than comments.
 1.7 25-Sep-2000  abs Use "options<SPACE><TAB>" not "options<TAB>" - noted by simonb.
Move VNODE_OP_NOINLINE and NFS_V2_ONLY into '# Filesystem options' section.
Consistently label '# Filesystem options' and '#File systems' sections.
 1.6 25-Sep-2000  abs Ensure all INSTALL config files have (at least) COPTS="-Os", cincluding bebox
based on it working already for macppc.
Also add commented out:
#options VNODE_OP_NOINLINE # Don't inline vnode op calls
#options NFS_V2_ONLY # Exclude NFS3 and NQNFS code
as suggestions for additional savings
 1.5 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.4 29-Aug-2000  is branches: 1.4.2;
Stripped down Install kernels (no audio, no OSI or Xerox networking, no
scanners).
INSTWDCPCM has the wdc instead of the idesc, and the PCMCIA support, so
that people can test it easily.
 1.3 05-Jun-1996  is branches: 1.3.4;
Not needed anymore due to newer boot loader
 1.2 30-May-1996  is branches: 1.2.2;
Pull INSTALL into the trunk.
 1.1 24-Nov-1995  chopps branches: 1.1.2;
file INSTALL was initially added on branch netbsd-1-1.
 1.1.2.1 24-Nov-1995  chopps INSTALL is a smaller generic (missing ddb and compat_sunos) which should now
fit on all amigas
 1.2.2.3 05-Jun-1996  is Not needed anymore due to newer boot loader.
 1.2.2.2 30-May-1996  is Add Motorola 68060 and DraCo support to GENERIC and INSTALL, now that
dual machine kernels have been tested, and clean up DRACO a bit.
 1.2.2.1 30-May-1996  is file INSTALL was added on branch netbsd-1-2 on 1996-05-30 21:25:49 +0000
 1.3.4.4 12-Mar-2001  bouyer Sync with HEAD.
 1.3.4.3 11-Feb-2001  bouyer Sync with HEAD.
 1.3.4.2 05-Jan-2001  bouyer Sync with HEAD
 1.3.4.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.4.2.4 01-May-2001  he Pull up regenerated files (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.4.2.3 25-Jan-2001  jhawk regen
 1.4.2.2 02-Sep-2000  is synchronize with GENERIC, permission by thorpej.
 1.4.2.1 29-Aug-2000  is file INSTALL was added on branch netbsd-1-5 on 2000-09-02 21:40:17 +0000
 1.13.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.13.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.16.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.16.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.16.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.16.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.6.9 11-Dec-2002  thorpej Sync with HEAD.
 1.17.6.8 18-Oct-2002  nathanw Catch up to -current.
 1.17.6.7 01-Aug-2002  nathanw Catch up to -current.
 1.17.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.17.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.17.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.17.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.17.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.17.6.1 25-Aug-2001  nathanw file INSTALL was added on branch nathanw_sa on 2002-01-08 00:22:57 +0000
 1.28.4.3 24-Oct-2002  lukem regen from GENERIC after ipfilter 3.4.29 upgrade
 1.28.4.2 01-Aug-2002  lukem Regenerate from GENERIC 1.179.4.2 (requested by lukem in ticket #314):
 1.28.4.1 30-May-2002  tv Pull up regen (requested by thorpej in ticket #94).
 1.28.2.2 16-Jul-2002  gehenna catch up with -current.
 1.28.2.1 09-Jul-2002  gehenna catch up with -current.
 1.38.2.11 11-Dec-2005  christos Sync with head.
 1.38.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.38.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.38.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.38.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.38.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.38.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.38.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.38.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.38.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.38.2.1 03-Aug-2004  skrll Sync with HEAD
 1.43.2.4 11-Aug-2007  bouyer Regen for ticket 11356
 1.43.2.3 15-Jul-2004  he branches: 1.43.2.3.2; 1.43.2.3.4;
Pull up regenerated files (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.43.2.2 02-Jul-2004  he Pull up regenerated files (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.43.2.1 30-Jun-2004  jdc Pull up revision 1.44 (requested by abs in ticket #567).

Regenerate from master config files
 1.43.2.3.4.1 11-Aug-2007  bouyer regen for ticket 11356
 1.43.2.3.2.1 11-Aug-2007  bouyer regen for ticket 11356
 1.46.2.1 29-Apr-2005  kent sync with -current
 1.47.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.47.2.1 12-Feb-2005  yamt sync with head.
 1.52.2.3 05-Nov-2005  tron Regen for ticket #929.
 1.52.2.2 14-Aug-2005  riz Pull up revision 1.58 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.52.2.1 18-Jul-2005  riz Pull up revision 1.57 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.56.2.4 21-Jan-2008  yamt sync with head
 1.56.2.3 03-Sep-2007  yamt sync with head.
 1.56.2.2 30-Dec-2006  yamt sync with head.
 1.56.2.1 21-Jun-2006  yamt sync with head.
 1.65.4.1 09-Sep-2006  rpaulo sync with head
 1.65.2.1 18-Feb-2006  yamt sync with head.
 1.66.2.1 22-Apr-2006  simonb Sync with head.
 1.68.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.68.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.68.2.3 03-Sep-2006  yamt sync with head.
 1.68.2.2 11-Aug-2006  yamt sync with head
 1.68.2.1 01-Apr-2006  yamt sync with head.
 1.69.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.70.2.1 22-Sep-2006  riz Regen for ticket #170
 1.72.4.2 10-Dec-2006  yamt sync with head.
 1.72.4.1 22-Oct-2006  yamt sync with head
 1.72.2.1 18-Nov-2006  ad Sync with head.
 1.74.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.74.16.2 03-Oct-2007  garbled Sync with HEAD
 1.74.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.74.10.1 11-Jul-2007  mjf Sync with head.
 1.74.8.2 20-Aug-2007  ad Sync with HEAD.
 1.74.8.1 09-Jun-2007  ad Sync with head.
 1.74.2.1 06-Jun-2007  bouyer Regen for ticket 699.
 1.76.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.76.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.78.2.2 09-Jan-2008  matt sync with HEAD
 1.78.2.1 06-Nov-2007  matt sync with HEAD
 1.79.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.79.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.80.16.1 19-Oct-2008  haad Sync with HEAD.
 1.80.12.2 10-Oct-2008  skrll Sync with HEAD.
 1.80.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.80.10.2 11-Aug-2010  yamt sync with head.
 1.80.10.1 04-May-2009  yamt sync with head.
 1.80.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.80.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.83.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.84.6.2 05-Mar-2011  rmind sync with head
 1.84.6.1 30-May-2010  rmind sync with head
 1.84.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.84.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.96.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.96.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.96.2.3 30-Oct-2012  yamt sync with head
 1.96.2.2 23-May-2012  yamt sync with head.
 1.96.2.1 17-Apr-2012  yamt sync with head
 1.97.2.3 02-Jun-2012  mrg sync to latest -current.
 1.97.2.2 29-Apr-2012  mrg sync to latest -current.
 1.97.2.1 18-Feb-2012  mrg merge to -current.
 1.110.2.4 03-Dec-2017  jdolecek update from HEAD
 1.110.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.110.2.2 23-Jun-2013  tls resync from head
 1.110.2.1 25-Feb-2013  tls resync with head
 1.120.2.2 18-May-2014  rmind sync with head
 1.120.2.1 28-Aug-2013  rmind sync with head
 1.123.2.1 10-Aug-2014  tls Rebase.
 1.125.4.1 22-Sep-2015  skrll Sync with HEAD
 1.126.10.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.130.4.1 10-Jun-2019  christos Sync with HEAD
 1.130.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.137.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 10-Feb-2002  is Remove INSTWDCPCM, because for a while now, GENERIC (and INSTALL) have
included both pcmcia support, and wdc instead of idesc as the driver for
the Amiga internal ATA connector.
 1.9 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.8 27-Jan-2002  jdolecek normalize description of INSECURE and SCSIVERBOSE
 1.7 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.6 11-Jun-2001  wiz branches: 1.6.2; 1.6.8;
Fix various misspellings of compatible/compatibility.
 1.5 04-Oct-2000  is branches: 1.5.2; 1.5.4;
Regenerate from INSTALL.
 1.4 25-Sep-2000  abs Use "options<SPACE><TAB>" not "options<TAB>" - noted by simonb.
Move VNODE_OP_NOINLINE and NFS_V2_ONLY into '# Filesystem options' section.
Consistently label '# Filesystem options' and '#File systems' sections.
 1.3 25-Sep-2000  abs Ensure all INSTALL config files have (at least) COPTS="-Os", cincluding bebox
based on it working already for macppc.
Also add commented out:
#options VNODE_OP_NOINLINE # Don't inline vnode op calls
#options NFS_V2_ONLY # Exclude NFS3 and NQNFS code
as suggestions for additional savings
 1.2 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.1 29-Aug-2000  is branches: 1.1.2;
Stripped down Install kernels (no audio, no OSI or Xerox networking, no
scanners).
INSTWDCPCM has the wdc instead of the idesc, and the PCMCIA support, so
that people can test it easily.
 1.1.2.3 02-Nov-2000  tv Pullup patch [is]:
Add rnd.
 1.1.2.2 02-Sep-2000  is synchronize with GENERIC, permission by thorpej.
 1.1.2.1 29-Aug-2000  is file INSTWDCPCM was added on branch netbsd-1-5 on 2000-09-02 21:40:18 +0000
 1.5.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.5.2.1 04-Oct-2000  bouyer file INSTWDCPCM was added on branch thorpej_scsipi on 2000-11-20 19:58:25 +0000
 1.6.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.6.8.1 11-Jun-2001  nathanw file INSTWDCPCM was added on branch nathanw_sa on 2002-01-08 00:22:58 +0000
 1.6.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.6.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6 22-Sep-2018  maxv Remove isic(4). It is part of ISDN, which we are now retiring.
 1.5 11-Apr-2003  drochner branches: 1.5.192; 1.5.194;
IPR_VJ -> IRIP_VJ
 1.4 25-Mar-2002  is the big ISDN renaming
 1.3 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.2 23-Jan-2001  is branches: 1.2.2; 1.2.6; 1.2.10;
adjust comments to reality
 1.1 21-Jan-2001  is Amiga part of isdn4bsd, and an example kernel configuration file.
 1.2.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 23-Jan-2001  bouyer file ISDN was added on branch thorpej_scsipi on 2001-02-11 19:08:45 +0000
 1.5.194.1 10-Jun-2019  christos Sync with HEAD
 1.5.192.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 03-Feb-1994  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.38 30-Aug-2023  andvar s/Piccalo/Piccolo/ in device description.
 1.37 30-Aug-2023  andvar fix build for amiga MDINSTALL kernel config.
bppcsc0 and cbiiisc0 should attach to p5bus0 and p5bus to zbus0.
 1.36 29-May-2022  andvar s/littel/little/ mainly in copy pasted comments.
 1.35 13-Dec-2016  christos wildcard speaker attachments, now that we can handle many of them.
 1.34 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.33 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.32 21-Aug-2015  uebayasi branches: 1.32.2;
Add `pseudo-device ksyms' where `options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
 1.31 04-Oct-2013  rkujawa branches: 1.31.6;
Nuke long dead NKPTADD and NKPTADDSHIFT options from config files.
 1.30 22-Nov-2011  tls branches: 1.30.8; 1.30.12;

The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself. Move it to std. This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports. Thanks to Havard Eidnes for
pointing them out.
 1.29 14-Jan-2011  phx branches: 1.29.8;
Driver for BlizzardPPC 603e+ SCSI host adatper.
Patch submitted by Radoslaw Kujawa.
 1.28 23-Nov-2010  hannken Remove unused count from pseudo-device md.
 1.27 06-Feb-2009  jym branches: 1.27.6;
Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
 1.26 02-Oct-2006  chs branches: 1.26.56; 1.26.64;
remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.25 05-Feb-2006  cube branches: 1.25.14; 1.25.16;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.24 07-Dec-2005  tsutsui branches: 1.24.2; 1.24.4; 1.24.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.23 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.
 1.22 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.21 18-Feb-2005  dsl branches: 1.21.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.20 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.19 13-Jan-2005  is branches: 1.19.2; 1.19.4;
No more idesc please - we use the wdc driver.
 1.18 21-Nov-2004  is no more idesc please, use wdc instead.
 1.17 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.16 10-Apr-2003  christos branches: 1.16.2; 1.16.4;
Bye Bye UCONSOLE
 1.15 18-Sep-2002  lukem regen for: enable USERCONF
 1.14 05-Jul-2002  abs Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
 1.13 30-May-2002  thorpej Tweak a comment so that it doens't turn into a trigraph if
the config file is included in the kernel source.
 1.12 25-Apr-2002  atatat branches: 1.12.2; 1.12.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.11 19-Apr-2002  heinz Add options for console fonts
 1.10 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.9 02-Apr-2002  lukem Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
 1.8 10-Mar-2002  lukem * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
 1.7 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.6 27-Jan-2002  jdolecek normalize description of INSECURE and SCSIVERBOSE
 1.5 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.4 24-Sep-2000  jdolecek branches: 1.4.4; 1.4.8;
don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.3 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.2 17-May-1999  is branches: 1.2.2;
allow more than one ed, es or qn
 1.1 17-Apr-1999  is branches: 1.1.2;
Cut-down kernel for miniroot installation.
Leave everything out that isn't needed.
 1.1.2.3 18-Jun-1999  perry pullup 1.1->1.2 (is): Allow more than one ed,ed or qn i/f
 1.1.2.2 17-Apr-1999  is branches: 1.1.2.2.2; 1.1.2.2.4;
pullup from -current:
Cut-down kernel for miniroot installation.
Leave everything out that isn't needed.
 1.1.2.1 17-Apr-1999  is branches: 1.1.2.1.2; 1.1.2.1.4;
file MDINSTALL was added on branch netbsd-1-4 on 1999-04-17 20:18:09 +0000
 1.1.2.2.4.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.1.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1.2.1.4.1 locked by: joerg; 17-Apr-1999  itojun file MDINSTALL was added on branch netbsd-1-4 on 1999-11-30 13:31:50 +0000
 1.1.2.1.2.1 locked by: joerg; 17-Apr-1999  thorpej file MDINSTALL was added on branch netbsd-1-4 on 1999-06-21 00:46:39 +0000
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.4.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.6 01-Aug-2002  nathanw Catch up to -current.
 1.4.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.4.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.4.1 30-May-2002  tv Pull up revision 1.13 (requested by thorpej in ticket #95):
Tweak a comment so that it doens't turn into a trigraph if
the config file is included in the kernel source.
 1.12.2.2 16-Jul-2002  gehenna catch up with -current.
 1.12.2.1 09-Jul-2002  gehenna catch up with -current.
 1.16.4.1 15-Jul-2004  he branches: 1.16.4.1.2;
Pull up revision 1.17 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.16.4.1.2.1 05-Mar-2005  he Pull up revision 1.18 (requested by is in ticket #1011):
Remove use of ``idesc'', use ``wdc'' instead.
 1.16.2.9 11-Dec-2005  christos Sync with head.
 1.16.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.16.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.16.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.16.2.4 29-Nov-2004  skrll Sync with HEAD.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.4.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.4.1 12-Feb-2005  yamt sync with head.
 1.19.2.1 29-Apr-2005  kent sync with -current
 1.21.6.2 30-Dec-2006  yamt sync with head.
 1.21.6.1 21-Jun-2006  yamt sync with head.
 1.24.6.1 22-Apr-2006  simonb Sync with head.
 1.24.4.1 09-Sep-2006  rpaulo sync with head
 1.24.2.1 18-Feb-2006  yamt sync with head.
 1.25.16.1 22-Oct-2006  yamt sync with head
 1.25.14.1 18-Nov-2006  ad Sync with head.
 1.26.64.1 03-Mar-2009  skrll Sync with HEAD.
 1.26.56.1 04-May-2009  yamt sync with head.
 1.27.6.1 05-Mar-2011  rmind sync with head
 1.29.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.8.1 17-Apr-2012  yamt sync with head
 1.30.12.1 18-May-2014  rmind sync with head
 1.30.8.2 03-Dec-2017  jdolecek update from HEAD
 1.30.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.6.2 05-Feb-2017  skrll Sync with HEAD
 1.31.6.1 22-Sep-2015  skrll Sync with HEAD
 1.32.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.15 26-May-2019  sevan Include bsd.own.mk so that ${TOOL_SED} in expanded correctly
 1.14 25-Oct-2008  apb branches: 1.14.82;
Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.13 17-Oct-2007  garbled branches: 1.13.16; 1.13.20; 1.13.26;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.12 07-Sep-2007  lukem Change AMIGA to just include GENERIC and disable the DraCo stuff.
 1.11 07-Sep-2007  lukem Change WSCONS to just include GENERIC, enable wscons devices,
and disable conflicting other-style console devices.
 1.10 18-Jun-2002  lukem branches: 1.10.22; 1.10.64; 1.10.72; 1.10.78; 1.10.82; 1.10.84;
Use m4 instead of cpp to generate the various kernel configurations,
since cpp is the "C compiler pre-processor", and as such, isn't really
suited to parsing non-C-language files...
 1.9 13-Mar-2002  jandberg branches: 1.9.4;
added WSCONS config file and makefile target to generate it
 1.8 27-Jan-2002  jdolecek take care to undo some cpp's whitespace changes when
generating the kernel configs
 1.7 25-Jan-2001  is branches: 1.7.4; 1.7.8;
Two suggestions by jhawk:
- be more verbose about what file is created
- adjust copied $NetBSD...$ from $ NetBSD to NetBSD.
 1.6 04-Oct-2000  is Reimplement the INSTALL changes in GENERIC and Makefile.
 1.5 01-Apr-2000  is Start to define an INSTALL kernel.
 1.4 10-Apr-1999  tron branches: 1.4.2;
Fix dependences and discard irrelevant "cpp" error message.
 1.3 09-Mar-1999  is branches: 1.3.2;
Don't predefine anything
 1.2 15-Feb-1999  is Create a RCS id in the generated configuration file
 1.1 04-Feb-1999  is In the future, the AMIGA and DRACO example files will be generated from
GENERIC by make in this directory. This way, they hopefully will stay
up-to-date.
 1.3.2.1 12-Apr-1999  tron branches: 1.3.2.1.2;
Pull up revision 1.4:
Fix dependences and discard irrelevant "cpp" error message.
 1.3.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.7.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.7.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.7.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.4.1 16-Jul-2002  gehenna catch up with -current.
 1.10.84.1 06-Nov-2007  matt sync with HEAD
 1.10.82.1 02-Oct-2007  joerg Sync with HEAD.
 1.10.78.1 10-Sep-2007  skrll Sync with HEAD.
 1.10.72.1 03-Oct-2007  garbled Sync with HEAD
 1.10.64.1 09-Oct-2007  ad Sync with head.
 1.10.22.1 27-Oct-2007  yamt sync with head.
 1.13.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.13.20.1 04-May-2009  yamt sync with head.
 1.13.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.14.82.1 10-Jun-2019  christos Sync with HEAD
 1.111 22-Sep-2018  rin - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
 1.110 05-Mar-2018  christos branches: 1.110.2; 1.110.4;
gcc-6 passes -m68040 to the assembler, so reset it to -m68030...
 1.109 06-Sep-2015  uebayasi Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of
${MD_OBJS}.

${MD_OBJS} should be used only for objects that must be linked first (i.e.,
start code). Objects have to be compiled following common compile rules,
and have to be generated into common places (i.e., top of kernel build
directory).

${MD_LIBS} defines libraries that are built by separate makefiles, under
separate directories. `Makefile.kern.inc' doesn't know intermediate library
objects.
 1.108 25-May-2015  mlelstv Don't use conflicting parameters for compiler and assembler.
 1.107 21-Jan-2011  joerg branches: 1.107.14; 1.107.30; 1.107.32;
Switch remaining platforms to modern CPP for assembler.
 1.106 25-Jan-2009  abs branches: 1.106.6; 1.106.8; 1.106.10;
Abstract out setting of '-m680X0' based on -DM68020, -DM68030,
-DM68040, and -DM68060 into sys/arch/m68k/Makefile.cmachflags and
include from both atari and amiga. Other m68k ports which build
kernels that support multiple CPU types can also switch across to
this.
 1.105 25-Jan-2008  joerg branches: 1.105.10; 1.105.18;
Add assym.h dependencies.
 1.104 11-Dec-2005  christos branches: 1.104.50; 1.104.56;
merge ktrace-lwp.
 1.103 31-May-2005  christos branches: 1.103.2;
s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
 1.102 04-Jun-2004  thorpej Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
 1.101 26-Nov-2002  thorpej branches: 1.101.6; 1.101.10;
The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
 1.100 04-Jun-2002  thorpej Don't use -traditional-cpp if HAVE_GCC3.
 1.99 26-May-2002  jdolecek pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.98 09-Dec-2001  atatat branches: 1.98.8; 1.98.10;
Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
 1.97 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.96 26-Oct-2001  jmc branches: 1.96.2;
Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
 1.95 23-Oct-2001  thorpej branches: 1.95.2;
Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
 1.94 29-May-2001  mrg branches: 1.94.2;
define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
 1.93 08-May-2001  is defopt LEV6_DEFER.
 1.92 03-Feb-2001  is branches: 1.92.2;
gspa can directly create the C language array.
 1.91 13-Jan-2001  aymeric Pass CPPFLAGS to gcc in NORMAL_G, plus minor change: ; -> &&
 1.90 17-Dec-2000  jdolecek delete obsolete comment
 1.89 09-May-2000  hubertf Add "install" target, so "make install" after building the kernel
does something useful. The target can be redefined by putting a
install-kernel-${MACHINE_NAME} target that fits your needs into
/etc/mk.conf.
 1.88 09-May-2000  thorpej HAVE_GCC28 -> HAVE_EGCS, and make it match gcc 2.9 as well. Also,
make the use of -Wno-uninitialized explicit, don't rely on a compiler
hack to do it for us.
 1.87 01-Feb-2000  tsutsui Revert STRIPPROG -> STRIP
 1.86 24-Jan-2000  tron Add "dependall" target for comfort.
 1.85 19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.84 19-Jan-2000  tsutsui Change STRIPFLAGS=-g for cross-toolchains.
 1.83 07-Sep-1999  is branches: 1.83.2;
Uhm... multi-cpu kernels containign M68020 support won't assemble without
this. Sorry for the inconvenience.
 1.82 26-Jul-1999  cgd be more efficient when doing the SYSTEM_LD_TAIL for -g kernels: don't
copy them just to strip them, use strip -o.
 1.81 09-Jul-1999  mrg clean up a bit after jason :)

- fix emitrules() like emitfiles() to deal with the prefix (otherwise it
would attempt to find the file in the normal base for the NORMAL_C rule).
- add emitincludes() which adds include directives for each prefix to the
$INCLUDES variable in the makefile.
- add %INCLUDES to each Makefile.arch to deal with the above.

this makes "prefix" actually work in a usable manner, and now i can move
on to fixing compiler warnings (errors) in the ESP code. :)
 1.80 15-Jan-1999  thorpej branches: 1.80.2; 1.80.4;
Some minor, mostly costmetic, changes to CPPFLAGS/CFLAGS.
 1.79 15-Jan-1999  thorpej Don't define "mc68020". Nothing uses it.
 1.78 08-Jan-1999  augustss Add -Wpointer-arith warning since `void *' arithmetic is not ANSI C.
 1.77 15-Oct-1998  drochner change handling of libkern:
-sys/lib/libkern builds as library per default (as it was documented all
the time)
-ports able to LKM set "KERN_AS=obj" explicitely in their Makefiles
(for now; should depend on actual "option LKM" or -better- functions
included for LKM use should be pulled in by a stub)
-always link libcompat before libkern - libkern stuff can be referred to
by libcompat, but not the other way
 1.76 05-Sep-1998  lukem distclean is a synonym for cleandir
 1.75 31-May-1998  thorpej Specify a non-profiling C rule.
 1.74 24-May-1998  is Last part of the opt_m68kcpu.h backout.
 1.73 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.72 24-May-1998  is - remove some dependency lines which aren't needed anymore due to opt_m68kcpu.h
- There isn't any vfs_conf.o anymore.
 1.71 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.70 12-Apr-1998  tv Add -Wno-main conditional on compiler being gcc 2.8 or egcs. (This adds
a HAVE_GCC28 check-variable that can now be used to add other gcc-2.8
flags in cases where they may be useful, or to remove gcc 2.7.2 "bug
workaround" flags.)
 1.69 12-Nov-1997  thorpej Make sure CPP, AR, AS, and RANLIB are defined.
 1.68 12-Nov-1997  thorpej Define LORDER, NM, and TSORT here, like we do the rest of the tools.
 1.67 09-Oct-1997  is branches: 1.67.2;
Help crosscompiling, by as -> $(AS). Define AS?= as in the calling
Makefile.$(ARCH)es. Will hopefully fix the (remaining) part or pr4010.
 1.66 07-Oct-1997  is Oops, I forgot this when doing the recent 060sp make system change.
 1.65 05-Oct-1997  veego Update the 'depend on CPU configuration' section for the new or updated
ncr53c9x frontends.
 1.64 03-Oct-1997  lukem define SIZE?=size, and use ${SIZE} instead of size. makes cross
compilation easier
 1.63 30-Sep-1997  christos PR/4162: Chris Jones: make cleandir does not work properly; it does not
remove the object files and the .depend file in the kernel build directory.
 1.62 12-Sep-1997  mycroft Move definition of FPCOPROC into the Makefile, since it's always required.
 1.61 12-Sep-1997  mycroft Nuke Locore.c. It's way too out of date to be useful at this point.
 1.60 23-Jul-1997  is branches: 1.60.2;
Fix a complaint by Eric Delcamp on port-amiga... looks like Thorsten Fruehauf
didn't find all occurences of unprotected is_draco(), and I didn't look hard
enough, either, when fixing.
 1.59 12-Jul-1997  leo Generate assym.h dependencies when making 'depend'.
 1.58 23-Jun-1997  is Make aucc work in the presence of LEV6_DEFER.
 1.57 21-Jun-1997  is aucc.o depends on LEV6_DEFER
 1.56 22-May-1997  veego Use genassym.sh to facilitate cross-compiling and add -Wmissing-prototypes.
 1.55 04-Feb-1997  perry Nuke some options GENERIC residue.
 1.54 04-Feb-1997  perry Nuke some GENERIC residue.
 1.53 31-Jan-1997  veego :: -> : (pr #3154 with a minor change)
 1.52 01-Dec-1996  veego Fix typo in the last revision (missing S in ${COPTS}).
 1.51 01-Dec-1996  jonathan * Replace explicit -O2 in CFLAGS with COPTS macro. Default COPTS?= -O2.
Lets users over-ride with makeoptions COPTS="..." in kernel config files.

Leave `mandatory' flags (like -msoft-float which on m68k enforces no
FP in kernel) in CFLAGS.
 1.50 09-Sep-1996  mycroft Move strip(1) flags into a separate variable, so that $STRIP can
be passed to subordinate make(1)s. Remove $TOUCH. Add HOSTED_CC,
HOSTED_CPPFLAGS, and HOSTED_CFLAGS, and use them when depending genassym.
 1.49 31-Aug-1996  mycroft Wrap the default definition of `S' in `.ifndef'.
 1.48 12-Aug-1996  mycroft Put into . Remove hooks for `config-dependent' and
`device-driver' flags.
 1.47 10-Aug-1996  mycroft * Add a HOSTED_C_C variable, which strips `-p', `-pg', and
`-nostdinc', and use it when building genassym.
* Use `-nostdinc' just to be sure we're self-contained.
 1.46 10-Aug-1996  mycroft * Define CWARNFLAGS and MKDEP in some moderately consistent fashion.
* Make S expand to an absolute path at compile time.
* Use `-S' rather than `-x' to remove debugging symbols.
* Garbage collect unused variables.
* Reverse a handful of port-specific changes that do not correspond to
the common build model and are not needed.
 1.45 16-May-1996  is - tell new version of assembler to still accept 851/030 opcodes when compiling
with -m68060
- add -Wall -Wstrict-prototypes
 1.44 15-May-1996  is Now that we imported the 68060 software support package and committed the
glue code for it, activate this again.
 1.43 12-May-1996  is Disable .include of arch/m68k/060sp/Makefile.inc for now.
 1.42 11-May-1996  mycroft Make `make depend' work for libraries.
 1.41 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.40 15-Mar-1996  is If compiling with "options M68060", tell compiler not to use
instructions which have to be emulated by the operating system on that
chip. This code will still run on M68020, M68030 and M68040, but
might be a bit slower on those chips.
 1.39 29-Feb-1996  cgd Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them. From PR 2142, OK'd
by mycroft.
 1.38 26-Feb-1996  mycroft Define build programs with `?=', so they can be overridden with `makeoptions'.
 1.37 09-Feb-1996  mycroft Fix mkdep problems due to missing flags.
 1.36 03-Feb-1996  mycroft Use `-traditional-cpp' when building .s and .S files.
 1.35 02-Feb-1996  mycroft Clone these, and fix many bugs.
 1.34 02-Feb-1996  mycroft assym.s -> assym.h
(Some ports did this already.)
 1.33 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.32 28-Jan-1996  chopps debug flag to as is uneeded and unsupported #1948
 1.31 14-Jan-1996  thorpej Remove vnode_if.[ch] during a "make clean", per PR#536 from
Dan Carosone <danielce@ee.mu.oz.au>.
 1.30 27-Dec-1995  chopps remove -fno-builtin (pr#1727) from Bernd Ernesti
 1.29 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.28 09-Oct-1995  chopps branches: 1.28.2;
revert last commits was a mistake
 1.27 09-Oct-1995  chopps add prototypes for isr stuff fixes pr# 1284 and 1569
 1.26 09-Oct-1995  chopps build grf_ultmscode.h
 1.25 19-Sep-1995  thorpej Compile the kernel with -Werror and -fno-builtin
 1.24 24-Jun-1995  christos Makefile.`arch`: - Add -lcompat
- Change clean: target to be a double dep one,
so libraries can use the clean target too
- Add genassym to the clean targets
 1.23 16-May-1995  jtc Removing -DKERNEL, transition to _KERNEL has been completed
 1.22 23-Mar-1995  jtc Added -D_KERNEL to CFLAGS alongside each -DKERNEL.
 1.21 26-Oct-1994  cgd new RCS ID format.
 1.20 06-Jul-1994  chopps update for FPSP changes (taken from hp300)
 1.19 15-Jun-1994  chopps include more device .h files, update Makefile.amiga to use new
vnode_if.x gerating procedure
 1.18 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.17 11-May-1994  chopps compile genassym static and add adosfs to GENERIC
 1.16 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.15 16-Apr-1994  cgd kill symbols.{raw,sort}; no longer necessary, with kvm dbs.
 1.14 12-Apr-1994  chopps vmunix? no, we are netbsd.
 1.13 28-Mar-1994  chopps cc not gcc, cpp not /lib/cpp -traditional
 1.12 20-Mar-1994  chopps fix shell command for linking. (from Stephen J. Roznows)
 1.11 24-Feb-1994  chopps change -O2 back to -O, may be inappropriate with some versions of gcc.
 1.10 22-Feb-1994  chopps kernel now linked with dist ld.
 1.9 17-Feb-1994  chopps modified to use generic cons.
 1.8 13-Feb-1994  chopps chnaged to handle new (and removed) files.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps updated files for scsi re-org.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 31-Jul-1993  mycroft Add RCS indentifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.28.2.1 10-Nov-1995  chopps update grf_ul; support files now only used if needed.
 1.60.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.60.2.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.67.2.1 12-Nov-1997  thorpej Pull up "make sure tools are defined" changes from trunk.
 1.80.4.1 02-Aug-1999  thorpej Update from trunk.
 1.80.2.1 23-Sep-1999  cgd pull up rev 1.82 from trunk (requested by is):
Be more efficient when linking kernels with debugging symbols. (Don't
copy them just to strip them, use strip -o.)
 1.83.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.83.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.83.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.83.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.92.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.94.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.94.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.95.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.96.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.96.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.96.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.96.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.96.2.1 26-Oct-2001  nathanw file Makefile.amiga was added on branch nathanw_sa on 2002-01-08 00:22:58 +0000
 1.98.10.1 28-May-2002  tv Pull up revision 1.99 (requested by jdolecek):
pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.98.8.2 09-Jul-2002  gehenna catch up with -current.
 1.98.8.1 30-May-2002  gehenna Catch up with -current.
 1.101.10.1 06-Feb-2005  jmc Pull up patch (requested by martti in ticket #1086)
Move ipf to sys/dist/ipf and sync w. trunk
 1.101.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.101.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.101.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.101.6.1 03-Aug-2004  skrll Sync with HEAD
 1.103.2.1 04-Feb-2008  yamt sync with head.
 1.104.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.104.50.1 23-Mar-2008  matt sync with HEAD
 1.105.18.1 03-Mar-2009  skrll Sync with HEAD.
 1.105.10.1 04-May-2009  yamt sync with head.
 1.106.10.1 08-Feb-2011  bouyer Sync with HEAD
 1.106.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.106.6.1 05-Mar-2011  rmind sync with head
 1.107.32.2 22-Sep-2015  skrll Sync with HEAD
 1.107.32.1 06-Jun-2015  skrll Sync with HEAD
 1.107.30.1 26-May-2015  msaitoh Pull up following revision(s) (requested by mlelstv in ticket #804):
sys/arch/amiga/conf/Makefile.amiga: revision 1.108
Don't use conflicting parameters for compiler and assembler.
 1.107.14.1 03-Dec-2017  jdolecek update from HEAD
 1.110.4.1 10-Jun-2019  christos Sync with HEAD
 1.110.2.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.8 23-Nov-2010  hannken Remove unused count from pseudo-device md.
 1.7 06-Feb-2009  jym branches: 1.7.6;
Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
 1.6 02-Apr-2002  lukem branches: 1.6.116; 1.6.124;
Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
 1.5 10-Mar-2002  lukem * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
 1.4 30-Aug-2000  is branches: 1.4.4; 1.4.8;
Use an INSTALL kernel, instead of GENERIC. We want this to be as small as
possible so that it can boot even on low memory Amiga machines.
 1.3 08-Aug-1998  kleink branches: 1.3.12; 1.3.22;
Reduce this file as done in the Alpha RAMDISK configuration, which makes
keeping it in sync less prone to errors.
 1.2 04-Aug-1998  kleink Kill "options FIFO" - they're mandatory now.
 1.1 03-Jul-1998  mhitch A "GENERIC" kernel configured with a memory disk root. The miniroot can
now be inserted into the kernel for a self-contained installation kernel.
No more questions or problems trying to copy the miniroot to the swap
partition.
 1.3.22.2 30-Aug-2000  is Back out last change. This should have gone to the main branch.
 1.3.22.1 30-Aug-2000  is Switch RAMDISK to use the INSTALL kernel as a base.
We want it to be as small as possible, to have some chance to boot on
small Amiga machines.
 1.3.12.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.4.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.4.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6.124.1 03-Mar-2009  skrll Sync with HEAD.
 1.6.116.1 04-May-2009  yamt sync with head.
 1.7.6.1 05-Mar-2011  rmind sync with head
 1.3 03-Feb-1994  mycroft Clean up deleted files.
 1.2 01-Feb-1994  chopps updated files for scsi re-org.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.73 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.72 07-Mar-2020  is Whitespace police
 1.71 04-Nov-2016  phx branches: 1.71.16;
wscons and Xorg support for Tseng ET4000/W32 based boards (grf6).
 1.70 03-Oct-2016  rkujawa Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.69 16-Nov-2015  phx branches: 1.69.2;
wscons and Xorg support for CirrusLogic GD542x based boards (grf3).
 1.68 13-Nov-2015  phx Make sure the graphics device which has the console gets wsdisplay0,
otherwise neither virtual terminals nor Xorg's wsfb driver will work.
 1.67 03-Oct-2013  rkujawa branches: 1.67.6;
Enable USB keyboard and mouse in the WSCONS kernel.
 1.66 17-Aug-2012  abs branches: 1.66.2; 1.66.4;
Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
 1.65 07-Jun-2012  rkujawa Enable empb in GENERIC, fix build, rearrange files.amiga.
 1.64 24-Jan-2012  rkujawa Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.63 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.62 17-Oct-2007  garbled branches: 1.62.54; 1.62.58;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.61 07-Sep-2007  lukem Change WSCONS to just include GENERIC, enable wscons devices,
and disable conflicting other-style console devices.
 1.60 20-Aug-2007  is branches: 1.60.2;
Regenerate after addition of wdc_buddha.
 1.59 19-Aug-2007  is regenerate after removal of OSI networking
 1.58 16-Jul-2007  he branches: 1.58.4; 1.58.8;
Regenerated files after adding COMPAT_40.
 1.57 06-Jun-2007  martin regen
 1.56 12-Nov-2006  jmmv branches: 1.56.2; 1.56.8; 1.56.10; 1.56.16; 1.56.18;
Regen. Per bernd@'s instructions.
 1.55 11-Nov-2006  jmmv Remove tmpfs's experimental status. OK'ed by core@.
 1.54 26-Aug-2006  christos branches: 1.54.2; 1.54.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.53 26-Aug-2006  tsutsui Regen from GENERIC.in:
1.54:
> Disable SYSTRACE by default on all kernels (discussed with core)
1.55:
> Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.52 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.51 30-Jun-2006  tsutsui branches: 1.51.2;
Regen from GENERIC.in rev 1.53:
> Add CARP to further platforms
 1.50 28-Mar-2006  pavel branches: 1.50.4;
regen (added stf).
 1.49 05-Feb-2006  cube branches: 1.49.2; 1.49.4; 1.49.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.48 04-Feb-2006  rpaulo regen
 1.47 03-Feb-2006  reinoud branches: 1.47.2;
Regen GENERIC config files.
 1.46 10-Dec-2005  tsutsui branches: 1.46.2; 1.46.4;
Regen from GENERIC.in rev 1.48:
> Add veriexec stuff to the common config file.
 1.45 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.47:
> Remove obsolete options VNODE_OP_NOINLINE.
 1.44 07-Dec-2005  tsutsui Regen from GENERIC.in rev 1.46:
> Adjust comments for options FFS_NO_SNAPSHOT.
 1.43 03-Nov-2005  chs regen
 1.42 07-Oct-2005  tsutsui Regen from GENERIC.in rev 1.44:
> Add (commented out) file-system TMPFS in a proper file.

XXX: It seems `INSTALL_CONFIGURATION' in GENERIC.in should be reorganaized.
 1.41 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.40 19-Aug-2005  christos 64 bit inode changes.
 1.39 31-Jul-2005  yamt regen.
 1.38 30-Jul-2005  yamt regen.
 1.37 17-Jul-2005  hubertf Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.36 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.35 26-Jun-2005  rpaulo branches: 1.35.2;
Correct RCS Ids.
 1.34 26-Jun-2005  rpaulo Add PTYFS (commented out) in the correct form.
 1.33 09-Jun-2005  tsutsui Regen from GENERIC.in rev 1.36:
> - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
> (still commented out)
> - Add (also commented out) options BUFQ_PRIOCSCAN.
>
> Suggested by perry and soda on tech-kern.
> Please refer options(4) for details for these options.
 1.32 01-Jun-2005  jandberg regen: wsmux added (enabled only in WSCONS)
 1.31 25-Feb-2005  simonb branches: 1.31.2;
Regen for COMPAT_20 addition.
 1.30 20-Feb-2005  jdolecek regen: add SMBFS/nsmb, per PR port-amiga/29066 by Florian Stoehr
 1.29 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.28 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.27 31-Jan-2005  hannken Regen.
 1.26 17-Jan-2005  cube branches: 1.26.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.25 13-Jan-2005  is branches: 1.25.2;
Regenerate from GENERIC.in: no more idesc - we're using wdc.
 1.24 10-Nov-2004  christos Add COMPAT_BSDPTY on all the kernels that have COMPAT options.
 1.23 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.22 28-Jun-2004  bouyer Regen, added P1003_1B_SEMAPHORE.
 1.21 26-Jun-2004  abs Regenerate from master config files
 1.20 23-Feb-2004  jandberg branches: 1.20.2;
regen after wsfont changes
 1.19 08-Oct-2003  bouyer Regen: add atabus
 1.18 22-Sep-2003  jandberg regen after wsmouse addition
 1.17 22-Sep-2003  cl regen
 1.16 27-Jul-2003  is Regenerate from GENERIC.in to include pseudo-device ksyms, where
appropriate.
 1.15 16-Apr-2003  is branches: 1.15.2;
make /dev/reload optional (it is implemented for a.out kernels only, at
the moment.)
 1.14 10-Apr-2003  christos Bye Bye UCONSOLE
 1.13 27-Feb-2003  perseant Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
 1.12 22-Nov-2002  wiz regen
 1.11 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.10 06-Oct-2002  provos regen from GENERIC.in
 1.9 18-Sep-2002  lukem regen for: enable USERCONF
 1.8 05-Jul-2002  abs Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
 1.7 18-Jun-2002  lukem Regenerate with new m4 mechanism (vs old cpp mechanism).
New files are same as old (except for whitespace differences), except
that the new GENERIC doesn't have melody, because GENERIC defines
DRACO and the latter can't have it.
 1.6 17-Jun-2002  lukem regen for clockctl
 1.5 30-May-2002  thorpej Regenerate.
 1.4 25-Apr-2002  atatat branches: 1.4.2; 1.4.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.3 19-Apr-2002  heinz regen after GENERIC v1.178
 1.2 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.1 13-Mar-2002  jandberg branches: 1.1.2; 1.1.6;
added WSCONS config file and makefile target to generate it
 1.1.6.7 11-Dec-2002  thorpej Sync with HEAD.
 1.1.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.1.6.5 01-Aug-2002  nathanw Catch up to -current.
 1.1.6.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.1 13-Mar-2002  nathanw file WSCONS was added on branch nathanw_sa on 2002-04-01 07:38:55 +0000
 1.1.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 13-Mar-2002  jdolecek file WSCONS was added on branch kqueue on 2002-03-16 15:55:49 +0000
 1.4.4.3 24-Oct-2002  lukem regen from GENERIC after ipfilter 3.4.29 upgrade
 1.4.4.2 01-Aug-2002  lukem Regenerate from GENERIC 1.179.4.2 (requested by lukem in ticket #314):
 1.4.4.1 30-May-2002  tv Pull up regen (requested by thorpej in ticket #94).
 1.4.2.2 16-Jul-2002  gehenna catch up with -current.
 1.4.2.1 09-Jul-2002  gehenna catch up with -current.
 1.15.2.11 11-Dec-2005  christos Sync with head.
 1.15.2.10 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.9 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.2.8 15-Feb-2005  skrll Sync with HEAD.
 1.15.2.7 04-Feb-2005  skrll Sync with HEAD.
 1.15.2.6 24-Jan-2005  skrll Sync with HEAD.
 1.15.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.15.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.4 11-Aug-2007  bouyer Regen for ticket 11356
 1.20.2.3 15-Jul-2004  he branches: 1.20.2.3.2; 1.20.2.3.4;
Pull up regenerated files (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.20.2.2 02-Jul-2004  he Pull up regenerated files (requested by bouyer in ticket #573):
Add options P1003_1B_SEMAPHORE to all GENERIC-like kernel
config files where SYSV* options were already present
(commented out if the SYSV* options are commented out).
Fixes PR#25897 and PR#25898.
 1.20.2.1 30-Jun-2004  jdc Pull up revision 1.21 (requested by abs in ticket #567).

Regenerate from master config files
 1.20.2.3.4.1 11-Aug-2007  bouyer regen for ticket 11356
 1.20.2.3.2.1 11-Aug-2007  bouyer regen for ticket 11356
 1.25.2.1 29-Apr-2005  kent sync with -current
 1.26.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.26.2.1 12-Feb-2005  yamt sync with head.
 1.31.2.3 05-Nov-2005  tron Regen for ticket #929.
 1.31.2.2 14-Aug-2005  riz Pull up revision 1.37 (requested by hubertf in ticket #625):
Add support for reading cloop2 compressed filesystem images,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
 1.31.2.1 18-Jul-2005  riz Pull up revision 1.36 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.35.2.4 27-Oct-2007  yamt sync with head.
 1.35.2.3 03-Sep-2007  yamt sync with head.
 1.35.2.2 30-Dec-2006  yamt sync with head.
 1.35.2.1 21-Jun-2006  yamt sync with head.
 1.46.4.1 09-Sep-2006  rpaulo sync with head
 1.46.2.1 18-Feb-2006  yamt sync with head.
 1.47.2.1 22-Apr-2006  simonb Sync with head.
 1.49.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.49.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.49.2.3 03-Sep-2006  yamt sync with head.
 1.49.2.2 11-Aug-2006  yamt sync with head
 1.49.2.1 01-Apr-2006  yamt sync with head.
 1.50.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.51.2.2 22-Sep-2006  riz Regen for ticket #170
 1.51.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #17):
sys/arch/sparc/conf/KRUPS: revision 1.38
sys/arch/i386/conf/XEN2_DOMU: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.197
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.53
sys/arch/evbsh5/conf/SIMULATOR: revision 1.12
sys/arch/sparc/conf/MRCOFFEE: revision 1.17
sys/arch/next68k/conf/GENERIC: revision 1.104
sys/arch/i386/conf/VIRTUALPC: revision 1.44
sys/arch/ews4800mips/conf/GENERIC: revision 1.11
sys/arch/evbsh5/conf/CAYMAN: revision 1.23
sys/arch/arc/conf/GENERIC: revision 1.141
sys/arch/amd64/conf/GENERIC: revision 1.103
sys/arch/sun3/conf/GENERIC3X: revision 1.90
sys/arch/evbarm/conf/HDL_G: revision 1.3
sys/arch/sun2/conf/GENERIC: revision 1.57
sys/arch/news68k/conf/GENERIC_TINY: revision 1.51
sys/arch/evbppc/conf/EXPLORA451: revision 1.27
sys/arch/amiga/conf/GENERIC.in: revision 1.54
sys/arch/mac68k/conf/GENERIC: revision 1.174
sys/arch/acorn26/conf/GENERIC: revision 1.45
sys/arch/shark/conf/GENERIC: revision 1.64
sys/arch/cesfic/conf/GENERIC: revision 1.44
sys/arch/mvme68k/conf/GENERIC: revision 1.68
sys/arch/i386/conf/XEN2_DOM0: revision 1.4
sys/arch/atari/conf/GENERIC.in: revision 1.63
sys/arch/amiga/conf/GENERIC: revision 1.240
sys/arch/i386/conf/LAMB: revision 1.65
sys/arch/i386/conf/GENERIC: revision 1.773
sys/arch/acorn32/conf/EB7500ATX: revision 1.26
sys/arch/x68k/conf/GENERIC: revision 1.128
sys/arch/vax/conf/GENERIC: revision 1.153
sys/arch/atari/conf/ATARITT: revision 1.81
sys/arch/mipsco/conf/GENERIC: revision 1.60
sys/arch/cobalt/conf/GENERIC: revision 1.101
sys/arch/evbarm/conf/ARMADILLO9: revision 1.13
sys/arch/ofppc/conf/GENERIC: revision 1.93
sys/arch/atari/conf/MILAN-PCIIDE: revision 1.51
sys/arch/arc/conf/RPC44: revision 1.26
sys/arch/sparc64/conf/GENERIC: revision 1.59
sys/arch/i386/conf/XEN3_DOMU: revision 1.2
sys/arch/hp700/conf/GENERIC: revision 1.68
sys/arch/atari/conf/MILAN-ISAIDE: revision 1.47
sys/arch/macppc/conf/GENERIC: revision 1.231
sys/arch/dreamcast/conf/GENERIC: revision 1.72
sys/arch/news68k/conf/GENERIC: revision 1.80
sys/arch/hp300/conf/GENERIC: revision 1.133
sys/arch/mmeye/conf/GENERIC: revision 1.82
sys/arch/macppc/conf/MAMBO: revision 1.2
sys/arch/cats/conf/GENERIC: revision 1.107
sys/arch/atari/conf/FALCON: revision 1.79
sys/arch/acorn32/conf/GENERIC: revision 1.71
sys/arch/sparc/conf/GENERIC: revision 1.190
sys/arch/news68k/conf/LIBERO: revision 1.40
sys/arch/amiga/conf/DRACO: revision 1.114
sys/arch/cobalt/conf/INSTALL: revision 1.23
sys/arch/luna68k/conf/GENERIC: revision 1.73
sys/arch/bebox/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.147
sys/arch/amiga/conf/WSCONS: revision 1.52
sys/arch/macppc/conf/POWERMAC_G5: revision 1.2
sys/arch/alpha/conf/ALPHA: revision 1.218
sys/arch/sun3/conf/GENERIC: revision 1.133
sys/arch/prep/conf/GENERIC: revision 1.124
sys/arch/alpha/conf/GENERIC: revision 1.291
sys/arch/atari/conf/HADES: revision 1.71
sys/arch/newsmips/conf/GENERIC: revision 1.93
sys/arch/netwinder/conf/GENERIC: revision 1.82
sys/arch/hpcmips/conf/GENERIC: revision 1.190
sys/arch/amiga/conf/AMIGA: revision 1.98
sys/arch/sbmips/conf/GENERIC: revision 1.54
sys/arch/pc532/conf/GENERIC: revision 1.64
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.53
Disable SYSTRACE by default on all kernels (discussed with core)
 1.54.4.1 10-Dec-2006  yamt sync with head.
 1.54.2.1 18-Nov-2006  ad Sync with head.
 1.56.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.56.16.2 03-Oct-2007  garbled Sync with HEAD
 1.56.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.56.10.1 11-Jul-2007  mjf Sync with head.
 1.56.8.4 12-Oct-2007  ad Fix merge errors.
 1.56.8.3 09-Oct-2007  ad Sync with head.
 1.56.8.2 20-Aug-2007  ad Sync with HEAD.
 1.56.8.1 09-Jun-2007  ad Sync with head.
 1.56.2.1 06-Jun-2007  bouyer Regen for ticket 699.
 1.58.8.2 02-Oct-2007  joerg Sync with HEAD.
 1.58.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.58.4.2 10-Sep-2007  skrll Sync with HEAD.
 1.58.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.60.2.1 06-Nov-2007  matt sync with HEAD
 1.62.58.1 18-Feb-2012  mrg merge to -current.
 1.62.54.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.62.54.2 30-Oct-2012  yamt sync with head
 1.62.54.1 17-Apr-2012  yamt sync with head
 1.66.4.1 18-May-2014  rmind sync with head
 1.66.2.2 03-Dec-2017  jdolecek update from HEAD
 1.66.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.67.6.3 05-Dec-2016  skrll Sync with HEAD
 1.67.6.2 05-Oct-2016  skrll Sync with HEAD
 1.67.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.69.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.69.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.71.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8 22-May-1994  mycroft Clean up deleted files.
 1.7 15-Apr-1994  chopps add COMPAT_09
 1.6 12-Apr-1994  chopps vmunix? no, we are netbsd.
 1.5 09-Mar-1994  ws Make FFS optional
 1.4 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps updated files for scsi re-org.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.6 22-May-1994  mycroft Clean up deleted files.
 1.5 15-Apr-1994  chopps add COMPAT_09
 1.4 12-Apr-1994  chopps vmunix? no, we are netbsd.
 1.3 09-Mar-1994  ws Make FFS optional
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.3 07-Sep-2007  lukem branches: 1.3.4;
Change AMIGA to just include GENERIC and disable the DraCo stuff.
 1.2 07-Sep-2007  lukem Change WSCONS to just include GENERIC, enable wscons devices,
and disable conflicting other-style console devices.
 1.1 19-Aug-2007  is branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Reminder to not change GENERIC etc. directly.
 1.1.8.3 02-Oct-2007  joerg Sync with HEAD.
 1.1.8.2 03-Sep-2007  jmcneill Sync with HEAD.
 1.1.8.1 19-Aug-2007  jmcneill file _READ_ME_FIRST_ was added on branch jmcneill-pm on 2007-09-03 16:47:07 +0000
 1.1.6.3 27-Oct-2007  yamt sync with head.
 1.1.6.2 03-Sep-2007  yamt sync with head.
 1.1.6.1 19-Aug-2007  yamt file _READ_ME_FIRST_ was added on branch yamt-lazymbuf on 2007-09-03 14:22:44 +0000
 1.1.4.3 10-Sep-2007  skrll Sync with HEAD.
 1.1.4.2 03-Sep-2007  skrll Sync with HEAD.
 1.1.4.1 19-Aug-2007  skrll file _READ_ME_FIRST_ was added on branch nick-csl-alignment on 2007-09-03 10:18:17 +0000
 1.1.2.1 06-Nov-2007  matt sync with HEAD
 1.3.4.2 09-Oct-2007  ad Sync with head.
 1.3.4.1 07-Sep-2007  ad file _READ_ME_FIRST_ was added on branch vmlocking on 2007-10-09 16:37:13 +0000
 1.3 08-May-1994  mycroft Clean up deleted files.
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.186 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.185 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.184 07-May-2022  msaitoh s/contrller/controller/ in comment.
 1.183 07-Mar-2020  is Whitespace police
 1.182 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.181 19-Dec-2018  maxv branches: 1.181.2;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.180 22-Sep-2018  maxv Remove isic(4). It is part of ISDN, which we are now retiring.
 1.179 06-Mar-2018  spz branches: 1.179.2;
if_xsh needs mii_bitbang; make a pared down kernel build
 1.178 03-Oct-2016  rkujawa branches: 1.178.14;
Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.177 04-Mar-2015  mlelstv branches: 1.177.2;
amidisplaycc requires vcons
 1.176 05-Jul-2014  tsutsui branches: 1.176.2; 1.176.4;
ne at xshbus seems to require ax88190, per if_ne_xsh.c.

On the other hand, dp8390nic is pulled by ne in sys/conf/files
so it isn't required here.
 1.175 03-Jan-2014  rkujawa branches: 1.175.2;
Fix undefined reference to amiga_bus_stride_0x1000.
 1.174 03-Jan-2014  rkujawa Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.173 26-Dec-2013  rkujawa Implement the probe procedure for ACA500. Now the user just needs acafh0
compiled in his kernel and it all should(tm) work.

Due to lack of obio in amiga port, the probe is called directly from mbattach().
This is going to change with the introduction of obio for all non-autoconfig
expansions.
 1.172 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.171 08-Aug-2013  rkujawa Add preliminary support for Individual Computers new X-Surf 100 network card.
 1.170 27-Apr-2013  rkujawa branches: 1.170.4;
Add Thylacine USB Host Controller driver (just a zbus frontend to slhci).

Barely works due to combination of SL811HS brain damagae and our unforgiving
driver. At least most keyboards and mices are good. Of course on amiga WSCONS
kernel is needed to make any use of them.
 1.169 29-Jan-2013  rkujawa Add em4k(4).
 1.168 28-Jan-2013  rkujawa Add empm(4) driver to config files.
 1.167 11-Jan-2013  he We appear to need files.usb included to get opt_usb.h generated,
to make hid.c build. The inclusion of hid.c in the build is probably
triggered by some configs including bluetooth support, and hid.c
is apparently both for bluetooth and usb. I'm not sure what changed
to make the build fail in the first place, though.
 1.166 25-Nov-2012  rkujawa Add z3rambd driver, it allows using Zorro III RAM boards as block devices.
This makes sense in machines equipped with RAM on accelerator boards, where
difference between accelerator RAM and Zorro III RAM is significant. Hacks
were needed in amiga_init.c and zbus.c, but they are only enabled if this
driver is present in kernel. Otherwise user will get the usual behaviour.
 1.165 19-Nov-2012  rkujawa Forgot do add X-Surf IDE config.
 1.164 14-Nov-2012  rkujawa The a2kbbc is now based on MI MSM6242B driver.
 1.163 27-Oct-2012  phx Fixed dependencies for some new PCI and clockport devices, to make a
kernel compile without them.
 1.162 14-Oct-2012  phx CV3DONZORRO2 option is no longer needed.
grf_cv3d.c was successfully tested running in a Zorro2 slot.
 1.161 14-Oct-2012  phx New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
 1.160 11-Jul-2012  rkujawa branches: 1.160.2;
Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.
 1.159 07-Jun-2012  rkujawa Enable empb in GENERIC, fix build, rearrange files.amiga.
 1.158 01-Jun-2012  rkujawa More work on PCI memory accesses on empb(4).
 1.157 30-May-2012  rkujawa Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
 1.156 15-May-2012  rkujawa - Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.155 17-Apr-2012  rkujawa Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
 1.154 24-Jan-2012  rkujawa branches: 1.154.2;
Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.153 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.152 11-Jan-2012  rkujawa Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.151 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.150 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.149 27-Oct-2011  rkujawa branches: 1.149.2; 1.149.6;
Add driver for ELBOX FastATA 1200 Mk-III/Mk-IV (and the man page).
 1.148 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.147 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.146 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.145 01-Jul-2011  rkujawa Add Bluetooth stack to Amiga. Tested with 3Com 3CRWB6096B on an A1200. Change approved by phx.
 1.144 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.143 14-Jan-2011  phx branches: 1.143.6;
Driver for BlizzardPPC 603e+ SCSI host adatper.
Patch submitted by Radoslaw Kujawa.
 1.142 06-Dec-2009  tsutsui branches: 1.142.4;
Remove old MD pmap.c files for amiga and atari.
They no longer work due to reorganization of common pmap_motorola.c.
 1.141 14-Sep-2009  mhitch Switch the amiga to the common m68k/m68k/pmap_motorola.c (Finally!!).
 1.140 20-Feb-2008  drochner branches: 1.140.10; 1.140.20; 1.140.28;
Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
 1.139 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.138 20-Aug-2007  is branches: 1.138.2;
wdc frontent for the buddha and catweazle Z2 hardware. From an old prototype
by me which was never committed due to lack of testers, adopted to 4.99 and
fixed by Frank Wille.
 1.137 09-Jun-2007  mhitch branches: 1.137.4; 1.137.8;
Add amiga/amiga/pmap_bootstrap.c. Amiga can now use either the amiga pmap.c
or the m68k common pmap_motorola.c. Add comment-out entry for
m68k/m68k/pmap_motorola.c. Currently still uses amiga pmap, but switching
to m68k common pmap_motorola is done easily for testing.
 1.136 11-Dec-2005  christos branches: 1.136.30; 1.136.32; 1.136.38;
merge ktrace-lwp.
 1.135 13-Jan-2005  is branches: 1.135.10;
No more idesc please - we use the wdc driver.
 1.134 07-Dec-2004  chs use the m68k-common procfs_machdep.c on all m68k platforms.
 1.133 20-Jan-2004  jdolecek cleanup old lpt(4) attachment, and glue ppbus in so that they can coexist:
* lpt device is defined in MI place (dev/ppbus/files.ppbus), dev/ic/lpt.c
is included there too; dev/ic/lpt.c is not included if ppbus is
configured or if there is alternative platform lpt (like for pc532)
* g/c MD lpt definitions and custom puc/upc attachments,
glue moved to conf/files and dev/pci/files.pci respectively; remove
device lpt definition from dev/isa/files.isa
* add ppbus parport attribute, atppc device attachments, adjust plip and lpt
glue
 1.132 22-Sep-2003  jandberg add wscons support to amiga mouse
 1.131 27-Jul-2003  thorpej Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
 1.130 14-Jul-2003  aymeric always include dev/cons.c and dev/cninit.c
Problem reported by Guther Nikl on port-amiga
This follows what other ports do.
 1.129 28-Jun-2003  he branches: 1.129.2;
Defflag M060SP and PANICBUTTON, now that machdep.c includes
the corresponding files.
 1.128 16-Apr-2003  is make /dev/reload optional. (It is only implemented for a.out kernels at the
moment.)
 1.127 03-Nov-2002  chs use a merged sys_machdep.c for all the motorola-MMU m68k platforms.
 1.126 02-Nov-2002  chs enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
 1.125 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.124 11-Oct-2002  thorpej defflag GRF_NTSC before GRF_PAL (which has an option-dependency on
GRF_NTSC).
 1.123 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.122 26-May-2002  jdolecek pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.121 22-Apr-2002  augustss branches: 1.121.2; 1.121.4;
Rename the audio "bus" attribute audiobus to avoid confusion with audio
device.
 1.120 19-Apr-2002  heinz Add options for iso8859-1 and -2 kernel fonts and change the file selection
for kernel fonts (in agreement with is@netbsd.org)
 1.119 17-Apr-2002  heinz Change name of console fonts kf_8x8.c and kf_8x11.c
 1.118 16-Apr-2002  thorpej * Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
the magic "files include order" dance in N machine-dependent
configuration definitions.
 1.117 21-Jan-2002  is First draft of a Toccata driver.
 1.116 21-Jan-2002  jdolecek Switch to MI dev/md_root.c for archs which don't have any special
memory disk hooks (i.e. everything except atari).
 1.115 13-Jan-2002  jandberg Amiga wsdisplay updates.

conf/GENERIC:
conf/files.amiga:
- Bring in wsfont definitions.

dev/grfabs_reg.h:
- Add macros for decomposing palette entries.

dev/amidisplaycc.c:
- Support for fonts, either wsfonts compiled into kernel
or runtime-loadable by ioctl. Font width still limited to 8,
height may vary.
- Limited support for mapped displays. No way to adjust display
mode. Palette setting works.
- Prettier default palette (white on black).
- Probes correctly as WSDISPLAY_TYPE_AMIGACC.
- Support for screen blanking.
 1.114 23-Dec-2001  aymeric include m68k a.out compatibility module so we can use
options COMPAT_AOUT_M68K
 1.113 28-Nov-2001  lukem - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.112 20-Nov-2001  lukem - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
 1.111 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.110 05-Nov-2001  aymeric branches: 1.110.2;
defopt SERCONSOLE
 1.109 25-Aug-2001  is branches: 1.109.4;
Driver for the ALiENDESiGN Repulse board.
- only 8/16 bit precision supported
- no support for the Repulse special S/P-DIF I/O yet
- I think ac97.c needs some work.
 1.108 18-Jun-2001  christos branches: 1.108.2;
Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.107 08-May-2001  is defopt LEV6_DEFER.
 1.106 17-Mar-2001  is Method array for a really big inter-byte offset.
 1.105 10-Mar-2001  is - The ioblix zbus board comes in 24 MHz and 22.1184 MHz clock variants.
We default to the (newer, more sane) 22.1184 MHz value, but set it from
the iobzclock variable (in Hz), which is initialized from the IOBZCLOCK
configuration option and patchable.
XXX we should time the clock at system startup.
- add ioblix_zbus to the GENERIC configuration.
 1.104 02-Feb-2001  is branches: 1.104.2;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.103 26-Jan-2001  aymeric process_machdep.c is actually procfs_machdep.c
 1.102 21-Jan-2001  is Amiga part of isdn4bsd, and an example kernel configuration file.
 1.101 17-Jan-2001  fvdl Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.100 03-Sep-2000  is sm* at (mhz at) pcmcia* needs mii to link (although not at runtime...).
 1.99 21-Apr-2000  bouyer branches: 1.99.4;
Rename the 'siop' define to 'asiop', to avoid clash with the MI siop driver.
This doesn't change the name of the drivers in config files.
 1.98 23-Mar-2000  is Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).
 1.97 14-Mar-2000  oster Add the RAIDframe device major to the machine-dependent config files
so that the right entries get added to dev_name2blk[]. Needed for / on RAID.
(Whoops! I missed checking these in when adding the RAID_AUTOCONFIG stuff.)
 1.96 31-Jan-2000  mhitch Add the config information for the MI wdc support.
 1.95 23-Jan-2000  aymeric add stride 1 functions support and PCMCIA support
 1.94 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.93 15-Oct-1999  is branches: 1.93.2;
Reboot support for P5PPC+68K boards, compiled in by "options P5PPC68KBOARD".
Without this, at least cyberppc+040 boards won't reboot, but just hang when
down.
The method is similar to what LinuxPPC/APUS does, but without EIEIO.
 1.92 20-Sep-1999  is branches: 1.92.2;
replace inline asm by macro calls, that expand to the original inline asm
or to C replacements depending on the USE_C_BFOPS option.
The C replacement only works for our 8 bit wide fonts.
 1.91 07-Sep-1999  is Uhm... multi-cpu kernels containign M68020 support won't assemble without
this. Sorry for the inconvenience.
 1.90 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.89 09-Jul-1999  thorpej Normalize include paths.
 1.88 07-Jul-1999  thorpej pseudo-device -> defpseudo, per grammar change in config(8).
 1.87 07-Jun-1999  thorpej Only declare block major numbers for devices which can be the root device.
 1.86 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.85 16-Apr-1999  kleink Normalize path of files.sunos.
 1.84 26-Mar-1999  is branches: 1.84.2; 1.84.4;
defopt BB060STUPIDROM.
 1.83 25-Mar-1999  is defopt Amiga graphics console options
 1.82 25-Mar-1999  is Forgot A2024
 1.81 25-Mar-1999  is Defopting grf_cc configuration parameters
 1.80 07-Mar-1999  is Added very preliminary version of Symbios 53c7[27]0c driver and Cyberstorm
Mk. III SCSI backend, by Michael Hitch.
XXX No wide transfers supported at the moment.
 1.79 15-Dec-1998  itohy Added COMPAT_LINUX support.
 1.78 11-Nov-1998  veego New driver for the Ariadne II.
 1.77 08-Oct-1998  is - define framework for >8bit transfers
- implement 16 bit contiguous and 16 bit interleaved, both big-endian
 1.76 02-Sep-1998  is Split SMC chipset ARCnet driver into
- machine independent chip driver, in dev/ic/smc90cx6.c/...reg.h,...var.h,
using bus_space methods
- ZBUS frontend in arch/amiga/dev/if_bah_zbus.c
- added IPL_SOFTNET to arch/amiga/include/intr.h, for this
Implementing the ISA bus frontend is left as an exercise to the reader.
 1.75 10-Aug-1998  is ISDN Blaster / Master: ZBus attachment / SUPIO driver.
 1.74 21-Jul-1998  drochner adapt to LANCE driver split
 1.73 03-Jul-1998  mhitch Add memory disk.
 1.72 16-Feb-1998  thorpej Remove "class" declarations, and add "devclass" declarations where
appropriate. Fix several inconsistencies between device class and
attributes. Mostly from Chris Demetriou.
 1.71 12-Jan-1998  thorpej Adjust for changes to config.
 1.70 19-Oct-1997  veego Add CyberVision 64/3D support.
 1.69 18-Oct-1997  is Driver for the VMC HyperCom3/zbus and the VMC HyperCom4.
lpt on HyperCom3 isn't supported yet.
 1.68 16-Oct-1997  is TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c
 1.67 16-Oct-1997  thorpej Garbage-collect "com" driver declaration.
 1.66 10-Oct-1997  mhitch The Blizzard-IV SCSI driver is now separate from the Blizzard-II.
 1.65 04-Oct-1997  mhitch Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.64 28-Sep-1997  is Build the 68060 support package in the kernel build dir.
XXX PCB_ONFAULT is still hardwired to 64 in netbsd060sp.S.
 1.63 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.62 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.61 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.60 19-Jul-1997  is branches: 1.60.2;
Make Amiga battery clocks autoconfiguration devices, so that they can be
left out of specialized configurations.
 1.59 17-Jul-1997  is Make the DraCo hardware clock an autoconfiguration device.
 1.58 16-Jul-1997  is Amiga glue code for the m68k fpu emulation subsystem.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
 1.57 14-Jun-1997  is branches: 1.57.2;
Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.56 25-May-1997  veego Add dev/clock_subr.c and the major line for vnd, so you now use swaping
to a file.
Add comments and resort some entries.
 1.55 09-Apr-1997  thorpej remove redundant file directives
 1.54 27-Mar-1997  veego Remove the ae entries for the Ariadne, it's now supported bye the le driver
 1.53 17-Mar-1997  gwr Separate bcopy and copypage stuff from copy.s
 1.52 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.51 16-Dec-1996  is branches: 1.51.6;
The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.50 04-Dec-1996  is Oops, drcom slipped through the cracks. I beg your pardon.
 1.49 17-Oct-1996  is Add driver bznsc (for BliZzard, New version: -IV, -1260, -2060).

Still untested on -1260/-1230, and hangs when enforcing SFAS_NO_DMA on 2060;
but works with DMA on the latter.

Still untested in a NetBSD-12A environment. (Sorry, don't have the hardware
myself.)

Thanks to Laurent Baroukh for being the guinea pig, and to Jerome Lovy
for forwarding the hardware information Phase V gave him, and to Phase
V for providing it.
 1.48 19-May-1996  veego GENERIC - added scsi scanner entry
- enable MS-DOS file system support
- removed unsed GRF_CL5426 entry
- added new graphics driver (grf6) for oMniBus, Domino and Merlin
 1.47 12-May-1996  thorpej Oops, I accidentally commented out the "le" attach directive. Thanks,
veego!
 1.46 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.45 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.
 1.44 27-Apr-1996  veego Fixed a compile bug which come from the new mouse driver
Remove the fd* entry from the GENERIC config and changed the std.amiga
entry for the floppy
 1.43 26-Apr-1996  is Remove double empsc entry, fix a typo, and our "zbus" is a unified Zorro
bus interface for a long, long time.
 1.42 24-Apr-1996  is Make the Amiga mainboard mice, which used to be pseudo-devices, real devices.
(We want to support Amigoids without this interface in the near future.)
 1.41 28-Mar-1996  is Emplant SCSI driver backend by Sean Riddle and Bo Najdrovsky.
 1.40 17-Mar-1996  is These should be and clauses, after cgd's recent config change (the second
one). Should probably also be done to the view packet, but I'm not 100% sure.
 1.39 17-Mar-1996  cgd adjust to deal with expression support for optional file specs
 1.38 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.37 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.36 02-Mar-1996  veego Updated for the new CyberVision64 console
and a small cleanup in the GENERIC config
 1.35 01-Mar-1996  is "major" declarations which got lost when the scsi stuff was changed to
include ../../../scsi/conf/files.scsi
 1.34 24-Feb-1996  chopps remove generic scsi stuff and use ../../../scsi/files.scsi
 1.33 28-Jan-1996  chopps aftsc uses afsc.c #1976
 1.32 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.31 09-Oct-1995  chopps branches: 1.31.2;
new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.30 07-Oct-1995  chopps new quicknet ethernet driver from Kortelainen Mika <k125374@cs.tut.fi>
 1.29 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.28 30-Sep-1995  chopps changes for msc device
 1.27 18-Aug-1995  chopps new a2410 driver from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.26 18-Aug-1995  chopps new Ariadne driver from Bernd Ernesti <bernd@arresum.inka.de>
 1.25 12-May-1995  chopps added flsc and bzsc.
 1.24 27-Apr-1995  christos Use new files.sunos
 1.23 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.22 22-Apr-1995  christos move sunos_compat.c to m68k
 1.21 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.20 11-Apr-1995  mellon Reference cninit.c as well as cons.c
 1.19 02-Mar-1995  chopps enable tun support.
 1.18 28-Feb-1995  chopps include new 2060 arcnet device
 1.17 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.16 25-Jan-1995  cgd add 'maxpartitions' keyword as first 'intesting' thing in the file, to
facilitate the solution of config.new's hardcoded partition number
problems.
 1.15 28-Dec-1994  chopps support some newer stuff and some cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.14 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 06-Oct-1994  chopps add 4091 scsi controller
 1.11 16-Jul-1994  chopps ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.10 15-Jun-1994  chopps branches: 1.10.2;
include more device .h files, update Makefile.amiga to use new
vnode_if.x gerating procedure
 1.9 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.8 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 29-May-1994  chopps new floppy driver from me to replace the old one.
 1.6 25-May-1994  chopps fix le line
 1.5 25-May-1994  chopps add arch/m68k/m68k/copy.s
 1.4 22-May-1994  chopps lowercase options in files.amiga.newconf required, remove SYS* for now
from GENERIC and remove old configs that serve no current purpose.
 1.3 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.1 08-May-1994  chopps oops forgot one.
 1.10.2.1 16-Jul-1994  cgd update from trunk, per chopps
 1.31.2.2 10-Nov-1995  chopps update grf_ul; support files now only used if needed.
 1.31.2.1 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.51.6.1 10-Mar-1997  is make ether and arc devices require arp, too
 1.57.2.3 22-Jul-1997  bouyer Sync with trunk.
 1.57.2.2 17-Jul-1997  bouyer Update from trunck.
 1.57.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.60.2.4 16-Oct-1997  thorpej Sync w/ trunk.
 1.60.2.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.60.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.60.2.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.84.4.2 02-Aug-1999  thorpej Update from trunk.
 1.84.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.84.2.1 04-Feb-2000  he Pull up revision 1.93 (requested by is):
Add reboot code for Phase5 68040+PPC boards.
 1.92.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.93.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.93.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.93.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.93.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.93.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.99.4.1 03-Sep-2000  is Pullup 1.100, per jhawks permission: sm* at pcmcia? needs mii to link.
 1.104.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.104.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.108.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.108.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.108.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.108.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.108.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.109.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.110.2.7 11-Nov-2002  nathanw Catch up to -current
 1.110.2.6 18-Oct-2002  nathanw Catch up to -current.
 1.110.2.5 17-Sep-2002  nathanw Catch up to -current.
 1.110.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.110.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.110.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.110.2.1 05-Nov-2001  nathanw file files.amiga was added on branch nathanw_sa on 2002-01-08 00:22:58 +0000
 1.121.4.1 28-May-2002  tv Pull up revision 1.122 (requested by jdolecek):
pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.121.2.3 30-May-2002  gehenna Catch up with -current.
 1.121.2.2 17-May-2002  gehenna Remove old block majors list.
 1.121.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.129.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.129.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.129.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.129.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.129.2.1 03-Aug-2004  skrll Sync with HEAD
 1.135.10.2 27-Feb-2008  yamt sync with head.
 1.135.10.1 03-Sep-2007  yamt sync with head.
 1.136.38.2 03-Oct-2007  garbled Sync with HEAD
 1.136.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.136.32.1 11-Jul-2007  mjf Sync with head.
 1.136.30.2 20-Aug-2007  ad Sync with HEAD.
 1.136.30.1 15-Jul-2007  ad Sync with head.
 1.137.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.137.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.138.2.2 23-Mar-2008  matt sync with HEAD
 1.138.2.1 06-Nov-2007  matt sync with HEAD
 1.140.28.1 21-Apr-2010  matt sync to netbsd-5
 1.140.20.1 16-Sep-2009  snj Pull up following revision(s) (requested by mhitch in ticket #956):
sys/arch/amiga/conf/files.amiga: revision 1.141
Switch the amiga to the common m68k/m68k/pmap_motorola.c (Finally!!).
 1.140.10.2 11-Mar-2010  yamt sync with head
 1.140.10.1 16-Sep-2009  yamt sync with head
 1.142.4.2 05-Mar-2011  rmind sync with head
 1.142.4.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.143.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.149.6.3 02-Jun-2012  mrg sync to latest -current.
 1.149.6.2 29-Apr-2012  mrg sync to latest -current.
 1.149.6.1 18-Feb-2012  mrg merge to -current.
 1.149.2.6 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.149.2.5 23-Jan-2013  yamt sync with head
 1.149.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.149.2.3 30-Oct-2012  yamt sync with head
 1.149.2.2 23-May-2012  yamt sync with head.
 1.149.2.1 17-Apr-2012  yamt sync with head
 1.154.2.2 22-Nov-2012  riz Pull up following revision(s) (requested by phx in ticket #681):
sys/arch/amiga/dev/if_edreg.h: file removal
sys/dev/ic/dp8390reg.h: revision 1.9
sys/arch/amiga/conf/files.amiga: revision 1.161
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.1
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.2
sys/arch/amiga/dev/if_ed.c: file removal
New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
Fixed receiving of odd-length packets. Driver works now perfectly.
Thanks to Harald Meinzer for providing me with a Hydra for a few days.
ed_ring structure is no longer needed for compatibility, as the last
device driver using it (amiga/ed(4)) has been converted now.
 1.154.2.1 22-Nov-2012  riz Pull up following revision(s) (requested by phx in ticket #680):
sys/arch/amiga/dev/grf_cv3d.c: revision 1.27
sys/arch/amiga/conf/files.amiga: revision 1.162
CV3DONZORRO2 option is no longer needed.
grf_cv3d.c was successfully tested running in a Zorro2 slot.
 1.160.2.5 03-Dec-2017  jdolecek update from HEAD
 1.160.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.160.2.3 23-Jun-2013  tls resync from head
 1.160.2.2 25-Feb-2013  tls resync with head
 1.160.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.170.4.2 18-May-2014  rmind sync with head
 1.170.4.1 28-Aug-2013  rmind sync with head
 1.175.2.1 10-Aug-2014  tls Rebase.
 1.176.4.2 05-Oct-2016  skrll Sync with HEAD
 1.176.4.1 06-Apr-2015  skrll Sync with HEAD
 1.176.2.1 26-May-2015  msaitoh Pull up following revision(s) (requested by mlelstv in ticket #806):
sys/arch/amiga/conf/files.amiga: revision 1.177
amidisplaycc requires vcons
 1.177.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.178.14.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.178.14.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.178.14.1 15-Mar-2018  pgoyette Synch with HEAD
 1.179.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.179.2.1 10-Jun-2019  christos Sync with HEAD
 1.181.2.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.25 28-Apr-1995  cgd rename files files for new config/config.old naming
 1.24 27-Apr-1995  christos Use new files.sunos
 1.23 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.22 22-Apr-1995  christos move sunos_compat.c to m68k
 1.21 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.20 11-Apr-1995  mellon Reference cninit.c as well as cons.c
 1.19 02-Mar-1995  chopps enable tun support.
 1.18 28-Feb-1995  chopps include new 2060 arcnet device
 1.17 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.16 25-Jan-1995  cgd add 'maxpartitions' keyword as first 'intesting' thing in the file, to
facilitate the solution of config.new's hardcoded partition number
problems.
 1.15 28-Dec-1994  chopps support some newer stuff and some cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.14 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 06-Oct-1994  chopps branches: 1.12.2;
add 4091 scsi controller
 1.11 16-Jul-1994  chopps ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.10 15-Jun-1994  chopps branches: 1.10.2;
include more device .h files, update Makefile.amiga to use new
vnode_if.x gerating procedure
 1.9 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.8 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 29-May-1994  chopps new floppy driver from me to replace the old one.
 1.6 25-May-1994  chopps fix le line
 1.5 25-May-1994  chopps add arch/m68k/m68k/copy.s
 1.4 22-May-1994  chopps lowercase options in files.amiga.newconf required, remove SYS* for now
from GENERIC and remove old configs that serve no current purpose.
 1.3 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.1 08-May-1994  chopps oops forgot one.
 1.10.2.1 16-Jul-1994  cgd update from trunk, per chopps
 1.12.2.2 06-Oct-1994  chopps add 4091 scsi controller
 1.12.2.1 06-Oct-1994  chopps file files.amiga.newconf was added on branch netbsd-1-0 on 1994-10-06 19:07:21 +0000
 1.18 08-May-1994  mycroft Clean up deleted files.
 1.17 22-Apr-1994  chopps Changed fonts. Added 2 non (c) fonts kf_8x{8,11}.c retina now uses
kf_8x8. CC console users can now choose between the provided fonts
or provide there own.
 1.16 05-Apr-1994  chopps fp -> fd, consistency good. [nameclash bad.]
 1.15 05-Apr-1994  chopps add floppy.
 1.14 27-Mar-1994  chopps moved everything over to sys/queue.h, from dlists.[ch]
 1.13 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.12 25-Feb-1994  chopps added files for option ADOSFS.
 1.11 17-Feb-1994  chopps modified to use generic cons.
 1.10 13-Feb-1994  chopps chnaged to handle new (and removed) files.
 1.9 11-Feb-1994  chopps Add missing Id's
 1.8 09-Feb-1994  chopps removed vn, now in sys/dev
 1.7 02-Feb-1994  chopps removed arch/m68k files, config now fetches them.
 1.6 01-Feb-1994  chopps updated files for scsi re-org.
 1.5 30-Jan-1994  chopps added pal A2024 mode.
 1.4 29-Jan-1994  cgd make FPSP m68k-generic
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.27 04-Apr-2020  jdolecek mark nsmb major obsolete
 1.26 28-Jan-2019  dholland Systematize handling of removed drivers.

- Every driver that was removed and whose number hasn't already been
reused is now listed with a commented-out "obsolete" line.
- The format of these has been systematized. Future format changes can
probably be safely done with a script.
- This does not include a few cases of assignments that only lasted a
couple days, or stuff from before major reorgs. Some of these may
be included nonetheless, because there was a lot of ground to cover
and therefore not a lot of time to dig into history in detail.

Note that the obsolete listings do not mean the major numbers can
never be reused; that's up to portmasters and/or core. It does mean
that they won't be reused by accident, however, which in some cases
(depending on the driver, how widely used it was, its family of device
nodes, their default permissions, etc.) can be quite dangerous.

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
 1.25 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.24 23-Sep-2018  maxv Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.
 1.23 07-Oct-2011  rkujawa branches: 1.23.52; 1.23.54;
Added experimental support for CV64/3D PCI bridge to p5pb(4). Approved by phx.
 1.22 30-Jun-2011  wiz dependant -> dependent
 1.21 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.20 31-Dec-2007  ad branches: 1.20.6; 1.20.10; 1.20.16; 1.20.18;
Remove systrace. Ok core@.
 1.19 24-Nov-2006  wiz branches: 1.19.28; 1.19.34; 1.19.42;
s/independant/independent/, from Zafer.
 1.18 11-Dec-2005  christos branches: 1.18.20; 1.18.22;
merge ktrace-lwp.
 1.17 17-Sep-2005  yamt make VMSWAP optional again.
 1.16 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.15 30-Jul-2005  yamt defflag VMSWAP.
 1.14 20-Feb-2005  jdolecek branches: 1.14.4;
add nsmb(4) for NetBSD/amiga

Fixes PR port-amiga/29066 by Florian Stoehr
 1.13 10-Dec-2003  jmc branches: 1.13.8; 1.13.10;
Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.12 24-Oct-2003  jdolecek add necessary majors for miscellaneous devices, such as missing
wscons/scsi/isdn devices
 1.11 22-Oct-2003  jdolecek add wsfont major to archs which have the other wscons devices
 1.10 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.9 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.8 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
 1.7 22-Sep-2003  jandberg add wscons support to amiga mouse
 1.6 22-Aug-2003  itojun create /dev/crypto
 1.5 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.4 25-Apr-2003  ragge branches: 1.4.2;
Add ksyms device major.
 1.3 04-Oct-2002  elric branches: 1.3.2;
assign majors for raw and cooked cgd's.
 1.2 06-Sep-2002  gehenna branches: 1.2.2;
Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.amiga was initially added on branch gehenna-devsw.
 1.1.2.3 09-Jul-2002  gehenna catch up with -current.
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.amiga was added on branch nathanw_sa on 2002-09-17 21:12:55 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 04-Oct-2002  jdolecek file majors.amiga was added on branch kqueue on 2002-10-10 18:31:20 +0000
 1.4.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.14.4.3 21-Jan-2008  yamt sync with head
 1.14.4.2 30-Dec-2006  yamt sync with head.
 1.14.4.1 21-Jun-2006  yamt sync with head.
 1.18.22.1 10-Dec-2006  yamt sync with head.
 1.18.20.1 12-Jan-2007  ad Sync with head.
 1.19.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.19.28.1 09-Jan-2008  matt sync with HEAD
 1.20.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.10.1 04-May-2009  yamt sync with head.
 1.20.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.23.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23.54.1 10-Jun-2019  christos Sync with HEAD
 1.23.52.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.23.52.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.23 18-Jan-2024  thorpej Make the M68K_MMU_* defines real kernel options, available in opt_m68k_arch.h.
For 68030, 68040, and 68060, infer M68K_MMU_MOTOROLA. For 68010 and 68020, it
must be an explicit option (set in std.${MACHINE} or, in the case of hp300,
inferred from the specific model option).
 1.22 19-Sep-2010  tsutsui - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
from MD std.${MACHINE}
 1.21 11-Dec-2005  christos branches: 1.21.78; 1.21.98; 1.21.100;
merge ktrace-lwp.
 1.20 17-Sep-2005  yamt include "conf/std".
 1.19 13-Feb-2002  is branches: 1.19.16; 1.19.32;
move ELF32 to std.amiga
 1.18 22-Jun-2000  fvdl branches: 1.18.4; 1.18.8;
Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.17 15-Nov-1999  fvdl branches: 1.17.4;
Add

prefix ../gnu/sys
cinclude "conf/files.softdep"
prefix

to all std.* files, so that soft dependencies can be activated using
"options SOFTDEP".
 1.16 24-Mar-1999  mrg branches: 1.16.8; 1.16.14;
clean up kernel/config files files for machVM lossage.
 1.15 16-Jan-1999  chuck MNN is no longer an option
 1.14 28-Oct-1998  is Switch the Amiga port to UVM.
 1.13 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.12 05-Feb-1998  is Get rid of std.draco file.
Amiga specific devices must be named in GENERIC, too.
While here, add vnd pseudo-devices to DRACO.
 1.11 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.10 20-Dec-1996  veego Add SWAPPAGER, VNODEPAGER and DEVPAGER
 1.9 11-Oct-1996  mhitch Amiga needs EXEC_AOUT and EXEC_SCRIPT.
 1.8 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.7 27-Apr-1996  veego Fixed a compile bug which come from the new mouse driver
Remove the fd* entry from the GENERIC config and changed the std.amiga
entry for the floppy
 1.6 24-Apr-1996  is Make the Amiga mainboard mice, which used to be pseudo-devices, real devices.
(We want to support Amigoids without this interface in the near future.)
 1.5 28-Dec-1994  chopps support some newer stuff and some cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 29-May-1994  chopps new floppy driver from me to replace the old one.
 1.2 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.1 08-May-1994  chopps a few files that were forgoton in the last batch.
 1.16.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.17.4.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.18.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.18.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.19.32.1 21-Jun-2006  yamt sync with head.
 1.19.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.100.1 05-Mar-2011  rmind sync with head
 1.21.98.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.21.78.1 09-Oct-2010  yamt sync with head
 1.4 05-Feb-1998  is Get rid of std.draco file.
Amiga specific devices must be named in GENERIC, too.
While here, add vnd pseudo-devices to DRACO.
 1.3 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.2 20-Dec-1996  veego Add SWAPPAGER, VNODEPAGER and DEVPAGER
 1.1 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.7 25-Oct-2008  apb Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.78; 1.6.84;
merge ktrace-lwp.
 1.5 16-Jul-2003  is pass source file name to gpsa, so that gspa could (in theory) embed the
used filename in the output.
 1.4 26-May-2002  jdolecek branches: 1.4.2; 1.4.4; 1.4.10;
remove space in generated NetBSD RCS Id
 1.3 26-May-2002  jdolecek pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.2 09-Feb-1994  mycroft branches: 1.2.6; 1.2.18;
Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2.18.1 30-May-2002  gehenna Catch up with -current.
 1.2.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.10.1 03-Aug-2004  skrll Sync with HEAD
 1.4.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.1 26-May-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-06-20 03:37:52 +0000
 1.4.2.3 28-May-2002  tv Pull up revision 1.4 (requested by jdolecek):
remove space in generated NetBSD RCS Id
 1.4.2.2 28-May-2002  tv Pull up revision 1.3 (requested by jdolecek):
pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.4.2.1 26-May-2002  tv file Makefile was added on branch netbsd-1-6 on 2002-05-28 19:34:52 +0000
 1.6.84.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.6.78.1 04-May-2009  yamt sync with head.
 1.6.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.5 28-Dec-1994  mycroft Clean up deleted files.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 10-Jul-1994  chopps branches: 1.3.2;
bring up to date with siop.c
 1.2 11-Feb-1994  chopps branches: 1.2.2;
Add missing Id's
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2.2.1 10-Jul-1994  cgd from trunk, at chopps request
 1.3.2.2 10-Jul-1994  chopps bring up to date with siop.c
 1.3.2.1 10-Jul-1994  chopps file Zeus.script was added on branch netbsd-1-0 on 1994-07-10 23:00:30 +0000
 1.7 08-May-1994  mycroft Clean up deleted files.
 1.6 18-Apr-1994  chopps make current with recent vm changes.
 1.5 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4 08-May-1994  mycroft Clean up deleted files.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.26 27-Jan-2013  rkujawa Remove confusing, leftover comment.
 1.25 14-Nov-2012  rkujawa The a2kbbc is now based on MI MSM6242B driver.
 1.24 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.23 03-Jun-2011  matt branches: 1.23.2; 1.23.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.22 08-Feb-2011  rmind branches: 1.22.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.21 10-Oct-2006  mhitch branches: 1.21.78; 1.21.84; 1.21.86;
Conversion to clock_ymdhms wasn't complete: the match routine was calling
ugettod() with a NULL pointer to test if the clock was present. That
argument was changed to a struct clock_ymdhms pointer and is no longer
optional. Change to pass the address of a local structure when probing
for the clock.
 1.20 11-Sep-2006  gdamore branches: 1.20.2;
Convert a2kbbc and a3kbbc to newer clock_ymdhms convenience routines in
kern_todr.
 1.19 07-Sep-2006  mhitch Correct some error returns for gettod() and settod() left over from the
pre-todr code, and use actual E* return codes for any error return.
 1.18 05-Sep-2006  mhitch branches: 1.18.2;
Switch amiga to MI todr.
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.8;
merge ktrace-lwp.
 1.16 13-Jun-2005  jmc branches: 1.16.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.14 02-Oct-2002  thorpej branches: 1.14.6;
Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.11 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 15-Mar-2000  kleink branches: 1.10.8; 1.10.12;
Kill a couple of unnecessary cf_unit (ab)uses.
 1.9 03-Jan-2000  is Write part of the y2k fix.
This is not strictly necessary, as
- at least for the Ricoh chip in the A3000 and A4000, as those chips' Y10
registers happily continue to count up from 0xA if manually incremented
past 0x9.
- the Amiga ROMs and "setclock" commands seem to interpret 0xA 0x? like
200?, etc.

However,
- the Amiga setclock writes the modulo 10 value into the chips
- the chip docs of both chips, including the Y2K information of their
manufacturers, only refer to the range 0-9
- the chips increment from 9 to 0

So we better conform to this, to avoid unpleasant surprises.
 1.8 02-Jan-2000  is *sigh*
Y2000-patch for A2000, A3000 and A4000 battery backed clock modules,
mostly by Adam Ciarcinski.
 1.7 28-Mar-1999  is branches: 1.7.2; 1.7.8;
Dont write through a zero pointer (when in probe mode of a2kugettod()).
 1.6 14-Mar-1999  is Use the 1/256s-resolution when reading the DraCo battery backed clock
 1.5 12-Jan-1998  thorpej Adjust for changes to config.
 1.4 19-Oct-1997  is zbus.c
 1.3 23-Jul-1997  is Fix a complaint by Eric Delcamp on port-amiga... looks like Thorsten Fruehauf
didn't find all occurences of unprotected is_draco(), and I didn't look hard
enough, either, when fixing.
 1.2 22-Jul-1997  kleink a2kbbc_match(): check unit explicitly against 0. Minor KNF.
 1.1 19-Jul-1997  is Make Amiga battery clocks autoconfiguration devices, so that they can be
left out of specialized configurations.
 1.7.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.7.2.1 08-Jan-2000  he Pull up revisions 1.8-1.9 (requested by is):
Y2K fix for A2000, A3000 and A4000 battery backed clock modules.
 1.10.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.10.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.10.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.14.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1 03-Aug-2004  skrll Sync with HEAD
 1.16.2.1 30-Dec-2006  yamt sync with head.
 1.17.8.1 14-Sep-2006  yamt sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.2.1 18-Nov-2006  ad Sync with head.
 1.20.2.1 22-Oct-2006  yamt sync with head
 1.21.86.1 17-Feb-2011  bouyer Sync with HEAD
 1.21.84.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.78.2 12-Jun-2011  rmind sync with head
 1.21.78.1 05-Mar-2011  rmind sync with head
 1.22.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.23.12.2 25-Feb-2013  tls resync with head
 1.23.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.23.2.1 30-Oct-2012  yamt sync with head
 1.7 08-May-1994  mycroft Clean up deleted files.
 1.6 18-Apr-1994  chopps make current with recent vm changes.
 1.5 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4 08-May-1994  mycroft Clean up deleted files.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.25 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux.
Nothing was using the old field, but I decided to keep it around just
in cause something needs it in the future.

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.24 07-Sep-2025  thorpej Don't keep state in globals; define and use an a34kbbc_softc.
 1.23 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.22 03-Jun-2011  matt branches: 1.22.2; 1.22.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.21 08-Feb-2011  rmind branches: 1.21.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.20 10-Oct-2006  mhitch branches: 1.20.78; 1.20.84; 1.20.86;
Conversion to clock_ymdhms wasn't complete: the match routine was calling
ugettod() with a NULL pointer to test if the clock was present. That
argument was changed to a struct clock_ymdhms pointer and is no longer
optional. Change to pass the address of a local structure when probing
for the clock.
 1.19 11-Sep-2006  gdamore branches: 1.19.2;
Convert a2kbbc and a3kbbc to newer clock_ymdhms convenience routines in
kern_todr.
 1.18 07-Sep-2006  mhitch Correct some error returns for gettod() and settod() left over from the
pre-todr code, and use actual E* return codes for any error return.
 1.17 05-Sep-2006  mhitch branches: 1.17.2;
Switch amiga to MI todr.
 1.16 30-Dec-2005  is branches: 1.16.4; 1.16.8;
fixing typo in comment
 1.15 11-Dec-2005  christos merge ktrace-lwp.
 1.14 13-Jun-2005  jmc branches: 1.14.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.12 02-Oct-2002  thorpej branches: 1.12.6;
Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.9 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.8 15-Mar-2000  kleink branches: 1.8.8; 1.8.12;
Kill a couple of unnecessary cf_unit (ab)uses.
 1.7 06-Jan-2000  is Fix comment. No code change.
 1.6 03-Jan-2000  is The Ricoh chip has a seperate leapyear counter.
We must write this when we write the year register, keeping them in sync.
XXX the chosen algorithm only works for 1901 <= year <= 2099.
 1.5 03-Jan-2000  is Write part of the y2k fix.
This is not strictly necessary, as
- at least for the Ricoh chip in the A3000 and A4000, as those chips' Y10
registers happily continue to count up from 0xA if manually incremented
past 0x9.
- the Amiga ROMs and "setclock" commands seem to interpret 0xA 0x? like
200?, etc.

However,
- the Amiga setclock writes the modulo 10 value into the chips
- the chip docs of both chips, including the Y2K information of their
manufacturers, only refer to the range 0-9
- the chips increment from 9 to 0

So we better conform to this, to avoid unpleasant surprises.
 1.4 02-Jan-2000  is *sigh*
Y2000-patch for A2000, A3000 and A4000 battery backed clock modules,
mostly by Adam Ciarcinski.
 1.3 14-Mar-1999  is branches: 1.3.2; 1.3.8;
Use the 1/256s-resolution when reading the DraCo battery backed clock
 1.2 12-Jan-1998  thorpej Adjust for changes to config.
 1.1 19-Jul-1997  is Make Amiga battery clocks autoconfiguration devices, so that they can be
left out of specialized configurations.
 1.3.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.3.2.2 08-Jan-2000  he Pull up revision 1.6 (requested by is):
Write the Ricoh RP5C01 leapyear bits when writing the year.
 1.3.2.1 08-Jan-2000  he Pull up revisions 1.4-1.5 (requested by is):
Y2K fix for A2000, A3000 and A4000 battery backed clock modules.
 1.8.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.8.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.6.1 03-Aug-2004  skrll Sync with HEAD
 1.14.2.2 30-Dec-2006  yamt sync with head.
 1.14.2.1 21-Jun-2006  yamt sync with head.
 1.16.8.1 14-Sep-2006  yamt sync with head.
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.2.1 18-Nov-2006  ad Sync with head.
 1.19.2.1 22-Oct-2006  yamt sync with head
 1.20.86.1 17-Feb-2011  bouyer Sync with HEAD
 1.20.84.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.78.2 12-Jun-2011  rmind sync with head
 1.20.78.1 05-Mar-2011  rmind sync with head
 1.21.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.22.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.22.2.1 30-Oct-2012  yamt sync with head
 1.7 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.6 04-Aug-2023  rin amiga/acafh(4): Appease GCC 12.3.0 -Wmisleading-indentation

No binary changes. Alternatively, pmap_update(9) can be placed in
this loop, but it should make nothing other than small overhead.
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 26-Dec-2013  rkujawa branches: 1.3.4; 1.3.6; 1.3.10; 1.3.50;
Implement the probe procedure for ACA500. Now the user just needs acafh0
compiled in his kernel and it all should(tm) work.

Due to lack of obio in amiga port, the probe is called directly from mbattach().
This is going to change with the introduction of obio for all non-autoconfig
expansions.
 1.2 22-Dec-2013  rkujawa Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.1 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.3.50.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 26-Dec-2013  tls file acafh.c was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 26-Dec-2013  yamt file acafh.c was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 26-Dec-2013  rmind file acafh.c was added on branch rmind-smpnet on 2014-05-18 17:44:55 +0000
 1.4.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.4 03-Jan-2014  rkujawa branches: 1.4.4; 1.4.6; 1.4.10;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.3 26-Dec-2013  rkujawa Implement the probe procedure for ACA500. Now the user just needs acafh0
compiled in his kernel and it all should(tm) work.

Due to lack of obio in amiga port, the probe is called directly from mbattach().
This is going to change with the introduction of obio for all non-autoconfig
expansions.
 1.2 22-Dec-2013  rkujawa Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.1 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.4.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 03-Jan-2014  tls file acafhreg.h was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.4.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 03-Jan-2014  yamt file acafhreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.4.4.2 18-May-2014  rmind sync with head
 1.4.4.1 03-Jan-2014  rmind file acafhreg.h was added on branch rmind-smpnet on 2014-05-18 17:44:55 +0000
 1.3 26-Dec-2013  rkujawa branches: 1.3.4; 1.3.6; 1.3.10;
Implement the probe procedure for ACA500. Now the user just needs acafh0
compiled in his kernel and it all should(tm) work.

Due to lack of obio in amiga port, the probe is called directly from mbattach().
This is going to change with the introduction of obio for all non-autoconfig
expansions.
 1.2 22-Dec-2013  rkujawa Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.1 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 26-Dec-2013  tls file acafhvar.h was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 26-Dec-2013  yamt file acafhvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 26-Dec-2013  rmind file acafhvar.h was added on branch rmind-smpnet on 2014-05-18 17:44:55 +0000
 1.47 27-Aug-2023  andvar remove empty #ifdef DEBUG block.
 1.46 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.45 24-Apr-2021  thorpej branches: 1.45.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.44 27-Oct-2012  chs branches: 1.44.18; 1.44.28; 1.44.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.43 20-Dec-2010  matt branches: 1.43.8; 1.43.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.42 13-Jun-2008  cegger branches: 1.42.18;
use device_lookup_private to get softc
 1.41 17-Oct-2007  garbled branches: 1.41.16; 1.41.18; 1.41.20; 1.41.22; 1.41.24;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.40 20-Aug-2007  is branches: 1.40.2;
First part of amigappc support patches by Frank Wille.
 1.39 05-Mar-2007  he branches: 1.39.2; 1.39.10; 1.39.14; 1.39.18;
Use char*, not void* for pointer arithmetic.
 1.38 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 08-Mar-2006  lukem branches: 1.37.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.36 11-Dec-2005  christos branches: 1.36.4; 1.36.6; 1.36.8; 1.36.10;
merge ktrace-lwp.
 1.35 13-Jun-2005  jmc branches: 1.35.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.34 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 09-Apr-2003  thorpej branches: 1.32.2;
Use PAGE_SIZE rather than NBPG.
 1.31 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.30 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.29 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.28 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.27 25-Apr-2001  bouyer branches: 1.27.2; 1.27.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.26 10-Jan-1999  tron branches: 1.26.8; 1.26.20;
Don't use void pointer for arithmetic.
 1.25 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.24 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.23 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.22 12-Jan-1998  thorpej Adjust for changes to config.
 1.21 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.20 23-Dec-1996  veego branches: 1.20.8; 1.20.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.19 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.18 13-Oct-1996  christos backout previous kprintf change
 1.17 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.16 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.15 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.14 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.13 18-Mar-1996  mhitch A couple more misses from the device attachment changes:
afcd_cd --> afsc_cd
atzsccd --> atzsc_cd
 1.12 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.11 15-Mar-1996  mhitch Correct 53c710 initialization for the A4000T. Remove the A4000T probe
debugging output.
 1.10 28-Jan-1996  chopps fix typo closes 1978
 1.9 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.5 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 06-Oct-1994  chopps branches: 1.1.2;
fix a thinko in gvp diag. Add 4091 driver from Michael Hitch
(osymh@gemini.oscs.montana.edu)
 1.1.2.2 06-Oct-1994  chopps fix a thinko in gvp diag. Add 4091 driver from Michael Hitch
(osymh@gemini.oscs.montana.edu)
 1.1.2.1 06-Oct-1994  chopps file afsc.c was added on branch netbsd-1-0 on 1994-10-06 19:06:41 +0000
 1.20.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.20.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.26.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.27.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.27.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.27.8.1 25-Apr-2001  nathanw file afsc.c was added on branch nathanw_sa on 2002-02-28 04:06:30 +0000
 1.27.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.27.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.32.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.2.2 03-Sep-2007  yamt sync with head.
 1.35.2.1 21-Jun-2006  yamt sync with head.
 1.36.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.36.8.1 13-Mar-2006  yamt sync with head.
 1.36.6.1 22-Apr-2006  simonb Sync with head.
 1.36.4.1 09-Sep-2006  rpaulo sync with head
 1.37.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.39.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.39.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.39.10.1 03-Oct-2007  garbled Sync with HEAD
 1.39.2.1 09-Oct-2007  ad Sync with head.
 1.40.2.1 06-Nov-2007  matt sync with HEAD
 1.41.24.1 18-Jun-2008  simonb Sync with head.
 1.41.22.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.41.20.1 04-May-2009  yamt sync with head.
 1.41.18.1 17-Jun-2008  yamt sync with head.
 1.41.16.1 29-Jun-2008  mjf Sync with HEAD.
 1.42.18.1 05-Mar-2011  rmind sync with head
 1.43.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.43.8.1 30-Oct-2012  yamt sync with head
 1.44.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.44.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.44.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.44.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.45.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.40 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.39 24-Apr-2021  thorpej branches: 1.39.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.38 27-Oct-2012  chs branches: 1.38.18; 1.38.28; 1.38.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.37 05-Feb-2010  phx branches: 1.37.12; 1.37.22;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.36 13-Jun-2008  cegger use device_lookup_private to get softc
 1.35 11-Dec-2005  christos branches: 1.35.74; 1.35.76; 1.35.78; 1.35.80; 1.35.82;
merge ktrace-lwp.
 1.34 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 03-May-2003  wiz branches: 1.32.2;
DMA, not dma nor Dma.
 1.31 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.30 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.29 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.28 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.27 25-Apr-2001  bouyer branches: 1.27.2; 1.27.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.26 15-Jan-2000  aymeric branches: 1.26.6;
make this work again (include machine/cpu.h)
 1.25 05-Dec-1998  mjacob branches: 1.25.10;
Update HBAs to incorporate the new max_lun property.
 1.24 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.23 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.22 04-Sep-1998  is Add support for Apollo-68060-board-reworked A3000 motherboards.
This is only tested on the original A3000...
 1.21 21-Aug-1998  is Prepare for support of Apollo-cpuboard-reworked A3000 mainboard SCSI.
 1.20 12-Jan-1998  thorpej Adjust for changes to config.
 1.19 27-Aug-1997  bouyer branches: 1.19.4;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.18 23-Dec-1996  veego branches: 1.18.8; 1.18.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.17 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.16 13-Oct-1996  christos backout previous kprintf change
 1.15 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.14 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.13 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.12 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.11 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.10 04-Sep-1995  chopps sbic and board changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 16-May-1994  chopps remove uneeded function from ser.c and fix common bad arg to sbicintr() in ahsc
and atzsc
 1.2 11-May-1994  chopps general cleanup including boot diag messages.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.18.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.19.4.1 19-Jan-1999  cgd pull up revs 1.21-1.22 from trunk (is)
 1.25.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.26.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.27.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.27.8.1 25-Apr-2001  nathanw file ahsc.c was added on branch nathanw_sa on 2002-02-28 04:06:31 +0000
 1.27.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.27.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.82.1 18-Jun-2008  simonb Sync with head.
 1.35.80.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.35.78.2 11-Mar-2010  yamt sync with head
 1.35.78.1 04-May-2009  yamt sync with head.
 1.35.76.1 17-Jun-2008  yamt sync with head.
 1.35.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.37.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.37.12.1 30-Oct-2012  yamt sync with head
 1.38.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.38.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.38.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.38.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.39.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 26-Oct-1994  cgd branches: 1.2.66;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.66.1 03-Aug-2004  skrll Sync with HEAD
 1.40 06-Jul-2022  jandberg Return display depth correctly from WSDISPLAYIO_GET_FBINFO.
(previous workaround to always return 1 no longer needed with latest wsfb)
 1.39 06-Feb-2022  jandberg Refactor cursor drawing.
Fixes rare case where cursor gets painted over when screen is cleared.
 1.38 21-Aug-2021  andvar fix mainly same typos as in my previous commit but outside sys/dev/dm.
 1.37 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.36 15-Jun-2021  rin branches: 1.36.2;
Remove parentheses from return. No functional changes.
 1.35 15-Jun-2021  rin Add support for WSDISPLAYIO_MODE_DUMBFB to WSDISPLAYIO_SMODE.
 1.34 24-Apr-2021  thorpej branches: 1.34.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.33 06-Jan-2021  jandberg branches: 1.33.2;
Implement the WSDISPLAYIO_GET_FBINFO ioctl, needed by X wsfb driver.
 1.32 03-Sep-2018  riastradh branches: 1.32.4; 1.32.12;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.31 28-Jan-2018  jandberg branches: 1.31.2; 1.31.4;
Make the console framebuffer visible when polling mode console input is used.
 1.30 06-Feb-2016  jandberg Fix some awkward language in manpage and code comments.
 1.29 12-Nov-2015  phx Use the MD_BTOP() macro as replacement for m68k_btop() in all device
drivers which are shared with amigappc.
 1.28 05-Aug-2015  mrg remove include of <dev/rcons/raster.h>, which is not necessary.
 1.27 29-Mar-2014  mlelstv branches: 1.27.6;
Mark variables only used in KASSET to appease compiler.
 1.26 27-Oct-2012  chs branches: 1.26.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.25 11-Jan-2012  macallan branches: 1.25.6;
adjust wsfont_find()
 1.24 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.23 17-Jul-2011  joerg branches: 1.23.2; 1.23.6;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.22 18-Mar-2009  cegger bzero -> memset
 1.21 19-Dec-2008  cegger branches: 1.21.2;
use M_ZERO on malloc() and remove subsequent bzero().
 1.20 04-Mar-2007  christos branches: 1.20.40; 1.20.44; 1.20.52;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19 12-Apr-2006  jmmv branches: 1.19.14;
Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.18 11-Dec-2005  christos branches: 1.18.4; 1.18.6; 1.18.8; 1.18.10; 1.18.12;
merge ktrace-lwp.
 1.17 01-Jun-2005  jandberg branches: 1.17.2;
Tell kbd when it is the console keyboard instead of always assuming
it is. Also console keyboard initialization is now made during consinit
instead of autoconf.
Reviewed by <is>.
 1.16 13-Dec-2004  chs for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.15 23-Feb-2004  jandberg Add wsfont pseudo-device.

With this the custom font loading code isn't needed and is removed.
 1.14 12-Nov-2003  jandberg amidisplaycc.c:
Add screen types suitable for PAL displays, and fix typos
in older screen type names; reported by Gunther Nikl.
amidisplay.4:
Document the new screen types and add some misc information.
 1.13 12-Nov-2003  jandberg Fix bug/typo and rewrite some funnily structured code.
Pointed out by compiler warnings.
 1.12 14-Jul-2003  aymeric The second argument to amidisplaycc_setnamedfont() really should be a const.
Make it so.
 1.11 10-Feb-2003  jandberg branches: 1.11.2;
make sure cursor is cleared from old location before drawing in the next
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 02-Sep-2002  aymeric call grfcc_probe() and viewprobe(), even when we are not the console.
This fixes a panic when using a serial console and wsconscfg.
(The monitors list wouldn't be initialized in grfabs.c)
 1.7 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.6 17-Mar-2002  atatat branches: 1.6.4; 1.6.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.5 13-Mar-2002  ad Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
 1.4 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 13-Jan-2002  jandberg Amiga wsdisplay updates.

conf/GENERIC:
conf/files.amiga:
- Bring in wsfont definitions.

dev/grfabs_reg.h:
- Add macros for decomposing palette entries.

dev/amidisplaycc.c:
- Support for fonts, either wsfonts compiled into kernel
or runtime-loadable by ioctl. Font width still limited to 8,
height may vary.
- Limited support for mapped displays. No way to adjust display
mode. Palette setting works.
- Prettier default palette (white on black).
- Probes correctly as WSDISPLAY_TYPE_AMIGACC.
- Support for screen blanking.
 1.1 02-Feb-2001  is branches: 1.1.2; 1.1.6; 1.1.10;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.1.10.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.4 17-Sep-2002  nathanw Catch up to -current.
 1.1.10.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file amidisplaycc.c was added on branch thorpej_scsipi on 2001-02-11 19:08:46 +0000
 1.6.6.1 04-Sep-2002  lukem Pull up revision 1.8 (requested by aymeric in ticket #762):
call grfcc_probe() and viewprobe(), even when we are not the console.
This fixes a panic when using a serial console and wsconscfg.
(The monitors list wouldn't be initialized in grfabs.c)
 1.6.4.1 16-Jul-2002  gehenna catch up with -current.
 1.11.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.11.2.4 21-Nov-2004  skrll Adapt to branch.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.2.2 03-Sep-2007  yamt sync with head.
 1.17.2.1 21-Jun-2006  yamt sync with head.
 1.18.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.18.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.18.8.1 24-May-2006  yamt sync with head.
 1.18.6.1 22-Apr-2006  simonb Sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.19.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.20.52.2 28-Apr-2009  skrll Sync with HEAD.
 1.20.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.44.1 04-May-2009  yamt sync with head.
 1.20.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.21.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.6.1 18-Feb-2012  mrg merge to -current.
 1.23.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.2.2 30-Oct-2012  yamt sync with head
 1.23.2.1 17-Apr-2012  yamt sync with head
 1.25.6.3 03-Dec-2017  jdolecek update from HEAD
 1.25.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.2.1 18-May-2014  rmind sync with head
 1.27.6.3 19-Mar-2016  skrll Sync with HEAD
 1.27.6.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.27.6.1 22-Sep-2015  skrll Sync with HEAD
 1.31.4.1 10-Jun-2019  christos Sync with HEAD
 1.31.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.32.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.32.4.1 13-Oct-2021  martin Pull up following revision(s) (requested by abs in ticket #1359):

sys/arch/amiga/dev/amidisplaycc.c: revision 1.33
share/man/man4/man4.amiga/amidisplaycc.4: revision 1.14
sys/arch/amiga/dev/amidisplaycc.c: revision 1.35
sys/arch/amiga/dev/amidisplaycc.c: revision 1.36

Implement the WSDISPLAYIO_GET_FBINFO ioctl, needed by X wsfb driver.

Add support for WSDISPLAYIO_MODE_DUMBFB to WSDISPLAYIO_SMODE.

Remove parentheses from return. No functional changes.

Update documentation to mention current status of X11
 1.33.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.34.2.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.36.2.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.24 22-Sep-2018  maxv Remove isic(4). It is part of ISDN, which we are now retiring.
 1.23 27-Oct-2012  chs branches: 1.23.36; 1.23.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.22 19-Jul-2011  dyoung branches: 1.22.2; 1.22.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.21 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.20 01-Jan-2003  thorpej branches: 1.20.104; 1.20.106; 1.20.108;
Use aprint_normal() for cfprint routines.
 1.19 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.16 28-Jan-2002  aymeric branches: 1.16.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.15 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.14 26-Apr-2001  is branches: 1.14.2; 1.14.8;
Be more specific than "some isic board".
 1.13 20-Feb-2001  is branches: 1.13.2;
Clean up messages, and replace nested ifs by switch statement.
 1.12 14-Feb-2001  is Print out IPL.
 1.11 08-Feb-2001  is Support for BSC ISDN Master II. As far as we are concerned, this seems
to be identical to the old model.
 1.10 28-Jan-2001  is Jens Sch�nfeld seems to recall the name is ISDN link.
 1.9 26-Jan-2001  is Support for the Zeus Development(?) ISDN board (2189/3).
 1.8 25-Jan-2001  is Add support for ISDN Surfer (ISDN only, for the time being).
 1.7 23-Jan-2000  aymeric sync with new bus.h
 1.6 31-Dec-1999  is assign the pointer
 1.5 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.4 17-Mar-1999  is branches: 1.4.8;
ISDN Master II support added.
Actually, support for this has still to be added to the isdn4bsd release.
 1.3 16-Feb-1999  is Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 10-Aug-1998  is ISDN Blaster / Master: ZBus attachment / SUPIO driver.
 1.4.8.3 12-Mar-2001  bouyer Sync with HEAD.
 1.4.8.2 11-Feb-2001  bouyer Sync with HEAD.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.13.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.8.5 03-Jan-2003  thorpej Sync with HEAD.
 1.14.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.14.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.14.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.8.1 26-Apr-2001  nathanw file aster.c was added on branch nathanw_sa on 2002-02-28 04:06:31 +0000
 1.14.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.14.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.16.8.1 16-May-2002  gehenna Include sys/conf.h directly.
 1.20.108.1 16-May-2008  yamt sync with head.
 1.20.106.1 18-May-2008  yamt sync with head.
 1.20.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.22.2.1 30-Oct-2012  yamt sync with head
 1.23.38.1 10-Jun-2019  christos Sync with HEAD
 1.23.36.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.45 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.44 24-Apr-2021  thorpej branches: 1.44.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.43 27-Oct-2012  chs branches: 1.43.18; 1.43.28; 1.43.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.42 09-Feb-2010  phx branches: 1.42.10; 1.42.20;
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
 1.41 07-Feb-2010  he branches: 1.41.2;
Remove a now-unused variable declaration.
 1.40 05-Feb-2010  phx Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.39 16-Oct-2009  phx Fixed typo in DEBUG: atysc -> atzsc
 1.38 13-Jun-2008  cegger use device_lookup_private to get softc
 1.37 03-Dec-2007  ad branches: 1.37.14; 1.37.16; 1.37.18; 1.37.20; 1.37.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.36 11-Dec-2005  christos branches: 1.36.30; 1.36.48; 1.36.50; 1.36.56;
merge ktrace-lwp.
 1.35 07-Aug-2003  agc branches: 1.35.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.34 03-May-2003  wiz branches: 1.34.2;
DMA, not dma nor Dma.
 1.33 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.30 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.29 25-Apr-2001  bouyer branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.28 05-Dec-1998  mjacob branches: 1.28.10; 1.28.22;
Update HBAs to incorporate the new max_lun property.
 1.27 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.26 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.25 21-Aug-1998  is Prepare for support of Apollo-cpuboard-reworked A3000 mainboard SCSI.
 1.24 12-Jan-1998  thorpej Adjust for changes to config.
 1.23 27-Aug-1997  bouyer branches: 1.23.4;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.22 23-Dec-1996  veego branches: 1.22.8; 1.22.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.21 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.20 13-Oct-1996  christos backout previous kprintf change
 1.19 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.18 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.17 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.16 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.15 18-Mar-1996  mhitch A couple more misses from the device attachment changes:
afcd_cd --> afsc_cd
atzsccd --> atzsc_cd
 1.14 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.13 04-Sep-1995  chopps sbic and board changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.10 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 16-Jul-1994  chopps branches: 1.6.2;
fix a couple things pointed out from Michael.
 1.5 02-Jul-1994  chopps branches: 1.5.2;
couple fixes from Michael. 2091 now uses 24bit only dma (oops)
 1.4 16-Jun-1994  chopps fix boot diag output.
 1.3 16-May-1994  chopps remove uneeded function from ser.c and fix common bad arg to sbicintr() in ahsc
and atzsc
 1.2 11-May-1994  chopps general cleanup including boot diag messages.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.5.2.1 16-Jul-1994  cgd from trunk, per chopps
 1.6.2.2 16-Jul-1994  chopps fix a couple things pointed out from Michael.
 1.6.2.1 16-Jul-1994  chopps file atzsc.c was added on branch netbsd-1-0 on 1994-07-16 19:45:45 +0000
 1.22.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.22.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.23.4.1 19-Jan-1999  cgd pull up rev 1.25 from trunk (is)
 1.28.22.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.29.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.29.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.29.8.1 25-Apr-2001  nathanw file atzsc.c was added on branch nathanw_sa on 2002-02-28 04:06:31 +0000
 1.29.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.29.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.34.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.16.1 07-Dec-2007  yamt sync with head
 1.36.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.36.50.1 09-Jan-2008  matt sync with HEAD
 1.36.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.36.30.1 03-Dec-2007  ad Sync with HEAD.
 1.37.22.1 18-Jun-2008  simonb Sync with head.
 1.37.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.37.18.2 11-Mar-2010  yamt sync with head
 1.37.18.1 04-May-2009  yamt sync with head.
 1.37.16.1 17-Jun-2008  yamt sync with head.
 1.37.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.41.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.42.20.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.42.10.1 30-Oct-2012  yamt sync with head
 1.43.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.43.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.43.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.43.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.44.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 26-Jan-2002  aymeric branches: 1.3.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 26-Oct-1994  cgd branches: 1.2.46; 1.2.50;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.48 29-Feb-2020  isaki round_blocksize must return a multiple of the framesize.
aucc(4) supports 3 channels mode.
 1.47 07-Sep-2019  rin branches: 1.47.2;
The device does not support recording.
Fix diagnostic assertion failure in aucc_set_format().

OK isaki

XXX
pullup to netbsd-9
 1.46 08-Jun-2019  isaki branches: 1.46.2;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.45 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.44 16-Mar-2019  isaki branches: 1.44.2;
Use C99 style struct initializer to audio_hw_if.
 1.43 22-Mar-2014  christos branches: 1.43.30;
kill sprintf
fix unused variables
 1.42 27-Oct-2012  chs branches: 1.42.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.41 23-Nov-2011  jmcneill branches: 1.41.8;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.
 1.40 08-Mar-2006  lukem branches: 1.40.102; 1.40.104;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.39 11-Dec-2005  christos branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10;
merge ktrace-lwp.
 1.38 22-May-2005  christos branches: 1.38.2;
No 0x in front of %p...
 1.37 15-Jan-2005  kent ansify and KNF
 1.36 10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.35 29-Oct-2004  yamt branches: 1.35.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.34 03-May-2003  wiz branches: 1.34.2;
DMA, not dma nor Dma.
 1.33 06-Apr-2003  wiz Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
 1.32 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.31 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.30 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.29 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.28 03-Oct-2001  augustss branches: 1.28.4;
Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
 1.27 08-May-2001  is branches: 1.27.2; 1.27.4;
defopt LEV6_DEFER.
 1.26 03-Sep-2000  mhitch branches: 1.26.2;
Use the correct DMA pointer for the second channel on 14-bit byte-swapped
conversion. Fixes NULL pointer reference crash when playing 16 bit little
endian audio.
 1.25 16-Mar-2000  kleink branches: 1.25.4;
Kill more broken cf_unit bogons.
 1.24 04-Mar-1999  is branches: 1.24.2; 1.24.8;
Modifications to aucc.c for more input formats and 14bit stereo output.
By Bernardo Innocenti, submitted as PR 6787.
Some KNF-ifying done by myself, so you might want to blame me instead
if the original patch worked for you.
-is
 1.23 17-Aug-1998  augustss * Redo the way the way the MIDI driver attaches to audio devices.
* Improve the midisyn layer a little.
* Add a driver for the Yamaha OPL[23] FM synths.
The opl driver is not finished yet; it sounds pretty awful.

For some strange reason I cannot get any FM sound from my SB64 cards,
but a regular SB16 works fine.
 1.22 12-Jan-1998  thorpej Adjust for changes to config.
 1.21 24-Nov-1997  is Workaround for the "xanim volume setting problem":
We play mono samples on all 4 channels.
However, we get the volume settings for mono samples as a symmetic two-channel
setting... the other two channels used to stay at max volume...
I believe that something else is wrong here, but dont want to change MI
code (which in turn influences a couple of MD driver) thus late in the release
cycle.
 1.20 19-Oct-1997  augustss branches: 1.20.2;
Make the audio API (almost) SunOS compatible.
The changes is to allow some limited mixer manipulation through
the audio device (instead of the mixer device).
This rendered 4 methods in audio_hw_if unused so garbage collect these.
 1.19 11-Oct-1997  mycroft AudioC[A-Z] -> AudioC[a-z]
AudioElinear -> AudioEslinear
 1.18 24-Aug-1997  augustss - Change audio_hw_if a little: set_param now sets the play and record modes
at the same time instead by using two different calls. This enables
it to check more easily if the combined mode is all right.
- Improve the error checking in audio.c.
- Add a new audio property, AUDIO_PROP_INDEPENDENT, show if the
play and record settings are independent.
- Fix some buglets in audio.c.
 1.17 19-Aug-1997  augustss Change the MI audio driver so it attaches to the MD driver in the
normal way. This requires adding a line to the config files to
get audio to work again.
 1.16 31-Jul-1997  augustss Audio changes:
- Change the way attach and open works to allow multiple audio
devices.
- Split the mulaw.c file into two to avoid dragging in mulaw
convertsion when they are not needed. Add 16 bit alaw/mulaw tables.
- Change the way audio properties are gotten.
- Recognize more versions os SoundBlaster.
 1.15 28-Jul-1997  augustss branches: 1.15.2;
Audio: Remove the machine dependant code I put in audio.c by mistake.
This adds another method to audio_hw_if. Also remove a field from
audio_hw_if that was not read-only.
 1.14 28-Jul-1997  augustss Update forgotten audio driver for changes in audio_hw_if.
 1.13 27-Jul-1997  augustss audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.
 1.12 15-Jul-1997  augustss Garbage collect some unused routines.
 1.11 15-Jul-1997  augustss In the name of backwards compatibility AUDIO_ENCODING_LINEAR has been
renamed AUDIO_ENCODING_SLINEAR and AUDIO_ENCODING_LINEAR reverts to the
NetBSD 1.2 sematics. A kernel with COMPAT_12 defined will accept
AUDIO_ENCODING_LINEAR and treat it as before, without COMPAT_12 it
will be rejected.
 1.10 10-Jul-1997  is - Fix gain control.
- play mono stuff on all channels.
 1.9 09-Jul-1997  is Make multichannel output work. The cc parameter to hw_start_output is
a byte counter, it seems. Somebody should really write man 9 audio_if.
While here, make debug output invisible #ifndef AUCCDEBUG.
 1.8 04-Jul-1997  is Multichannel output still doesn't work, but while working on it, I repaired
the double buffering code, and setting a couple of other parameters works now.
 1.7 23-Jun-1997  is Make aucc work in the presence of LEV6_DEFER.
 1.6 21-Jun-1997  kleink Change last commit to use `#error'.
 1.5 21-Jun-1997  is Make this fail to compile with LEV6_DEFER.
XXX This isn't nice, but stopping the system clock isn't nice, either.
We will repair this soon.
 1.4 20-Jun-1997  is Add RCS ids, and clean up some unused in newstyle audio hardware drivers
functions.
 1.3 15-Jun-1997  is Actually commit the sample rate to the hardware.
While we're here, add missing parts of (software encoded) ULINEAR encoding.
 1.2 15-Jun-1997  is A bit more of KNF.
 1.1 14-Jun-1997  is Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.15.2.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.15.2.2 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.15.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.20.2.1 24-Nov-1997  perry pullup from trunk (requested by ig)
 1.24.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.24.2.1 09-Sep-2000  he Pull up revision 1.26 (requested by is):
Use the correct DMA pointer for the second channel on 14-bit
byte-swapped conversion. Fixes NULL pointer reference crash
when playing 16-bit little-endian audio.
 1.25.4.1 03-Sep-2000  mhitch Pullup revision 1.26 (requested by mhitch, approved by jhawk)

Log Message:
Use the correct DMA pointer for the second channel on 14-bit byte-swapped
conversion. Fixes NULL pointer reference crash when playing 16 bit little
endian audio.
 1.26.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.4.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.27.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.27.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.27.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.28.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.28.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.28.4.1 03-Oct-2001  nathanw file aucc.c was added on branch nathanw_sa on 2002-02-28 04:06:32 +0000
 1.34.2.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.2 17-Jan-2005  skrll Sync with HEAD.
 1.34.2.1 02-Nov-2004  skrll Sync with HEAD.
 1.35.2.2 09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.35.2.1 03-Jan-2005  kent * adopt the filter pipeline framework.
* repulse.c follows ac97_attach() change
 1.38.2.1 21-Jun-2006  yamt sync with head.
 1.39.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.39.8.1 13-Mar-2006  yamt sync with head.
 1.39.6.1 22-Apr-2006  simonb Sync with head.
 1.39.4.1 09-Sep-2006  rpaulo sync with head
 1.40.104.2 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.40.104.1 20-Nov-2011  mrg port these to audiomp: support get_locks, and take the intr_lock
in the interrupt handler.
 1.40.102.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.40.102.2 30-Oct-2012  yamt sync with head
 1.40.102.1 17-Apr-2012  yamt sync with head
 1.41.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.42.2.1 18-May-2014  rmind sync with head
 1.43.30.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.43.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.43.30.1 10-Jun-2019  christos Sync with HEAD
 1.44.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.44.2.2 04-May-2019  isaki Remove simple flags that indicate whether the device is opened.
These are handled in the upper layer now.
 1.44.2.1 21-Apr-2019  isaki Adapt to audio2.
- Remove its own mulaw converter.
- XXX I'm not sure about 3,4ch mode vs 8/14bit mode.
 1.46.2.2 21-Mar-2020  martin Pull up following revision(s) (requested by isaki in ticket #792):

sys/arch/amiga/dev/aucc.c: revision 1.48
sys/dev/pci/auixp.c: revision 1.49
sys/dev/pci/gcscaudio.c: revision 1.19
sys/dev/pci/auich.c: revision 1.159
sys/dev/sbus/dbri.c: revision 1.42
sys/dev/pci/auvia.c: revision 1.85
sys/dev/pci/auacer.c: revision 1.39

Drop 512 bytes limit on auvia_round_blocksize().

This fixes attach on 6 channels device.
PR kern/55017.

round_blocksize must return a multiple of the framesize.
aucc(4) supports 3 channels mode.

round_blocksize must return a multiple of the framesize
even if passed blocksize is greater than the upper limit.

round_blocksize must return a multiple of the framesize.

It's not divisible when blk=GCSCAUDI_PRD_SIZE_MAX and channels=4.
round_blocksize must return a multiple of the framesize
even if 6 channels mode.

I believe that keeping "good alignment" is just a wish, not constraint.
 1.46.2.1 07-Sep-2019  snj Pull up following revision(s) (requested by rin in ticket #189):
sys/arch/amiga/dev/aucc.c: revision 1.47
The device does not support recording.
Fix diagnostic assertion failure in aucc_set_format().
OK isaki
 1.47.2.1 29-Feb-2020  ad Sync with head.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 15-Jan-2005  kent ansify and KNF
 1.4 26-Jan-2002  aymeric branches: 1.4.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 04-Jul-1997  is branches: 1.3.34; 1.3.38;
Multichannel output still doesn't work, but while working on it, I repaired
the double buffering code, and setting a couple of other parameters works now.
 1.2 20-Jun-1997  is Add RCS ids, and clean up some unused in newstyle audio hardware drivers
functions.
 1.1 14-Jun-1997  is Amiga custom chip audio hardware driver, by Stefan Thesing
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
 1.3.38.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.34.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.16.1 17-Jan-2005  skrll Sync with HEAD.
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 27-Oct-2012  chs branches: 1.3.18; 1.3.28; 1.3.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 10-Jan-2012  rkujawa branches: 1.2.6;
Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.1 14-Jan-2011  phx branches: 1.1.6; 1.1.10; 1.1.14;
Driver for BlizzardPPC 603e+ SCSI host adatper.
Patch submitted by Radoslaw Kujawa.
 1.1.14.1 18-Feb-2012  mrg merge to -current.
 1.1.10.2 30-Oct-2012  yamt sync with head
 1.1.10.1 17-Apr-2012  yamt sync with head
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 14-Jan-2011  rmind file bppcsc.c was added on branch rmind-uvmplock on 2011-03-05 20:49:20 +0000
 1.2.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.3.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.3.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.4.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.33 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.32 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.31 20-Dec-2010  matt branches: 1.31.58; 1.31.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.30 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.29 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.28 23-Nov-2009  rmind branches: 1.28.2; 1.28.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.27 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.26 13-Apr-2008  tsutsui branches: 1.26.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.25 17-Oct-2007  garbled branches: 1.25.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.24 20-Aug-2007  is branches: 1.24.2;
First part of amigappc support patches by Frank Wille.
 1.23 11-Mar-2007  he branches: 1.23.8; 1.23.12; 1.23.16;
Correct a thinko of mine in the previous change, pointed out by
is@. Even though the argument type changes as an effect of the
caddr_t removal, there really is no need to indirect where we didn't
before. Instead, add the appropriate cast.
 1.22 05-Mar-2007  he branches: 1.22.2;
Fix one missing indirection causing a type conflict, and use char* for
pointer arithmetic.
 1.21 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.20 29-Mar-2006  thorpej branches: 1.20.14;
Use device_cfdata().
 1.19 08-Mar-2006  lukem branches: 1.19.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.18 11-Dec-2005  christos branches: 1.18.4; 1.18.6; 1.18.8; 1.18.10;
merge ktrace-lwp.
 1.17 13-Jun-2005  jmc branches: 1.17.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.16 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.15 01-Apr-2003  thorpej branches: 1.15.2;
Use PAGE_SIZE rather than NBPG.
 1.14 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.11 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 25-Apr-2001  bouyer branches: 1.10.2; 1.10.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.9 05-Jun-2000  tsutsui branches: 1.9.4;
Adapt MI ncr53c9x changes.
 1.8 30-Sep-1999  thorpej branches: 1.8.2; 1.8.10;
Update for SCSIPI changes.
 1.7 25-Sep-1999  is vm_offset_t -> vaddr_t/paddr_t
 1.6 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.5 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.4 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.3 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.2 12-Jan-1998  thorpej Adjust for changes to config.
 1.1 10-Oct-1997  mhitch branches: 1.1.2;
Add separate driver frontend for the Blizzard-IV; the differences with
the Blizzard-II are more extensive than I orginally thought.
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 10-Oct-1997  thorpej file bzivsc.c was added on branch marc-pcmcia on 1997-10-14 08:26:09 +0000
 1.8.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.9.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.8.1 25-Apr-2001  nathanw file bzivsc.c was added on branch nathanw_sa on 2002-02-28 04:06:32 +0000
 1.10.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.15.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.2.2 03-Sep-2007  yamt sync with head.
 1.17.2.1 21-Jun-2006  yamt sync with head.
 1.18.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.18.8.2 01-Apr-2006  yamt sync with head.
 1.18.8.1 13-Mar-2006  yamt sync with head.
 1.18.6.1 22-Apr-2006  simonb Sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.19.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.20.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.22.2.2 09-Oct-2007  ad Sync with head.
 1.22.2.1 13-Mar-2007  ad Sync with head.
 1.23.16.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.23.12.1 03-Sep-2007  skrll Sync with HEAD.
 1.23.8.1 03-Oct-2007  garbled Sync with HEAD
 1.24.2.1 06-Nov-2007  matt sync with HEAD
 1.25.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.4.2 11-Aug-2010  yamt sync with head.
 1.26.4.1 11-Mar-2010  yamt sync with head
 1.28.4.2 05-Mar-2011  rmind sync with head
 1.28.4.1 03-Jul-2010  rmind sync with head
 1.28.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.28.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.31.60.1 10-Jun-2019  christos Sync with HEAD
 1.31.58.2 18-Jan-2019  pgoyette Synch with HEAD
 1.31.58.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.3 13-Apr-2008  tsutsui branches: 1.3.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.2 25-Sep-1999  is branches: 1.2.138;
vm_offset_t -> vaddr_t/paddr_t
 1.1 10-Oct-1997  mhitch branches: 1.1.2;
Add separate driver frontend for the Blizzard-IV; the differences with
the Blizzard-II are more extensive than I orginally thought.
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 10-Oct-1997  thorpej file bzivscvar.h was added on branch marc-pcmcia on 1997-10-14 08:26:11 +0000
 1.2.138.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.4.1 11-Mar-2010  yamt sync with head
 1.5 16-Dec-1996  is The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.4 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.3 11-Nov-1996  is oops; converted twice from hex to decimal earlier
 1.2 19-Oct-1996  is Clean up the attach messages a bit.
 1.1 17-Oct-1996  is Add driver bznsc (for BliZzard, New version: -IV, -1260, -2060).

Still untested on -1260/-1230, and hangs when enforcing SFAS_NO_DMA on 2060;
but works with DMA on the latter.

Still untested in a NetBSD-12A environment. (Sorry, don't have the hardware
myself.)

Thanks to Laurent Baroukh for being the guinea pig, and to Jerome Lovy
for forwarding the hardware information Phase V gave him, and to Phase
V for providing it.
 1.2 16-Dec-1996  is The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.1 17-Oct-1996  is Add driver bznsc (for BliZzard, New version: -IV, -1260, -2060).

Still untested on -1260/-1230, and hangs when enforcing SFAS_NO_DMA on 2060;
but works with DMA on the latter.

Still untested in a NetBSD-12A environment. (Sorry, don't have the hardware
myself.)

Thanks to Laurent Baroukh for being the guinea pig, and to Jerome Lovy
for forwarding the hardware information Phase V gave him, and to Phase
V for providing it.
 1.2 16-Dec-1996  is The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.1 17-Oct-1996  is Add driver bznsc (for BliZzard, New version: -IV, -1260, -2060).

Still untested on -1260/-1230, and hangs when enforcing SFAS_NO_DMA on 2060;
but works with DMA on the latter.

Still untested in a NetBSD-12A environment. (Sorry, don't have the hardware
myself.)

Thanks to Laurent Baroukh for being the guinea pig, and to Jerome Lovy
for forwarding the hardware information Phase V gave him, and to Phase
V for providing it.
 1.50 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.49 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.48 20-Dec-2010  matt branches: 1.48.58; 1.48.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.47 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.46 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.45 23-Nov-2009  rmind branches: 1.45.2; 1.45.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.44 13-Apr-2008  tsutsui branches: 1.44.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.43 17-Oct-2007  garbled branches: 1.43.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.42 20-Aug-2007  is branches: 1.42.2;
First part of amigappc support patches by Frank Wille.
 1.41 11-Mar-2007  he branches: 1.41.8; 1.41.12; 1.41.16;
Correct a thinko of mine in the previous change, pointed out by
is@. Even though the argument type changes as an effect of the
caddr_t removal, there really is no need to indirect where we didn't
before. Instead, add the appropriate cast.
 1.40 05-Mar-2007  he branches: 1.40.2;
Fix one missing indirection causing a type conflict, and use char* for
pointer arithmetic.
 1.39 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.38 29-Mar-2006  thorpej branches: 1.38.14;
Use device_cfdata().
 1.37 08-Mar-2006  lukem branches: 1.37.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.36 11-Dec-2005  christos branches: 1.36.4; 1.36.6; 1.36.8; 1.36.10;
merge ktrace-lwp.
 1.35 13-Jun-2005  jmc branches: 1.35.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.34 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.33 01-Apr-2003  thorpej branches: 1.33.2;
Use PAGE_SIZE rather than NBPG.
 1.32 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.31 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.30 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.29 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.28 25-Apr-2001  bouyer branches: 1.28.2; 1.28.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.27 05-Jun-2000  tsutsui branches: 1.27.4;
Adapt MI ncr53c9x changes.
 1.26 30-Sep-1999  thorpej branches: 1.26.2; 1.26.10;
Update for SCSIPI changes.
 1.25 25-Sep-1999  is vm_offset_t -> vaddr_t/paddr_t
 1.24 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.23 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.22 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.21 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.20 12-Jan-1998  thorpej Adjust for changes to config.
 1.19 12-Oct-1997  mhitch Oops, wrong file was committed. Get the right one this time.
 1.18 10-Oct-1997  mhitch Add separate driver frontend for the Blizzard-IV; the differences with
the Blizzard-II are more extensive than I orginally thought.
 1.17 04-Oct-1997  mhitch Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.16 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.15 21-Jan-1997  thorpej branches: 1.15.6; 1.15.8;
Initialize max_target in the SCSI link.
 1.14 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.13 13-Oct-1996  christos backout previous kprintf change
 1.12 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.11 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.10 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.9 01-Jul-1996  is There are Blizzard boards without SCSI options - we need to probe for the
existence of the SCSI hardware in the boards adress region.
Thanks to Oster Nerhus for the detailed bug report and to Ralph Schmidt for
the recommended probing method.
 1.8 10-Jun-1996  is Activate M68040 cache flushing code also in 68060 only kernels.
 1.7 21-Apr-1996  veego branches: 1.7.4;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.6 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.5 09-Oct-1995  chopps fix typo
 1.4 07-Oct-1995  chopps fixes for fastlane from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.3 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 26-Jun-1995  chopps typo fix from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.7.4.2 02-Jul-1996  jtc Pulled up from version 1.9 by request from Ignatios Souvatzis
 1.7.4.1 10-Jun-1996  is Pull up bug fix from main branch:
activate M68040 style dma flush also on M68060 only kernels.
 1.15.8.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.15.8.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.15.6.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.26.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.26.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.27.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.28.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.28.8.1 25-Apr-2001  nathanw file bzsc.c was added on branch nathanw_sa on 2002-02-28 04:06:33 +0000
 1.28.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.33.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.33.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.33.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.33.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.2.2 03-Sep-2007  yamt sync with head.
 1.35.2.1 21-Jun-2006  yamt sync with head.
 1.36.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.36.8.2 01-Apr-2006  yamt sync with head.
 1.36.8.1 13-Mar-2006  yamt sync with head.
 1.36.6.1 22-Apr-2006  simonb Sync with head.
 1.36.4.1 09-Sep-2006  rpaulo sync with head
 1.37.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.38.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.40.2.2 09-Oct-2007  ad Sync with head.
 1.40.2.1 13-Mar-2007  ad Sync with head.
 1.41.16.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.41.12.1 03-Sep-2007  skrll Sync with HEAD.
 1.41.8.1 03-Oct-2007  garbled Sync with HEAD
 1.42.2.1 06-Nov-2007  matt sync with HEAD
 1.43.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.44.4.2 11-Aug-2010  yamt sync with head.
 1.44.4.1 11-Mar-2010  yamt sync with head
 1.45.4.2 05-Mar-2011  rmind sync with head
 1.45.4.1 03-Jul-2010  rmind sync with head
 1.45.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.45.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.48.60.1 10-Jun-2019  christos Sync with HEAD
 1.48.58.2 18-Jan-2019  pgoyette Synch with HEAD
 1.48.58.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3 05-Oct-1997  veego Unused files after the sfas driver is replaced by the MI ncr53c9x driver.
 1.2 21-Apr-1996  veego branches: 1.2.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.2.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.5 13-Apr-2008  tsutsui branches: 1.5.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.4 25-Sep-1999  is branches: 1.4.138;
vm_offset_t -> vaddr_t/paddr_t
 1.3 04-Oct-1997  mhitch Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.2 21-Apr-1996  veego branches: 1.2.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.2.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.138.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.4.1 11-Mar-2010  yamt sync with head
 1.38 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.37 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.36 20-Dec-2010  matt branches: 1.36.58; 1.36.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.35 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.34 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.33 23-Nov-2009  rmind branches: 1.33.2; 1.33.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.32 15-Nov-2009  snj Drop 3rd and 4th clauses (except in one case, where copyright is shared
with UCB and only the 3rd clause is dropped). Approved by mhitch@ and is@
(copyright holders).
 1.31 13-Apr-2008  tsutsui branches: 1.31.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.30 17-Oct-2007  garbled branches: 1.30.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.29 20-Aug-2007  is branches: 1.29.2;
First part of amigappc support patches by Frank Wille.
 1.28 11-Mar-2007  he branches: 1.28.8; 1.28.12; 1.28.16;
Correct a thinko of mine in the previous change, pointed out by
is@. Even though the argument type changes as an effect of the
caddr_t removal, there really is no need to indirect where we didn't
before. Instead, add the appropriate cast.
 1.27 05-Mar-2007  he branches: 1.27.2;
Fix one missing indirection causing a type conflict, and use char* for
pointer arithmetic.
 1.26 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.25 29-Mar-2006  thorpej branches: 1.25.14;
Use device_cfdata().
 1.24 08-Mar-2006  lukem branches: 1.24.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.23 11-Dec-2005  christos branches: 1.23.4; 1.23.6; 1.23.8; 1.23.10;
merge ktrace-lwp.
 1.22 13-Jun-2005  jmc branches: 1.22.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.21 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.20 01-Apr-2003  thorpej branches: 1.20.2;
Use PAGE_SIZE rather than NBPG.
 1.19 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.16 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.15 25-Apr-2001  bouyer branches: 1.15.2; 1.15.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.14 05-Jun-2000  tsutsui branches: 1.14.4;
Adapt MI ncr53c9x changes.
 1.13 30-Sep-1999  thorpej branches: 1.13.2; 1.13.10;
Update for SCSIPI changes.
 1.12 25-Sep-1999  is vm_offset_t -> vaddr_t/paddr_t
 1.11 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.10 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.9 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.8 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.7 12-Jan-1998  thorpej Adjust for changes to config.
 1.6 24-Oct-1997  mhitch Check manufacturer and product codes correctly. The Blizzard 2060 driver
was trying to configure on a Cyberstorm MKI SCSI.
 1.5 04-Oct-1997  mhitch branches: 1.5.2;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.4 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.3 21-Jan-1997  thorpej branches: 1.3.6; 1.3.8;
Initialize max_target in the SCSI link.
 1.2 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.1 16-Dec-1996  is The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.3.8.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.8.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.6.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.5.2.1 24-Oct-1997  mellon Pull rev 1.6 up from trunk
 1.13.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.13.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.14.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.15.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.15.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.15.8.1 25-Apr-2001  nathanw file bztzsc.c was added on branch nathanw_sa on 2002-02-28 04:06:33 +0000
 1.15.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.15.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.20.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.2.2 03-Sep-2007  yamt sync with head.
 1.22.2.1 21-Jun-2006  yamt sync with head.
 1.23.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.8.2 01-Apr-2006  yamt sync with head.
 1.23.8.1 13-Mar-2006  yamt sync with head.
 1.23.6.1 22-Apr-2006  simonb Sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.24.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.25.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.27.2.2 09-Oct-2007  ad Sync with head.
 1.27.2.1 13-Mar-2007  ad Sync with head.
 1.28.16.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.28.12.1 03-Sep-2007  skrll Sync with HEAD.
 1.28.8.1 03-Oct-2007  garbled Sync with HEAD
 1.29.2.1 06-Nov-2007  matt sync with HEAD
 1.30.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.31.4.2 11-Aug-2010  yamt sync with head.
 1.31.4.1 11-Mar-2010  yamt sync with head
 1.33.4.2 05-Mar-2011  rmind sync with head
 1.33.4.1 03-Jul-2010  rmind sync with head
 1.33.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.33.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.36.60.1 10-Jun-2019  christos Sync with HEAD
 1.36.58.2 18-Jan-2019  pgoyette Synch with HEAD
 1.36.58.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 05-Oct-1997  veego Unused files after the sfas driver is replaced by the MI ncr53c9x driver.
 1.1 16-Dec-1996  is branches: 1.1.10;
The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.1.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.4 13-Apr-2008  tsutsui branches: 1.4.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.3 25-Sep-1999  is branches: 1.3.138;
vm_offset_t -> vaddr_t/paddr_t
 1.2 04-Oct-1997  mhitch Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.1 16-Dec-1996  is branches: 1.1.10;
The original docs for the Phase 5 Development SCSI boards had a edito,
making me think that the Blizzard-IV and the Blizzard-2060 scsi
options have nearly identical DMA engines (just with a different
address offset). Alas, this isn't true.

Herewith I replace the "bznsc" (all-new-Blizzard-models) driver with the
"bztzsc" (Blizzard Two Zero).
 1.1.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.138.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.4.1 11-Mar-2010  yamt sync with head
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.21 27-Oct-2012  chs branches: 1.21.18; 1.21.28; 1.21.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.20 10-Jan-2012  rkujawa branches: 1.20.6;
Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.19 20-Dec-2010  matt branches: 1.19.8; 1.19.12;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.18 05-Feb-2010  phx branches: 1.18.4;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.17 09-Jan-2009  mhitch This driver doesn't use sicallbacks, so don't bother pre-allocating one.
Probably left over from a copy/edit of the zssc driver.
 1.16 13-Jun-2008  cegger branches: 1.16.4;
use device_lookup_private to get softc
 1.15 08-Mar-2006  lukem branches: 1.15.64; 1.15.66; 1.15.68; 1.15.70; 1.15.72;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10;
merge ktrace-lwp.
 1.13 28-Mar-2004  mhitch branches: 1.13.16;
Remove license clauses 3 and 4 in my licenses.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 09-Apr-2003  thorpej branches: 1.11.2;
Use PAGE_SIZE rather than NBPG.
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 25-Apr-2001  bouyer branches: 1.6.2; 1.6.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.5 07-Jun-1999  is branches: 1.5.2; 1.5.14;
Check for an unterminated bus; if yes: complain and don't try to use this
bus. Without this, cbiiisc used to hang if nothing was connected.
Reported by Matthias Scheler. A similar method to avoid this was suggested
by Ralph Schmidt.
 1.4 06-Jun-1999  is Don't dump all the registers at attach time. It works now.
 1.3 26-Mar-1999  mhitch branches: 1.3.2; 1.3.4; 1.3.6;
More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.2 09-Mar-1999  is The SCSI clock is 50 MHz for this board.
 1.1 07-Mar-1999  is Added very preliminary version of Symbios 53c7[27]0c driver and Cyberstorm
Mk. III SCSI backend, by Michael Hitch.
XXX No wide transfers supported at the moment.
 1.3.6.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.3.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.1 22-Jun-1999  perry pullup 1.4->1.5 (is): disable adapter if completely unterminated
 1.5.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.3 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.5.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.1 25-Apr-2001  nathanw file cbiiisc.c was added on branch nathanw_sa on 2002-02-28 04:06:34 +0000
 1.6.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.16.1 21-Jun-2006  yamt sync with head.
 1.14.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.14.8.1 13-Mar-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.72.1 18-Jun-2008  simonb Sync with head.
 1.15.70.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.15.68.2 11-Mar-2010  yamt sync with head
 1.15.68.1 04-May-2009  yamt sync with head.
 1.15.66.1 17-Jun-2008  yamt sync with head.
 1.15.64.2 17-Jan-2009  mjf Sync with HEAD.
 1.15.64.1 29-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.19.12.1 18-Feb-2012  mrg merge to -current.
 1.19.8.2 30-Oct-2012  yamt sync with head
 1.19.8.1 17-Apr-2012  yamt sync with head
 1.20.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.21.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.21.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.21.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.22.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.34 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.33 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.32 20-Dec-2010  matt branches: 1.32.58; 1.32.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.31 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.30 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.29 23-Nov-2009  rmind branches: 1.29.2; 1.29.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.28 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.27 13-Apr-2008  tsutsui branches: 1.27.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.26 17-Oct-2007  garbled branches: 1.26.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.25 20-Aug-2007  is branches: 1.25.2;
First part of amigappc support patches by Frank Wille.
 1.24 11-Mar-2007  he branches: 1.24.8; 1.24.12; 1.24.16;
Correct a thinko of mine in the previous change, pointed out by
is@. Even though the argument type changes as an effect of the
caddr_t removal, there really is no need to indirect where we didn't
before. Instead, add the appropriate cast.
 1.23 05-Mar-2007  he branches: 1.23.2;
Fix one missing indirection causing a type conflict, and use char* for
pointer arithmetic.
 1.22 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 29-Mar-2006  thorpej branches: 1.21.14;
Use device_cfdata().
 1.20 08-Mar-2006  lukem branches: 1.20.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.19 11-Dec-2005  christos branches: 1.19.4; 1.19.6; 1.19.8; 1.19.10;
merge ktrace-lwp.
 1.18 13-Jun-2005  jmc branches: 1.18.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.17 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.16 01-Apr-2003  thorpej branches: 1.16.2;
Use PAGE_SIZE rather than NBPG.
 1.15 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.12 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.11 25-Apr-2001  bouyer branches: 1.11.2; 1.11.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.10 05-Jun-2000  tsutsui branches: 1.10.4;
Adapt MI ncr53c9x changes.
 1.9 30-Sep-1999  thorpej branches: 1.9.2; 1.9.10;
Update for SCSIPI changes.
 1.8 25-Sep-1999  is vm_offset_t -> vaddr_t/paddr_t
 1.7 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.6 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.5 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.4 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.3 12-Jan-1998  thorpej Adjust for changes to config.
 1.2 24-Oct-1997  mhitch Check manufacturer and product codes correctly. The Blizzard 2060 driver
was trying to configure on a Cyberstorm MKI SCSI.
 1.1 04-Oct-1997  mhitch branches: 1.1.2; 1.1.4;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.1.4.1 24-Oct-1997  mellon Pull rev 1.2 up from trunk
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 04-Oct-1997  thorpej file cbiisc.c was added on branch marc-pcmcia on 1997-10-14 08:26:22 +0000
 1.9.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.10.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.11.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.11.8.1 25-Apr-2001  nathanw file cbiisc.c was added on branch nathanw_sa on 2002-02-28 04:06:34 +0000
 1.11.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.16.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.18.2.2 03-Sep-2007  yamt sync with head.
 1.18.2.1 21-Jun-2006  yamt sync with head.
 1.19.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.19.8.2 01-Apr-2006  yamt sync with head.
 1.19.8.1 13-Mar-2006  yamt sync with head.
 1.19.6.1 22-Apr-2006  simonb Sync with head.
 1.19.4.1 09-Sep-2006  rpaulo sync with head
 1.20.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.21.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.2.2 09-Oct-2007  ad Sync with head.
 1.23.2.1 13-Mar-2007  ad Sync with head.
 1.24.16.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.24.12.1 03-Sep-2007  skrll Sync with HEAD.
 1.24.8.1 03-Oct-2007  garbled Sync with HEAD
 1.25.2.1 06-Nov-2007  matt sync with HEAD
 1.26.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.4.2 11-Aug-2010  yamt sync with head.
 1.27.4.1 11-Mar-2010  yamt sync with head
 1.29.4.2 05-Mar-2011  rmind sync with head
 1.29.4.1 03-Jul-2010  rmind sync with head
 1.29.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.29.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.32.60.1 10-Jun-2019  christos Sync with HEAD
 1.32.58.2 18-Jan-2019  pgoyette Synch with HEAD
 1.32.58.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.3 13-Apr-2008  tsutsui branches: 1.3.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.2 25-Sep-1999  is branches: 1.2.138;
vm_offset_t -> vaddr_t/paddr_t
 1.1 04-Oct-1997  mhitch branches: 1.1.2;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 04-Oct-1997  thorpej file cbiiscvar.h was added on branch marc-pcmcia on 1997-10-14 08:26:24 +0000
 1.2.138.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.4.1 11-Mar-2010  yamt sync with head
 1.35 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.34 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.33 20-Dec-2010  matt branches: 1.33.58; 1.33.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.32 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.31 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.30 23-Nov-2009  rmind branches: 1.30.2; 1.30.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.29 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.28 13-Apr-2008  tsutsui branches: 1.28.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.27 17-Oct-2007  garbled branches: 1.27.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.26 20-Aug-2007  is branches: 1.26.2;
First part of amigappc support patches by Frank Wille.
 1.25 11-Mar-2007  he branches: 1.25.8; 1.25.12; 1.25.16;
Correct a thinko of mine in the previous change, pointed out by
is@. Even though the argument type changes as an effect of the
caddr_t removal, there really is no need to indirect where we didn't
before. Instead, add the appropriate cast.
 1.24 05-Mar-2007  he branches: 1.24.2;
Fix one missing indirection causing a type conflict, and use char* for
pointer arithmetic.
 1.23 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 29-Mar-2006  thorpej branches: 1.22.14;
Use device_cfdata().
 1.21 08-Mar-2006  lukem branches: 1.21.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.20 11-Dec-2005  christos branches: 1.20.4; 1.20.6; 1.20.8; 1.20.10;
merge ktrace-lwp.
 1.19 13-Jun-2005  jmc branches: 1.19.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.18 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.17 01-Apr-2003  thorpej branches: 1.17.2;
Use PAGE_SIZE rather than NBPG.
 1.16 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.15 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.14 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.13 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.12 25-Apr-2001  bouyer branches: 1.12.2; 1.12.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.11 05-Jun-2000  tsutsui branches: 1.11.4;
Adapt MI ncr53c9x changes.
 1.10 30-Sep-1999  thorpej branches: 1.10.2; 1.10.10;
Update for SCSIPI changes.
 1.9 25-Sep-1999  is vm_offset_t -> vaddr_t/paddr_t
 1.8 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.7 14-Nov-1998  mhitch Some CyberStorm MK I SCSI modules use the same product ID as the Fastlane.
Add a check for that product ID and not a Zorro III address.
 1.6 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.5 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.4 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.3 12-Jan-1998  thorpej Adjust for changes to config.
 1.2 24-Oct-1997  mhitch Check manufacturer and product codes correctly. The Blizzard 2060 driver
was trying to configure on a Cyberstorm MKI SCSI.
 1.1 04-Oct-1997  mhitch branches: 1.1.2; 1.1.4;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.1.4.2 22-Nov-1998  cgd pull up rev 1.7 from trunk (mhitch)
 1.1.4.1 24-Oct-1997  mellon Pull rev 1.2 up from trunk
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 04-Oct-1997  thorpej file cbsc.c was added on branch marc-pcmcia on 1997-10-14 08:26:25 +0000
 1.10.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.11.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.12.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.12.8.1 25-Apr-2001  nathanw file cbsc.c was added on branch nathanw_sa on 2002-02-28 04:06:34 +0000
 1.12.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.12.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.17.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.2.2 03-Sep-2007  yamt sync with head.
 1.19.2.1 21-Jun-2006  yamt sync with head.
 1.20.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.20.8.2 01-Apr-2006  yamt sync with head.
 1.20.8.1 13-Mar-2006  yamt sync with head.
 1.20.6.1 22-Apr-2006  simonb Sync with head.
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.21.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.22.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.24.2.2 09-Oct-2007  ad Sync with head.
 1.24.2.1 13-Mar-2007  ad Sync with head.
 1.25.16.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.25.12.1 03-Sep-2007  skrll Sync with HEAD.
 1.25.8.1 03-Oct-2007  garbled Sync with HEAD
 1.26.2.1 06-Nov-2007  matt sync with HEAD
 1.27.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.4.2 11-Aug-2010  yamt sync with head.
 1.28.4.1 11-Mar-2010  yamt sync with head
 1.30.4.2 05-Mar-2011  rmind sync with head
 1.30.4.1 03-Jul-2010  rmind sync with head
 1.30.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.30.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.33.60.1 10-Jun-2019  christos Sync with HEAD
 1.33.58.2 18-Jan-2019  pgoyette Synch with HEAD
 1.33.58.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.3 13-Apr-2008  tsutsui branches: 1.3.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.2 25-Sep-1999  is branches: 1.2.138;
vm_offset_t -> vaddr_t/paddr_t
 1.1 04-Oct-1997  mhitch branches: 1.1.2;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 04-Oct-1997  thorpej file cbscvar.h was added on branch marc-pcmcia on 1997-10-14 08:26:27 +0000
 1.2.138.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.4.1 11-Mar-2010  yamt sync with head
 1.59 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.58 03-Jul-2020  maxv hardclock_ticks -> getticks()
 1.57 29-May-2020  rin For clk_timecounter:
- Use C99 initializer.
- Leave .tc_name NULL initially.
No functional changes.
 1.56 19-May-2020  rin Round amiga_clk_interval to the nearest integer, in order to emulate
100 Hz clock better by that running at PAL frequency (709379 Hz).

No functional changes for systems running at NTSC freq (715909 Hz).
 1.55 12-Nov-2015  phx Use the MD_BTOP() macro as replacement for m68k_btop() in all device
drivers which are shared with amigappc.
 1.54 27-Oct-2012  chs branches: 1.54.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.53 03-Jun-2011  matt branches: 1.53.2; 1.53.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.52 08-Feb-2011  rmind branches: 1.52.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.51 12-Dec-2009  phx branches: 1.51.4; 1.51.6; 1.51.8;
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.50 11-Sep-2009  phx Handle the situation of a wrapped interval counter, while the hardclock()
interrupt was not yet executed to update the hardclock_ticks variable.
 1.49 11-Sep-2009  phx Reverted last change after discussion with the author, Michael L. Hitch:
http://mail-index.netbsd.org/port-amiga/2009/08/14/msg007164.html
We have a full 32-bit counter, so the masking is not needed.
 1.48 07-Dec-2008  mhitch Fix timecounters using interval timers: amiga counters are not 32 bits,
so the tc_counter_mask needs to be set based on the interval timer.
Process cpu usage was returning negative or very large values.
 1.47 06-Jan-2008  mhitch branches: 1.47.6; 1.47.10; 1.47.16; 1.47.18; 1.47.20;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.46 04-Mar-2007  christos branches: 1.46.20; 1.46.26; 1.46.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.45 05-Sep-2006  mhitch branches: 1.45.8;
Switch amiga to MI todr.
 1.44 11-Dec-2005  christos branches: 1.44.4; 1.44.8;
merge ktrace-lwp.
 1.43 13-Jun-2005  jmc branches: 1.43.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.42 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.41 02-Oct-2002  thorpej branches: 1.41.6;
Use CFATTACH_DECL().
 1.40 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.39 14-May-2002  matt Eliminate commons. (including a few unused or mismatched ones).
 1.38 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.37 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.36 15-Mar-2001  chs branches: 1.36.2; 1.36.8;
eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.35 29-Jun-2000  mrg branches: 1.35.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.34 14-Mar-1999  is branches: 1.34.8;
Use the 1/256s-resolution when reading the DraCo battery backed clock
 1.33 26-Jul-1998  is yet more atomic operations accessing DraCo registers
 1.32 12-Jan-1998  thorpej Adjust for changes to config.
 1.31 15-Sep-1997  is Only create verbose delay loop calibration message for DIAGNOSTIC kernels.
 1.30 19-Jul-1997  is branches: 1.30.2;
Make Amiga battery clocks autoconfiguration devices, so that they can be
left out of specialized configurations.
 1.29 17-Jul-1997  is Make the DraCo hardware clock an autoconfiguration device.
 1.28 06-Jul-1997  is Implement the RTC_OFFSET kernel option/rtc_offset variable for the Amiga port.
To get the old behaviour, set options RTC_OFFSET=0 in your kernel configuration
file.
 1.27 06-Jul-1997  is A first hack at DraCo real-time clock support; only reads clock, currently.
Also only whole seconds are used (while the hardware provides 1/256 seconds).
 1.26 25-May-1997  veego Converted for the use of sys/dev/clock_subr.[ch].
Add some comments about the a2000 oki clock chip and stop the clock while
writing.
 1.25 02-Jan-1997  is Use the right parameter to decide whether it's early configuration. (I wonder
why this worked with some configurations... it shouldn't have).

While we're here, correct the 2.4% error in the delay divisor message.
 1.24 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.23 17-Dec-1996  is Make clock an early configuration device, configured before early console
configuration. This way, the delay loop is calibrated before graphics and
serial hardware is touched.

This change should smooth pr 2890 by Thorsten Frueauf (also privately
reported by Laurent Badoukh). While the real problem with those is the
paranoically high delay() calls in the grf_cl initialization, it was made
even more visible by the miscalibrated (to the save side) new style delay
loop.
 1.22 14-Oct-1996  is KNF patrol.
 1.21 13-Oct-1996  christos backout previous kprintf change
 1.20 11-Oct-1996  mhitch Fix compile errors when not configured for the Draco.
 1.19 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.18 29-Sep-1996  is a) replace our delay() with a Gordon Ross style one, calibrated at
clock_attach() time (for now).
This removes our dependance on the DraCo ROM access timing and frees
the second CIA on Amigas.
b) support for DraCo rev. >= 4 native timer chips.
 1.17 20-Jun-1996  is Use the right microsecond delay address. To achieve this, also map that
piece of hardware into kernel virtual memory (was only a guess 'til now).
XXX Unfortunately, the hardware vendor reserves the right to change this in
future DraCo revisions. We must rethink delay() and DELAY(), at least for the
DraCo, soon.
 1.16 18-Jun-1996  is Don't use the inline assembler 64bit integer division if our kernel might
run on 68060. Some graphics boards need delay() in early initialization (that
is, before initcpu() was called.
 1.15 10-May-1996  is branches: 1.15.4;
Clean up the mess I left over from my yestereve's commit: partially unused
variables left over from color background debugging, partially wrong #ifdefs
making some variables unused in non-M68060 kernels.
 1.14 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.13 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.12 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.11 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.10 20-Feb-1995  chopps rtc now reads and writes erbe0011@FH-Karlsruhe.DE (Bernd Ernesti)
 1.9 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.8 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 16-Jun-1994  chopps fix boot diag output.
 1.4 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.3 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 09-May-1994  chopps update for recent sig changes and fix clock.c and ite.c
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.15.4.2 21-Jun-1996  jtc Pulled up from version 1.17 by request from ignatios.

"use correct rather than guessed microsecond delay address in
delay() and DELAY() on the DraCo".,
 1.15.4.1 18-Jun-1996  is From trunk, to avoid kernel panics during initialization:
Don't use inline assembler 64bit division if we might run on 68060.
Some graphics drivers need deley during early console initialization (that
is, before initcpu() has installed the emulation software).
 1.30.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.34.8.2 27-Mar-2001  bouyer Sync with HEAD.
 1.34.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.35.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.36.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.36.8.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.36.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.36.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.36.8.2 17-Nov-2001  scw curproc now points to a struct lwp.
 1.36.8.1 15-Mar-2001  scw file clock.c was added on branch nathanw_sa on 2001-11-17 23:08:32 +0000
 1.36.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.36.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.36.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.41.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.41.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.41.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.41.6.1 03-Aug-2004  skrll Sync with HEAD
 1.43.2.3 21-Jan-2008  yamt sync with head
 1.43.2.2 03-Sep-2007  yamt sync with head.
 1.43.2.1 30-Dec-2006  yamt sync with head.
 1.44.8.1 14-Sep-2006  yamt sync with head.
 1.44.4.1 09-Sep-2006  rpaulo sync with head
 1.45.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.46.32.1 08-Jan-2008  bouyer Sync with HEAD
 1.46.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.46.20.1 09-Jan-2008  matt sync with HEAD
 1.47.20.4 16-Jul-2010  riz Pull up following revision(s) (requested by phx in ticket #1412):
sys/arch/amiga/dev/clock.c: revision 1.51
sys/arch/amiga/amiga/locore.s: revision 1.149 via patch
sys/arch/amiga/dev/kbd.c: revision 1.53
sys/arch/amiga/amiga/amiga_init.c: revision 1.118
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.47.20.3 03-Oct-2009  snj Pull up following revision(s) (requested by mhitch in ticket #1049):
sys/arch/amiga/dev/clock.c: revision 1.49
Reverted last change after discussion with the author, Michael L. Hitch:
http://mail-index.netbsd.org/port-amiga/2009/08/14/msg007164.html
We have a full 32-bit counter, so the masking is not needed.
 1.47.20.2 26-Sep-2009  snj Pull up following revision(s) (requested by phx in ticket #1011):
sys/arch/amiga/dev/clock.c: revision 1.50
Handle the situation of a wrapped interval counter, while the hardclock()
interrupt was not yet executed to update the hardclock_ticks variable.
 1.47.20.1 10-Dec-2008  snj branches: 1.47.20.1.4;
Pull up following revision(s) (requested by mhitch in ticket #172):
sys/arch/amiga/dev/clock.c: revision 1.48
Fix timecounters using interval timers: amiga counters are not 32 bits,
so the tc_counter_mask needs to be set based on the interval timer.
Process cpu usage was returning negative or very large values.
 1.47.20.1.4.1 21-Apr-2010  matt sync to netbsd-5
 1.47.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.47.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.47.10.3 11-Mar-2010  yamt sync with head
 1.47.10.2 16-Sep-2009  yamt sync with head
 1.47.10.1 04-May-2009  yamt sync with head.
 1.47.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.51.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.51.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.51.4.2 12-Jun-2011  rmind sync with head
 1.51.4.1 05-Mar-2011  rmind sync with head
 1.52.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.53.12.2 03-Dec-2017  jdolecek update from HEAD
 1.53.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.53.2.1 30-Oct-2012  yamt sync with head
 1.54.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6 07-Sep-2015  dholland Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.5 08-Feb-2011  rmind branches: 1.5.14; 1.5.32;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.4 11-Dec-2005  christos branches: 1.4.100; 1.4.106; 1.4.108;
merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 26-Oct-1994  cgd branches: 1.2.66;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.66.1 03-Aug-2004  skrll Sync with HEAD
 1.4.108.1 17-Feb-2011  bouyer Sync with HEAD
 1.4.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.100.1 05-Mar-2011  rmind sync with head
 1.5.32.1 22-Sep-2015  skrll Sync with HEAD
 1.5.14.1 03-Dec-2017  jdolecek update from HEAD
 1.31 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.30 19-Jul-2011  dyoung branches: 1.30.52; 1.30.54;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.29 22-Jan-2011  tsutsui Adjust sc_frequency in MD attachment as quirks.
It is not applicable to all 1665x variants.

XXX: It looks IOBlix board actually has 22.1184MHz OSC without clock divisor
http://amiga.resource.cx/photos/gallery/ioblix.jpg
so needs to investigate why we have to divide sc_frequency by four
to get right baud rate on IOBlix com. (firmware sets MCR_PRESCALE?)
 1.28 02-Feb-2010  phx branches: 1.28.4; 1.28.6; 1.28.8;
Fix compilation warnings and errors with amigappc.
 1.27 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.26 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.25 14-Mar-2008  cube branches: 1.25.2; 1.25.4;
Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.24 04-Mar-2008  he Fix reference to sc_dev so that this builds again.
 1.23 29-Feb-2008  dyoung Use pmf_device_register1() instead of shutdownhook_establish() to
register com_cleanup() as the shutdown hook.

Add a generic suspend routine. Suspend and resume com@isa.

Protect against dereferencing a NULL softc in comioctl().

Destroy both a mutex and a callout in com_detach().

Cosmetic: use aprint_*_dev(). Use PMF_FN_ARGS, PMF_FN_PROTO.
 1.22 21-Dec-2006  yamt branches: 1.22.24; 1.22.40; 1.22.44;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.21 13-Jul-2006  gdamore branches: 1.21.4; 1.21.6;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.20 11-Dec-2005  christos branches: 1.20.4; 1.20.8; 1.20.16;
merge ktrace-lwp.
 1.19 07-Aug-2003  agc branches: 1.19.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.18 06-Jan-2003  wiz branches: 1.18.2;
interrupt with two rs.
 1.17 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.14 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.13 22-Jun-1999  is branches: 1.13.16; 1.13.20;
Align adresses better
 1.12 16-Sep-1998  is branches: 1.12.8;
Garbage collect unused 3rd parameter to comprobe1().
 1.11 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.10 10-Aug-1998  is Fix ommision in last backout.
 1.9 10-Aug-1998  is Back out last change --- it doesn't work this way
 1.8 09-Aug-1998  is Actually probe the hardware.
This is for HyperCom 3i slaveboards (to be done soon) that might or might not
sit on top of a HyperCom 3Z or HyperCom 4 or ISDN Blaster.
 1.7 11-Apr-1998  is amiga_ttyspl -> amiga_serialspl (and keep ttyspl constant at 4 again).
(Part of this change slipped in with my last machdep commit; thanks to
Matthias Scheler for pointing this out).
 1.6 10-Nov-1997  is Remove remnants from ISA com console attachment code, which caused, due
to missing variable initialization, a panic on the DraCo.
 1.5 16-Oct-1997  thorpej branches: 1.5.2;
Adjust for new home of "com" driver.
 1.4 16-Sep-1997  is Support for the upcoming NetBSD/Amiga Hypercom driver family:
* support chip clocks != COM_FREQ, by introducing sc_frequency (for the
mainline code) and adding a frequency parameter right after the rate
parameter to comcnattach() and com_kgdb_attach().
- Make com_isa and com_multi initialize sc_frequency to COM_FREQ.
- Make i386/machdep.c and alpha/dec_xxx.c call com*attach() with the freq.
parameter.
* supio_attach_args get two more fields: a sc_ipl and a sc_arg, both ints.
- com_supio uses the first for interupt establishment (all childs will, as
soon as they exist) and the 2nd for sc_frequency.
- drsupio passes sc_ipl alway as 5, and for the "com"s, sc_arg as 16*115200
- hyper will pass sc_ipl as 6, and sc_arg as 16 * 460800
 1.3 27-Aug-1997  is branches: 1.3.2;
Yet another BROKEN removed, and another small cleanup.
 1.2 27-Aug-1997  is Rename the _probe function to _match, and remove the
#ifdef _BROKEN_INDIRECT_CONFIG which we dont need here.
Thanks to Bernd Ernesti for pointing this out.
 1.1 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.3.2.4 16-Oct-1997  thorpej Sync w/ trunk.
 1.3.2.3 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.2.1 27-Aug-1997  thorpej file com_supio.c was added on branch marc-pcmcia on 1997-09-01 20:06:37 +0000
 1.5.2.1 12-Nov-1997  mellon Pull rev 1.6 up from trunk (is)
 1.12.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.13.20.3 07-Jan-2003  thorpej Sync with HEAD.
 1.13.20.2 18-Oct-2002  nathanw Catch up to -current.
 1.13.20.1 28-Feb-2002  nathanw Catch up to -current.
 1.13.16.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.16.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.18.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.16.2 17-Mar-2008  yamt sync with head.
 1.19.16.1 30-Dec-2006  yamt sync with head.
 1.20.16.5 13-Jul-2006  gdamore Merge from HEAD.
 1.20.16.4 17-Jun-2006  gdamore Well, tweak this some more, we are returning COM_INIT_REGS, because it
just doesn't work to have a #define for sc_iot and company. Ugh.
 1.20.16.3 17-Jun-2006  gdamore Undo COM_INIT_REGS.
 1.20.16.2 16-Jun-2006  gdamore Attempt at KNF cleanup. Not tested since m68k tools don't work for cross
building from Solaris.
 1.20.16.1 16-Jun-2006  gdamore amiga com(4) rewhack. i can't cross-compile this from Solaris due to

sh /home/garrett/netbsd/src/sys/arch/m68k/fpsp/asm2gas /home/garrett/netbsd/src
/sys/arch/m68k/fpsp/fpsp.h >fpsp.defs
sed: # format canonicalization is an unrecognized command.
sed: # operator conversion is an unrecognized command.
sed: # operand conversion is an unrecognized command.
sed: # Floating point literal conversion is an unrecognized command.

so I am not entirely sure it even compiles. YMMV.
 1.20.8.1 11-Aug-2006  yamt sync with head
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.21.6.1 29-Sep-2006  yamt implement splraiseipl/makeiplcookie for amiga.
 1.21.4.1 12-Jan-2007  ad Sync with head.
 1.22.44.2 02-Jun-2008  mjf Sync with HEAD.
 1.22.44.1 03-Apr-2008  mjf Sync with HEAD.
 1.22.40.1 24-Mar-2008  keiichi sync with head.
 1.22.24.1 23-Mar-2008  matt sync with HEAD
 1.25.4.2 11-Mar-2010  yamt sync with head
 1.25.4.1 16-May-2008  yamt sync with head.
 1.25.2.1 18-May-2008  yamt sync with head.
 1.28.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.28.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.28.4.1 05-Mar-2011  rmind sync with head
 1.30.54.1 10-Jun-2019  christos Sync with HEAD
 1.30.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3 08-May-1994  mycroft Clean up deleted files.
 1.2 25-Mar-1994  chopps move HIST out of DEBUG conditional.
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.14 30-May-2010  dholland another undead file
 1.13 04-Mar-2007  christos branches: 1.13.2; 1.13.6; 1.13.34; 1.13.44; 1.13.46; 1.13.48; 1.13.50;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12 14-May-2006  elad branches: 1.12.8;
integrate kauth.
 1.11 05-Apr-1994  chopps branches: 1.11.10; 1.11.12; 1.11.28; 1.11.34; 1.11.44; 1.11.48; 1.11.50;
added floppy driver from Brad Pepers, doesn't work on my machine, some
major cleanup by me no code changes ... yet.
 1.10 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.9 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.8 21-Feb-1994  chopps fixed a couple minor bugs in con code for ite. added floptical support in
sd.c (based on patch from Andreas E. Heitman).
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11.50.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.11.48.1 14-Sep-2006  yamt sync with head.
 1.11.44.1 09-Sep-2006  rpaulo sync with head
 1.11.34.1 03-Sep-2007  yamt sync with head.
 1.11.28.1 03-Aug-2004  skrll Sync with HEAD
 1.11.12.1 01-Oct-2001  fvdl Catch up with -current.
 1.11.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.50.1 30-May-2010  rmind sync with head
 1.13.48.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.13.46.1 24-Oct-2010  jym Sync with HEAD
 1.13.44.3 28-Apr-2009  skrll Sync with HEAD.
 1.13.44.2 19-Jan-2009  skrll Sync with HEAD.
 1.13.44.1 04-Mar-2007  skrll file device.h was added on branch nick-hppapmap on 2009-01-19 13:15:55 +0000
 1.13.34.1 11-Aug-2010  yamt sync with head.
 1.13.6.2 11-Jul-2007  mjf Sync with head.
 1.13.6.1 04-Mar-2007  mjf file device.h was added on branch mjf-ufs-trans on 2007-07-11 19:57:49 +0000
 1.13.2.2 09-Oct-2007  ad Sync with head.
 1.13.2.1 09-Jun-2007  ad Sync with head.
 1.3 30-Oct-1993  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 30-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.3 30-Oct-1993  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 28-Mar-1995  jtc branches: 1.9.66;
KERNEL -> _KERNEL
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.9.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.66.1 03-Aug-2004  skrll Sync with HEAD
 1.22 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux.
Nothing was using the old field, but I decided to keep it around just
in cause something needs it in the future.

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.21 07-Sep-2025  thorpej Keep the todr handle in the softc. Eliminate the global softc pointer; it's
not required.
 1.20 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19 20-Dec-2010  matt branches: 1.19.8; 1.19.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.18 12-Dec-2009  tsutsui branches: 1.18.4;
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
 1.17 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.16 07-Sep-2006  mhitch branches: 1.16.54; 1.16.56; 1.16.58;
Correct some error returns for gettod() and settod() left over from the
pre-todr code, and use actual E* return codes for any error return.
 1.15 05-Sep-2006  mhitch branches: 1.15.2;
Switch amiga to MI todr.
 1.14 20-Jun-2006  is Fix typo in comment
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.8; 1.13.16;
merge ktrace-lwp.
 1.12 13-Jun-2005  jmc branches: 1.12.2;
Fix some shadowing of variables
 1.11 01-Apr-2003  thorpej branches: 1.11.2;
Use PAGE_SIZE rather than NBPG.
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 16-Mar-2000  kleink branches: 1.6.8; 1.6.12;
Kill more broken cf_unit bogons.
 1.5 14-Mar-1999  is branches: 1.5.8;
Use the 1/256s-resolution when reading the DraCo battery backed clock
 1.4 16-Feb-1999  is Fix Copyright dates
 1.3 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.2 12-Jan-1998  thorpej Adjust for changes to config.
 1.1 17-Jul-1997  is Make the DraCo hardware clock an autoconfiguration device.
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.13.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.13.8.2 14-Sep-2006  yamt sync with head.
 1.13.8.1 26-Jun-2006  yamt sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.15.2.1 18-Nov-2006  ad Sync with head.
 1.16.58.2 11-Mar-2010  yamt sync with head
 1.16.58.1 16-May-2008  yamt sync with head.
 1.16.56.1 18-May-2008  yamt sync with head.
 1.16.54.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.19.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.8.1 30-Oct-2012  yamt sync with head
 1.3 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.2 23-Dec-1996  veego branches: 1.2.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.1 30-Nov-1996  is com.c variant for the 16550 core on the DraCo superio chip.
drisavar.h pretends to provide a few bus.h macros, hardwired to
that chip.

This should eventually be replaced by attachment code for the normal
com.c driver, once that one is split up into chip core driver and
attachment code, and once we have busxxx macros in NetBSD/Amiga.
 1.2.10.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.1 30-Nov-1996  is branches: 1.1.10;
com.c variant for the 16550 core on the DraCo superio chip.
drisavar.h pretends to provide a few bus.h macros, hardwired to
that chip.

This should eventually be replaced by attachment code for the normal
com.c driver, once that one is split up into chip core driver and
attachment code, and once we have busxxx macros in NetBSD/Amiga.
 1.1.10.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2 27-Aug-1997  is Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.1 30-Nov-1996  is branches: 1.1.10;
com.c variant for the 16550 core on the DraCo superio chip.
drisavar.h pretends to provide a few bus.h macros, hardwired to
that chip.

This should eventually be replaced by attachment code for the normal
com.c driver, once that one is split up into chip core driver and
attachment code, and once we have busxxx macros in NetBSD/Amiga.
 1.1.10.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2 27-Aug-1997  is This is no longer needed.
 1.1 30-Nov-1996  is branches: 1.1.10;
com.c variant for the 16550 core on the DraCo superio chip.
drisavar.h pretends to provide a few bus.h macros, hardwired to
that chip.

This should eventually be replaced by attachment code for the normal
com.c driver, once that one is split up into chip core driver and
attachment code, and once we have busxxx macros in NetBSD/Amiga.
 1.1.10.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.33 22-Mar-2014  christos branches: 1.33.10; 1.33.20; 1.33.44;
kill sprintf
fix unused variables
 1.32 27-Oct-2012  chs branches: 1.32.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 20-Dec-2010  matt branches: 1.31.8; 1.31.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.30 19-May-2009  phx branches: 1.30.4;
Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.29 13-Jun-2008  cegger use device_lookup_private to get softc
 1.28 11-Dec-2005  christos branches: 1.28.74; 1.28.76; 1.28.78; 1.28.80; 1.28.82;
merge ktrace-lwp.
 1.27 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.26 25-Mar-2004  is Only change my own license conditions.
 1.25 25-Mar-2004  is UCB no longer requires the advertising clause.
 1.24 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.23 01-Apr-2003  thorpej branches: 1.23.2;
Use PAGE_SIZE rather than NBPG.
 1.22 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.19 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.18 25-Apr-2001  bouyer branches: 1.18.2; 1.18.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.17 16-Mar-2000  kleink branches: 1.17.6;
Kill more broken cf_unit bogons.
 1.16 16-Jan-2000  is Yet another cpu.h.
 1.15 05-Dec-1998  mjacob branches: 1.15.10;
Update HBAs to incorporate the new max_lun property.
 1.14 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.13 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.12 26-Jul-1998  is yet more atomic operations accessing DraCo registers
 1.11 12-Jan-1998  thorpej Adjust for changes to config.
 1.10 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.9 23-Dec-1996  veego branches: 1.9.8; 1.9.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.8 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.7 30-Nov-1996  is Make sure autoconfiguration is searching for _us_. There is more than
one DraCo specific device on the DraCo mainbus.
 1.6 13-Oct-1996  christos backout previous kprintf change
 1.5 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.4 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.3 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.2 19-May-1996  is Yet some more cleanup for missing prototypes, if DRACO is supported.
 1.1 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.9.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.9.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.15.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.17.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.18.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.18.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.18.8.1 25-Apr-2001  nathanw file drsc.c was added on branch nathanw_sa on 2002-02-28 04:06:35 +0000
 1.18.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.23.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.23.2.1 03-Aug-2004  skrll Sync with HEAD
 1.28.82.1 18-Jun-2008  simonb Sync with head.
 1.28.80.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.28.78.2 20-Jun-2009  yamt sync with head
 1.28.78.1 04-May-2009  yamt sync with head.
 1.28.76.1 17-Jun-2008  yamt sync with head.
 1.28.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.30.4.1 05-Mar-2011  rmind sync with head
 1.31.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.31.8.1 30-Oct-2012  yamt sync with head
 1.32.2.1 18-May-2014  rmind sync with head
 1.33.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.33.20.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.33.10.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.33.10.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.34.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.21 27-Oct-2012  chs branches: 1.21.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.20 19-Jul-2011  dyoung branches: 1.20.2; 1.20.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.19 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.18 28-Apr-2008  martin branches: 1.18.22;
Remove clause 3 and 4 from TNF licenses
 1.17 11-Dec-2005  christos branches: 1.17.74; 1.17.76; 1.17.78;
merge ktrace-lwp.
 1.16 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.15 01-Apr-2003  thorpej branches: 1.15.2;
Use PAGE_SIZE rather than NBPG.
 1.14 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.13 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.10 28-Jan-2002  aymeric branches: 1.10.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.9 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.8 16-Mar-2000  kleink branches: 1.8.8; 1.8.12;
Kill more broken cf_unit bogons.
 1.7 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.6 16-Feb-1999  is branches: 1.6.8;
Fix Copyright dates
 1.5 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.4 12-Jan-1998  thorpej Adjust for changes to config.
 1.3 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.2 16-Sep-1997  is Support for the upcoming NetBSD/Amiga Hypercom driver family:
* support chip clocks != COM_FREQ, by introducing sc_frequency (for the
mainline code) and adding a frequency parameter right after the rate
parameter to comcnattach() and com_kgdb_attach().
- Make com_isa and com_multi initialize sc_frequency to COM_FREQ.
- Make i386/machdep.c and alpha/dec_xxx.c call com*attach() with the freq.
parameter.
* supio_attach_args get two more fields: a sc_ipl and a sc_arg, both ints.
- com_supio uses the first for interupt establishment (all childs will, as
soon as they exist) and the 2nd for sc_frequency.
- drsupio passes sc_ipl alway as 5, and for the "com"s, sc_arg as 16*115200
- hyper will pass sc_ipl as 6, and sc_arg as 16 * 460800
 1.1 27-Aug-1997  is branches: 1.1.2;
Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.1.2.4 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.3 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Aug-1997  thorpej file drsupio.c was added on branch marc-pcmcia on 1997-09-01 20:06:41 +0000
 1.6.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.8.12.4 03-Jan-2003  thorpej Sync with HEAD.
 1.8.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.8.12.2 17-Sep-2002  nathanw Catch up to -current.
 1.8.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.8.1 16-May-2002  gehenna Include sys/conf.h directly.
 1.15.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.78.1 16-May-2008  yamt sync with head.
 1.17.76.1 18-May-2008  yamt sync with head.
 1.17.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.22.1 05-Mar-2011  rmind sync with head
 1.20.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.20.2.1 30-Oct-2012  yamt sync with head
 1.21.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.17 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.16 06-May-2023  andvar s/regster/register/ in comments and error messages.
 1.15 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.14 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.13 04-Sep-2017  phx Remove double device pointers. The pointer is already part of sc_wdcdev.
 1.12 03-Jan-2014  rkujawa branches: 1.12.18;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.11 31-Jul-2012  bouyer branches: 1.11.2; 1.11.4;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.10 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.9 24-Jul-2012  jakllsch Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.
 1.8 15-Jul-2012  dsl Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.
 1.7 09-Jul-2012  rkujawa PR port-amiga/46672

Removed surpluss semicolon after if().
 1.6 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.5 05-Nov-2011  rkujawa Simplify bus space mapping.
 1.4 30-Oct-2011  rkujawa branches: 1.4.2;
Improve probe procedure in efa(4). Update man apge to reflect this.
 1.3 29-Oct-2011  rkujawa Allow 32-bit transfers for drives which support it. Add missing bus_space methods needed for such transfers.
 1.2 29-Oct-2011  rkujawa Fix style (pointed out by phx).
 1.1 27-Oct-2011  rkujawa Add driver for ELBOX FastATA 1200 Mk-III/Mk-IV (and the man page).
 1.4.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.2 30-Oct-2012  yamt sync with head
 1.4.2.1 10-Nov-2011  yamt sync with head
 1.11.4.1 18-May-2014  rmind sync with head
 1.11.2.2 03-Dec-2017  jdolecek update from HEAD
 1.11.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.18.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.12.18.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.3 03-Jan-2014  rkujawa Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.2 29-Oct-2011  rkujawa branches: 1.2.2; 1.2.12; 1.2.16;
Fix style (pointed out by phx).
 1.1 27-Oct-2011  rkujawa Add driver for ELBOX FastATA 1200 Mk-III/Mk-IV (and the man page).
 1.2.16.1 18-May-2014  rmind sync with head
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.2 04-Sep-2017  phx Remove double device pointers. The pointer is already part of sc_wdcdev.
 1.1 27-Oct-2011  rkujawa branches: 1.1.12; 1.1.42;
Add driver for ELBOX FastATA 1200 Mk-III/Mk-IV (and the man page).
 1.1.42.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.1.12.1 03-Dec-2017  jdolecek update from HEAD
 1.30 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.29 24-Apr-2021  thorpej branches: 1.29.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.28 22-Jan-2014  christos branches: 1.28.44;
gcc-4.8.x unused variable fixes
 1.27 27-Oct-2012  chs branches: 1.27.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.26 11-Dec-2005  christos branches: 1.26.112; 1.26.122;
merge ktrace-lwp.
 1.25 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.24 02-Oct-2002  thorpej branches: 1.24.6;
Use CFATTACH_DECL().
 1.23 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.22 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.21 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.20 25-Apr-2001  bouyer branches: 1.20.2; 1.20.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.19 10-Jan-1999  tron branches: 1.19.8; 1.19.20;
Don't use void pointer for arithmetic.
 1.18 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.17 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.16 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.15 12-Jan-1998  thorpej Adjust for changes to config.
 1.14 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.13 23-Dec-1996  veego branches: 1.13.8; 1.13.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.12 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.11 13-Oct-1996  christos backout previous kprintf change
 1.10 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.9 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.8 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.7 10-May-1996  is Back out last change, which was caused by a wrong way merge at home.
Sorry for the inconvenience.
 1.6 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.5 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.4 05-Apr-1996  is Typo in the new new config conversion fixed.
 1.3 28-Mar-1996  is The interrupt routine of the ivsc (and the empsc, which seems to have copied
it) looks truncated. At least the return(1) is missing, which I now add as
a first stopgap. Somebody needs to find out if anything else is missing for
these boards.
 1.2 28-Mar-1996  is Adapt to new attach scheme. Fix operator precedence error. Normalize
function name prefixes.
 1.1 28-Mar-1996  is Emplant SCSI driver backend by Sean Riddle and Bo Najdrovsky.
 1.13.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.13.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.19.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.20.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.20.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.20.8.1 25-Apr-2001  nathanw file empsc.c was added on branch nathanw_sa on 2002-02-28 04:06:35 +0000
 1.20.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.20.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.24.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.6.1 03-Aug-2004  skrll Sync with HEAD
 1.26.122.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.112.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.112.1 30-Oct-2012  yamt sync with head
 1.27.2.1 18-May-2014  rmind sync with head
 1.28.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.29.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.6 16-Feb-1995  mycroft Clean up deleted files.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.17 26-Sep-2021  thorpej Driver "kqfilter" entry points return an error code, so if an invalid
filter is requested, return EINVAL rather than 1.
 1.16 26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.15 19-Dec-2020  thorpej Use sel{record,remove}_knote().
 1.14 25-Oct-2017  maya branches: 1.14.16;
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
 1.13 01-Mar-2008  rmind branches: 1.13.48;
Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.12 04-Mar-2007  christos branches: 1.12.20; 1.12.36; 1.12.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 11-Dec-2005  christos branches: 1.11.26;
merge ktrace-lwp.
 1.10 07-Aug-2003  agc branches: 1.10.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 26-Nov-2002  christos branches: 1.9.6;
si_ -> sel_
 1.8 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.7 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.6 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.5 11-Oct-1996  mhitch branches: 1.5.42; 1.5.46;
Changes for poll(2).
 1.4 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.3 26-Oct-1994  cgd branches: 1.3.6;
new RCS ID format.
 1.2 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3.6.1 31-May-1996  is Add missing splx(). (from Jason Thorpe)
 1.5.46.3 11-Dec-2002  thorpej Sync with HEAD.
 1.5.46.2 11-Nov-2002  nathanw Catch up to -current
 1.5.46.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.42.4 02-Oct-2002  jdolecek do not need the (void *) cast for kn_hook anymore
 1.5.42.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.42.2 12-Sep-2001  thorpej Fix a past'o.
 1.5.42.1 09-Sep-2001  thorpej Add kqueue support (not yet compiled).
 1.9.6.4 21-Nov-2004  skrll Adapt to branch.
 1.9.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.3 17-Mar-2008  yamt sync with head.
 1.10.16.2 03-Sep-2007  yamt sync with head.
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.40.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.36.1 24-Mar-2008  keiichi sync with head.
 1.12.20.1 23-Mar-2008  matt sync with HEAD
 1.13.48.1 03-Dec-2017  jdolecek update from HEAD
 1.14.16.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.9 01-Mar-2008  rmind Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.8 04-Mar-2007  christos branches: 1.8.20; 1.8.36; 1.8.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 07-Aug-2003  agc branches: 1.6.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 23-Oct-2002  jdolecek branches: 1.5.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 11-Oct-1996  mhitch branches: 1.3.42; 1.3.46;
Changes for poll(2).
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3.46.2 11-Nov-2002  nathanw Catch up to -current
 1.3.46.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.42.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.42.1 09-Sep-2001  thorpej Add kqueue support (not yet compiled).
 1.5.6.4 21-Nov-2004  skrll Adapt to branch.
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.3 17-Mar-2008  yamt sync with head.
 1.6.16.2 03-Sep-2007  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.40.1 03-Apr-2008  mjf Sync with HEAD.
 1.8.36.1 24-Mar-2008  keiichi sync with head.
 1.8.20.1 23-Mar-2008  matt sync with HEAD
 1.104 14-Oct-2023  andvar fix various typos in comments and documentation, mainly in word "between".
 1.103 13-Oct-2023  andvar s/fdstartegy/fdstrategy/ in comment.
 1.102 26-Aug-2023  andvar amiga/fdc(4): revert bp->b_bcount format specifiers from %ld to %d,
changed in rev 1.62. b_bcount has a type of int.

fixes FDDEBUG build.
 1.101 17-Jan-2022  andvar fix typos in comments.
 1.100 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.99 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.98 24-Apr-2021  thorpej branches: 1.98.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.97 03-Sep-2018  riastradh branches: 1.97.14;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.96 26-Apr-2015  mlelstv branches: 1.96.2; 1.96.8; 1.96.16; 1.96.18;
Use C99-style initializers for struct dkdriver.
 1.95 02-Jan-2015  christos We have three sets of DTYPE_ constants in the kernel:
altq Drop Type
disklabel Disk Type
file Descriptor Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
 1.94 31-Dec-2014  christos fix typo
 1.93 31-Dec-2014  christos make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
 1.92 08-Aug-2014  joerg branches: 1.92.4;
Fix misspelling of binary and as logical and.
 1.91 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.90 25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.89 16-Mar-2014  dholland branches: 1.89.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.88 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.87 27-Oct-2012  chs branches: 1.87.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.86 03-Jun-2011  matt branches: 1.86.2; 1.86.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.85 20-Dec-2010  matt branches: 1.85.2; 1.85.6;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.84 15-Jan-2010  dyoung branches: 1.84.4;
Use __arraycount().
 1.83 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.82 18-Mar-2009  cegger bcopy -> memcpy
 1.81 18-Mar-2009  cegger bzero -> memset
 1.80 13-Jan-2009  yamt branches: 1.80.2;
g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.79 11-Jun-2008  tsutsui branches: 1.79.4;
Use device_private() and device_lookup_private() to get softc.
 1.78 02-Jan-2008  ad branches: 1.78.6; 1.78.8; 1.78.10; 1.78.12; 1.78.14;
Merge vmlocking2 to head.
 1.77 17-Oct-2007  garbled branches: 1.77.2; 1.77.4; 1.77.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.76 08-Oct-2007  ad Missed brelse() change.
 1.75 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.74 08-Oct-2007  ad Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.73 20-Aug-2007  is branches: 1.73.2; 1.73.4;
First part of amigappc support patches by Frank Wille.
 1.72 29-Jul-2007  ad branches: 1.72.4;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.71 29-Jul-2007  ad It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.70 09-Jul-2007  ad branches: 1.70.2; 1.70.4;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.69 05-Mar-2007  he branches: 1.69.2; 1.69.4; 1.69.10;
Use char* for pointer arithmetic.
 1.68 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.67 26-Mar-2006  thorpej branches: 1.67.14;
Use device_unit().
 1.66 11-Dec-2005  christos branches: 1.66.4; 1.66.6; 1.66.8; 1.66.10; 1.66.12;
merge ktrace-lwp.
 1.65 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.64 13-Jun-2005  jmc branches: 1.64.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.63 28-Oct-2004  yamt move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.62 14-Jul-2003  aymeric get rid of printf() warnings in the FDDEBUG case by using the right format
specifiers
 1.61 10-May-2003  thorpej branches: 1.61.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.60 03-May-2003  wiz DMA, not dma nor Dma.
 1.59 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.58 06-Jan-2003  wiz synchronous, not syncronous.
 1.57 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.56 01-Nov-2002  mrg implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
when processing hw.diskstats, add the read&write bytes/transfers for
the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail. however, the next time this is
change it will not fail again.

this is just the kernel portion.
 1.55 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.54 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.53 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.52 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.51 07-Aug-2002  hannken Convert to new device buffer queue interface.

Approved by: Ignatios Souvatzis <is@netbsd.org>
 1.50 28-Jan-2002  aymeric branches: 1.50.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.49 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.48 16-Sep-2001  wiz branches: 1.48.4;
Spell 'occurred' with two 'r's.
 1.47 13-Jan-2001  aymeric branches: 1.47.2; 1.47.4;
make this compile again
 1.46 20-Nov-2000  chs rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
 1.45 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.44 16-Mar-2000  kleink Kill more broken cf_unit bogons.
 1.43 07-Feb-2000  thorpej Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle. Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
 1.42 21-Jan-2000  thorpej Update for sys/buf.h/disksort_*() changes.
 1.41 04-Dec-1999  ragge CL* discarding.
 1.40 12-Jan-1998  thorpej branches: 1.40.14; 1.40.20;
Adjust for changes to config.
 1.39 11-Oct-1997  mhitch Fix typo from DIOCGDEFLABEL implementation.
 1.38 08-Oct-1997  thorpej Implement DIOCGDEFLABEL.
 1.37 17-Jul-1997  jtk branches: 1.37.2;
use locator defines in "locators.h" to index cf_loc[]
 1.36 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.35 13-Oct-1996  christos backout previous kprintf change
 1.34 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.33 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.32 04-May-1996  mhitch Floppy driver now supports MSDOS track format. Minor device 1 (/dev/fd?b)
uses MSDOS MFM track encoding. From Ezra Story (ezy@panix.com) with
a couple of changes by me.
 1.31 30-Apr-1996  mhitch Remove include of sys/cpu.h.
 1.30 29-Apr-1996  mhitch Add floppy index interrupt routine for future MSDOS floppy support.
Don't seek to track 0 before checking for diskchange: if drive steps,
the diskchange flag is cleared. Just select the drive, then test for
a diskchange.
Clean up for -Wall with FDDEBUG defined, and fix a message typo.
 1.29 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.28 05-Apr-1996  mhitch Pass reserved blocks in label so adosfs computes root block
correctly (close PR 2232).
 1.27 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.26 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.25 28-Jan-1996  chopps make sure master enable is set #1920
 1.24 15-Jan-1996  thorpej Call disk_busy() a bit earlier in case an exceptional condition causes
fddone() (and thus disk_unbusy()) to be called directly from fdstart().
Pointed out by Ezra Story <ezy@panix.com>.
 1.23 14-Jan-1996  thorpej Fixed typo (that I probably introduced with the disk changes). From
Thorsten Frueauf <frueauf@ira.uka.de>, PR #1924.
 1.22 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.21 12-Aug-1995  mycroft minphys() functions really should return void.
 1.20 26-Jul-1995  chopps fix typo
 1.19 24-Jul-1995  cgd bound xfer properly in minphys, panic if can't.
 1.18 05-Jul-1995  chopps remove indirect use of strategy which brok with recent changes
 1.17 13-Apr-1995  chopps couple small changes from Michael.
 1.16 10-Apr-1995  mycroft Fdclose --> fdclose
 1.15 06-Apr-1995  chopps say something more for unconfigured devices
 1.14 13-Dec-1994  mycroft fdclose -> Fdclose
 1.13 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.12 26-Oct-1994  cgd new RCS ID format.
 1.11 18-Jul-1994  chopps branches: 1.11.2;
don't hang if no floppy in system.
 1.10 04-Jul-1994  chopps branches: 1.10.2;
move to new disk minor encoding (parts have lowest 4 bits instead of 3)
 1.9 20-Jun-1994  chopps fixed a couple bogons with continueation and motoroff.
 1.8 16-Jun-1994  chopps must use file system blocks that are multiples of CLBYTES. (for now)
 1.7 07-Jun-1994  chopps add fix from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.5 29-May-1994  chopps new floppy driver from me to replace the old one.
 1.4 22-Apr-1994  chopps changes to make fd work better (not done yet) from Michael Hitch
(osymh@montana.edu)
 1.3 07-Apr-1994  chopps yuck, there has got to be a better way to derive things and copyright them.
 1.2 07-Apr-1994  chopps all amigas ahve internal drive so anything to the contrary is bogus.
 1.1 05-Apr-1994  chopps fp -> fd, consistency good. [nameclash bad.]
 1.10.2.1 18-Jul-1994  cgd from trunk; fix a hang. from chopps
 1.11.2.2 18-Jul-1994  chopps don't hang if no floppy in system.
 1.11.2.1 18-Jul-1994  chopps file fd.c was added on branch netbsd-1-0 on 1994-07-18 01:37:49 +0000
 1.37.2.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.40.20.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.40.20.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.40.14.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.40.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.40.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.47.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.47.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.47.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.47.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.47.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.47.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.48.4.8 07-Jan-2003  thorpej Sync with HEAD.
 1.48.4.7 03-Jan-2003  thorpej Sync with HEAD.
 1.48.4.6 11-Nov-2002  nathanw Catch up to -current
 1.48.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.48.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.48.4.3 13-Aug-2002  nathanw Catch up to -current.
 1.48.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.48.4.1 16-Sep-2001  nathanw file fd.c was added on branch nathanw_sa on 2002-02-28 04:06:36 +0000
 1.50.8.2 30-Aug-2002  gehenna catch up with -current.
 1.50.8.1 16-May-2002  gehenna Add the block/character device switch.
 1.61.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.61.2.5 21-Nov-2004  skrll Adapt to branch.
 1.61.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.61.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.61.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.61.2.1 03-Aug-2004  skrll Sync with HEAD
 1.64.2.4 21-Jan-2008  yamt sync with head
 1.64.2.3 27-Oct-2007  yamt sync with head.
 1.64.2.2 03-Sep-2007  yamt sync with head.
 1.64.2.1 21-Jun-2006  yamt sync with head.
 1.66.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.66.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.66.8.1 01-Apr-2006  yamt sync with head.
 1.66.6.1 22-Apr-2006  simonb Sync with head.
 1.66.4.1 09-Sep-2006  rpaulo sync with head
 1.67.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.69.10.2 16-Oct-2007  garbled Sync with HEAD
 1.69.10.1 03-Oct-2007  garbled Sync with HEAD
 1.69.4.1 11-Jul-2007  mjf Sync with head.
 1.69.2.5 09-Oct-2007  ad Sync with head.
 1.69.2.4 09-Oct-2007  ad Sync with head.
 1.69.2.3 20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.69.2.2 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.69.2.1 15-Jul-2007  ad Sync with head.
 1.70.4.2 03-Sep-2007  skrll Sync with HEAD.
 1.70.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.70.2.1 07-Aug-2007  matt Sync with HEAD.
 1.72.4.2 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.72.4.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.73.4.1 14-Oct-2007  yamt sync with head.
 1.73.2.2 09-Jan-2008  matt sync with HEAD
 1.73.2.1 06-Nov-2007  matt sync with HEAD
 1.77.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.77.4.1 31-Dec-2007  ad Catch up with buffer cache changes.
 1.77.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.78.14.1 18-Jun-2008  simonb Sync with head.
 1.78.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.78.10.2 11-Mar-2010  yamt sync with head
 1.78.10.1 04-May-2009  yamt sync with head.
 1.78.8.1 17-Jun-2008  yamt sync with head.
 1.78.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.78.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.79.4.2 28-Apr-2009  skrll Sync with HEAD.
 1.79.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.80.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.84.4.2 12-Jun-2011  rmind sync with head
 1.84.4.1 05-Mar-2011  rmind sync with head
 1.85.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.85.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.86.12.3 03-Dec-2017  jdolecek update from HEAD
 1.86.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.86.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.86.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.86.2.1 30-Oct-2012  yamt sync with head
 1.87.2.1 18-May-2014  rmind sync with head
 1.89.2.1 10-Aug-2014  tls Rebase.
 1.92.4.2 06-Jun-2015  skrll Sync with HEAD
 1.92.4.1 06-Apr-2015  skrll Sync with HEAD
 1.96.18.1 10-Jun-2019  christos Sync with HEAD
 1.96.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.96.8.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.96.2.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.96.2.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.97.14.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.98.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.47 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.46 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.45 20-Dec-2010  matt branches: 1.45.58; 1.45.60;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.44 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.43 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.42 23-Nov-2009  rmind branches: 1.42.2; 1.42.4;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.41 13-Apr-2008  tsutsui branches: 1.41.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.40 11-Mar-2007  he branches: 1.40.38;
Correct a thinko of mine in the previous change, pointed out by
is@. Even though the argument type changes as an effect of the
caddr_t removal, there really is no need to indirect where we didn't
before. Instead, add the appropriate cast.
 1.39 05-Mar-2007  he branches: 1.39.2;
Fix one missing indirection causing a type conflict, and use char* for
pointer arithmetic.
 1.38 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 29-Mar-2006  thorpej branches: 1.37.14;
Use device_cfdata().
 1.36 08-Mar-2006  lukem branches: 1.36.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.35 11-Dec-2005  christos branches: 1.35.4; 1.35.6; 1.35.8; 1.35.10;
merge ktrace-lwp.
 1.34 13-Jun-2005  jmc branches: 1.34.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.33 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.32 01-Apr-2003  thorpej branches: 1.32.2;
Use PAGE_SIZE rather than NBPG.
 1.31 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.30 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.29 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.28 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.27 25-Apr-2001  bouyer branches: 1.27.2; 1.27.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.26 05-Jun-2000  tsutsui branches: 1.26.4;
Adapt MI ncr53c9x changes.
 1.25 30-Sep-1999  thorpej branches: 1.25.2; 1.25.10;
Update for SCSIPI changes.
 1.24 25-Sep-1999  is vm_offset_t -> vaddr_t/paddr_t
 1.23 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.22 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.21 04-Jul-1998  jonathan defopt DDB.
 1.20 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.19 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.18 12-Jan-1998  thorpej Adjust for changes to config.
 1.17 24-Oct-1997  mhitch Don't rely on fixed padding to longword align the buffer used for non-aligned
transfers - compute aligned address when interface is attached. Fixes PR#4258.
 1.16 04-Oct-1997  mhitch branches: 1.16.2;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.15 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.14 23-Dec-1996  veego branches: 1.14.8; 1.14.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.13 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.12 13-Oct-1996  christos backout previous kprintf change
 1.11 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.9 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.8 04-Aug-1996  is Program around the Fastlane's DMA hardware shortcomings.
Fix by Matthias Scheler (PR #2672), based on information provided by Ralph
Schmidt/Reinhard Grams (Phase 5), forwarded by Jerome Lovy. Thanks to all.
 1.7 10-Jun-1996  is Activate M68040 cache flushing code also in 68060 only kernels.
 1.6 03-Jun-1996  is Don't get fooled by the CyberSCSI MK I, which uses the same man/prod id
as the Fastlane Z3, but is different enough to let the kernel crash.
Closes PR #2492 by Matthias Scheler. [thanks also to Ralph Schmidt for
confirmation of the patch]
 1.5 21-Apr-1996  veego branches: 1.5.4;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.4 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.3 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.2 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.5.4.3 05-Aug-1996  jtc Pulled up from rev 1.8 by request from Ignatios Souvatzis
 1.5.4.2 10-Jun-1996  is Pull up bug fix from main branch:
activate M68040 style dma flush also on M68060 only kernels.
 1.5.4.1 03-Jun-1996  is Pull up buf fix from main branch: dont get fooled by Cyberscsi masquerading
as Fastlane.
 1.14.10.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.16.2.1 24-Oct-1997  mellon Pull rev 1.17 up from trunk
 1.25.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.25.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.25.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.26.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.27.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.27.8.1 25-Apr-2001  nathanw file flsc.c was added on branch nathanw_sa on 2002-02-28 04:06:36 +0000
 1.27.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.27.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.32.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.34.2.2 03-Sep-2007  yamt sync with head.
 1.34.2.1 21-Jun-2006  yamt sync with head.
 1.35.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.35.8.2 01-Apr-2006  yamt sync with head.
 1.35.8.1 13-Mar-2006  yamt sync with head.
 1.35.6.1 22-Apr-2006  simonb Sync with head.
 1.35.4.1 09-Sep-2006  rpaulo sync with head
 1.36.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.37.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.39.2.1 13-Mar-2007  ad Sync with head.
 1.40.38.1 02-Jun-2008  mjf Sync with HEAD.
 1.41.4.2 11-Aug-2010  yamt sync with head.
 1.41.4.1 11-Mar-2010  yamt sync with head
 1.42.4.2 05-Mar-2011  rmind sync with head
 1.42.4.1 03-Jul-2010  rmind sync with head
 1.42.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.42.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.45.60.1 10-Jun-2019  christos Sync with HEAD
 1.45.58.2 18-Jan-2019  pgoyette Synch with HEAD
 1.45.58.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3 05-Oct-1997  veego Unused files after the sfas driver is replaced by the MI ncr53c9x driver.
 1.2 21-Apr-1996  veego branches: 1.2.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.2.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.6 13-Apr-2008  tsutsui branches: 1.6.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.5 25-Sep-1999  is branches: 1.5.138;
vm_offset_t -> vaddr_t/paddr_t
 1.4 24-Oct-1997  mhitch Don't rely on fixed padding to longword align the buffer used for non-aligned
transfers - compute aligned address when interface is attached. Fixes PR#4258.
 1.3 04-Oct-1997  mhitch branches: 1.3.2;
Replace Fastlane and Blizzard SCSI driver frontends, using the machine
independent ncr53c9x driver. Add 12x0-IV support to the 1230 driver, and
add Cyberstorm SCSI I and II drivers.
 1.2 21-Apr-1996  veego branches: 1.2.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.2.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.2.1 24-Oct-1997  mellon Pull rev 1.4 up from trunk
 1.5.138.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.4.1 11-Mar-2010  yamt sync with head
 1.2 05-Apr-1994  mycroft Clean up deleted files.
 1.1 05-Apr-1994  chopps added floppy driver from Brad Pepers, doesn't work on my machine, some
major cleanup by me no code changes ... yet.
 1.34 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33 24-Apr-2021  thorpej branches: 1.33.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.32 02-Mar-2020  is branches: 1.32.8;
The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin Ã…berg.

Tested on formerly working hardware

- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:

- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)
 1.31 08-Feb-2015  jandberg branches: 1.31.10; 1.31.18; 1.31.22;
Add a delay between the recently added new PCMCIA reset method and the old
reset method to get the card reset work reliably on my A1200 model and network
cards.

Discussed on port-amiga.
 1.30 07-Sep-2014  phx branches: 1.30.2;
According to http://eab.abime.net/showpost.php?p=782840&postcount=115
there are two methods for a Gayle PCMCIA soft-reset.
pccard_attach() only implemented a method with works on A600 and some
older (?) A1200 models. I added the second method as well, to make the
reset work in any case. Tested on the latest A1200 model, which failed before.
 1.29 22-Jan-2014  christos branches: 1.29.4;
gcc-4.8.x unused variable fixes
 1.28 03-Jan-2014  rkujawa Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.27 23-Sep-2013  jandberg Fix interrupt handler arg (needs to be softc instead of device_t)
 1.26 27-Oct-2012  chs branches: 1.26.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.25 26-Jul-2011  dyoung branches: 1.25.2; 1.25.12;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.24 13-Jan-2011  phx Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.23 17-Oct-2007  garbled branches: 1.23.42;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.22 09-Jul-2007  ad branches: 1.22.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.21 22-Feb-2007  thorpej branches: 1.21.4; 1.21.6; 1.21.12;
TRUE -> true, FALSE -> false
 1.20 30-Mar-2006  chs branches: 1.20.14;
use uvm_km_alloc() instead of uvm_map().
 1.19 05-Mar-2006  aymeric branches: 1.19.2; 1.19.4;
. free VM if attach fails
. many small cleanups
No functional improvement
 1.18 11-Dec-2005  christos branches: 1.18.4; 1.18.6; 1.18.8;
merge ktrace-lwp.
 1.17 13-Sep-2004  drochner branches: 1.17.12;
use config_found() instead of config_found_sm() if no submatch
function is used
 1.16 22-Aug-2004  jandberg pcf_io_map() was returning invalid bus space handles.
Generate them with bus_space_map() like suggested by <aymeric>.
 1.15 16-Aug-2004  aymeric add a noop settype() method to the pcmcia_chip_functions to cope with the
recent changes in the PCMCIA code.
This is only compile-tested, but should work because we only support IO cards
on the A1200 for now.
 1.14 02-Oct-2002  thorpej branches: 1.14.6;
Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.11 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 10-Sep-2001  chris branches: 1.10.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.9 24-Apr-2001  thorpej branches: 1.9.2; 1.9.4;
Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.8 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.7 11-Feb-2001  is branches: 1.7.2;
Be a bit more helpful in the error case.
 1.6 27-Sep-2000  aymeric branches: 1.6.2;
minor aesthetic changes, plus explicitly state this is public domain
 1.5 13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.4 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.3 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.2 21-Feb-2000  aymeric fix a couple of things to handle interrupts more cleanly on the A1200
 1.1 23-Jan-2000  aymeric add PCMCIA generic support
 1.6.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.6.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.2.1 27-Sep-2000  bouyer file gayle_pcmcia.c was added on branch thorpej_scsipi on 2000-11-20 19:58:33 +0000
 1.7.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.9.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.4.1 10-Sep-2001  nathanw file gayle_pcmcia.c was added on branch nathanw_sa on 2002-02-28 04:06:37 +0000
 1.14.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1 25-Aug-2004  skrll Sync with HEAD.
 1.17.12.3 03-Sep-2007  yamt sync with head.
 1.17.12.2 26-Feb-2007  yamt sync with head.
 1.17.12.1 21-Jun-2006  yamt sync with head.
 1.18.8.2 01-Apr-2006  yamt sync with head.
 1.18.8.1 13-Mar-2006  yamt sync with head.
 1.18.6.1 22-Apr-2006  simonb Sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.19.4.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.19.2.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.20.14.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.21.12.1 03-Oct-2007  garbled Sync with HEAD
 1.21.6.1 11-Jul-2007  mjf Sync with head.
 1.21.4.1 15-Jul-2007  ad Sync with head.
 1.22.10.1 06-Nov-2007  matt sync with HEAD
 1.23.42.1 05-Mar-2011  rmind sync with head
 1.25.12.3 03-Dec-2017  jdolecek update from HEAD
 1.25.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.2.1 30-Oct-2012  yamt sync with head
 1.26.2.1 18-May-2014  rmind sync with head
 1.29.4.3 08-Mar-2020  martin Pull up following revision(s) (requested by is in ticket #1724):

sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32

The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin �berg.

Tested on formerly working hardware
- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:
- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)
 1.29.4.2 16-Feb-2015  martin Pull up following revision(s) (requested by jandberg in ticket #516):
sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.31
Add a delay between the recently added new PCMCIA reset method and
the old reset method to get the card reset work reliably on my
A1200 model and network cards.
Discussed on port-amiga.
 1.29.4.1 11-Sep-2014  martin Pull up following revision(s) (requested by phx in ticket #85):
sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.30
Add support for newer A1200 models.
 1.30.2.1 06-Apr-2015  skrll Sync with HEAD
 1.31.22.1 08-Mar-2020  martin Pull up following revision(s) (requested by is in ticket #760):

sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32
sys/arch/amigappc/include/bus_defs.h: revision 1.8

The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin �berg.

Tested on formerly working hardware
- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:
- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)

-

gayle wants stride_1swap now, so declare the rest of the bus methods since
we already define them anyway.
 1.31.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.10.1 08-Mar-2020  martin Pull up following revision(s) (requested by is in ticket #1517):

sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32

The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin �berg.

Tested on formerly working hardware
- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:
- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)
 1.32.8.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.33.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.2 02-Mar-1996  veego Updated for the new CyberVision64 console
gen_cvtab.c is no longer needed
 1.1 24-Feb-1996  chopps remove floating point expressions. gen_cvtab.c generates a conversion
table to replace a specific floating point expression in grf_cv.c
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 14-Jul-2003  lukem rcsid
 1.8 26-Jan-2002  aymeric branches: 1.8.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 17-Aug-2001  is branches: 1.7.6;
Ansification by Petri Koistinen
 1.6 16-Feb-1995  chopps branches: 1.6.46;
cleanup copyright stuff
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.6.46.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.46.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.6.1 17-Aug-2001  nathanw file genpar.c was added on branch nathanw_sa on 2002-02-28 04:06:37 +0000
 1.8.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.16.1 03-Aug-2004  skrll Sync with HEAD
 1.69 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.68 24-May-2022  andvar fix various typos in comment, documentation and log messages.
 1.67 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.66 27-Apr-2021  thorpej branches: 1.66.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.65 24-Apr-2021  thorpej branches: 1.65.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.64 12-Nov-2015  phx branches: 1.64.32;
Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.63 07-Nov-2015  phx Improved wscons support. Virtual screens are now working.
 1.62 25-Jul-2014  dholland branches: 1.62.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.61 29-Mar-2014  mlelstv branches: 1.61.2;
Appease compiler.
 1.60 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.59 27-Oct-2012  chs branches: 1.59.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.58 13-Mar-2012  elad branches: 1.58.2;
Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.57 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.56 30-Jun-2011  wiz branches: 1.56.2; 1.56.6;
dependant -> dependent
 1.55 03-Jun-2011  matt CFATTACH_DECL_NEW, device_t, cfdata_t
 1.54 08-Feb-2011  rmind branches: 1.54.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.53 20-Dec-2010  matt branches: 1.53.2; 1.53.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.52 26-Oct-2009  cegger branches: 1.52.4;
kill extra whitespaces
reviewed by tsutsui@
 1.51 18-Mar-2009  cegger bcopy -> memcpy
 1.50 04-Mar-2007  christos branches: 1.50.44; 1.50.52; 1.50.58;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.49 11-Dec-2005  christos branches: 1.49.26;
merge ktrace-lwp.
 1.48 07-Aug-2003  agc branches: 1.48.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.47 01-Jan-2003  thorpej branches: 1.47.2;
Use aprint_normal() for cfprint routines.
 1.46 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.45 10-Oct-2002  jdolecek replace the somewhat strange poll routine with standard nopoll() (a.k.a
seltrue())
 1.44 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.43 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.42 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.41 17-Mar-2002  atatat branches: 1.41.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.40 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.39 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.38 19-Sep-2001  thorpej branches: 1.38.4;
machine/fbio.h -> dev/sun/fbio.h
 1.37 29-Jun-2000  mrg branches: 1.37.2; 1.37.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.36 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.35 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.34 16-Aug-1999  is branches: 1.34.2; 1.34.12;
Add a quick and dirty FBIOGVIDEO implementation. This is hardware independent,
by saving the last written FIOSVIDEO/GRFIOCBLANK value into a shadow variable
in the grf_softc and returning this value on FBIOGVIDEO.
The presence of this ioctl is needed by screenblank(8) nowadays.
Original problem reported by Lars Hecking on the port-amiga mailing list.
 1.33 12-Jan-1998  thorpej branches: 1.33.8;
Adjust for changes to config.
 1.32 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.31 13-Oct-1996  christos backout previous kprintf change
 1.30 11-Oct-1996  mhitch Changes for poll(2).
 1.29 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.28 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.27 19-May-1996  is Screenblank support:
- new fbio.h in arch/amiga/include, defining only FBIOSVIDEO
- add an IOCTL translation to arch/amiga/dev/grf.c
- add screenblank to the list of specials to build on amiga.
 1.26 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.25 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.24 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.23 09-Oct-1995  chopps branches: 1.23.2;
new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.22 18-Aug-1995  chopps change for a2410 from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.21 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.20 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.19 10-Apr-1995  mycroft map --> mmap
 1.18 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.17 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.16 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 16-Jun-1994  chopps fix boot diag output.
 1.13 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.12 11-May-1994  chopps general cleanup including boot diag messages.
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 01-Apr-1994  chopps no more MAP_FILE
 1.9 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.8 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.23.2.1 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.33.8.1 18-Feb-2000  he Pull up revision 1.34 (requested by is):
Implement GRFIOGLANK ioctl, which is nowadays needed by
screenblank(8).
 1.34.12.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.34.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.37.4.6 10-Oct-2002  jdolecek use nokqfilter (or seltrue_kqfilter()) for drivers which provide poll
routine very similar to seltrue(); the poll routines would be cleaned
up on trunk
 1.37.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.37.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.37.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.37.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.37.4.1 12-Sep-2001  thorpej Add noop kqueue entry points.
 1.37.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.37.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.38.4.7 03-Jan-2003  thorpej Sync with HEAD.
 1.38.4.6 11-Nov-2002  nathanw Catch up to -current
 1.38.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.38.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.38.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.38.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.38.4.1 19-Sep-2001  nathanw file grf.c was added on branch nathanw_sa on 2002-02-28 04:06:37 +0000
 1.41.4.3 16-May-2002  gehenna Add the character device switch.
Replace the access to devsw table with calling devsw API.
 1.41.4.2 16-May-2002  gehenna Call device interface via device switch, not directly.
 1.41.4.1 16-May-2002  gehenna Remove BANKEDDEVPAGER stuff.
 1.47.2.4 21-Nov-2004  skrll Adapt to branch.
 1.47.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.47.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.47.2.1 03-Aug-2004  skrll Sync with HEAD
 1.48.16.2 03-Sep-2007  yamt sync with head.
 1.48.16.1 21-Jun-2006  yamt sync with head.
 1.49.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.50.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.50.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.50.44.2 11-Mar-2010  yamt sync with head
 1.50.44.1 04-May-2009  yamt sync with head.
 1.52.4.2 12-Jun-2011  rmind sync with head
 1.52.4.1 05-Mar-2011  rmind sync with head
 1.53.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.53.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.56.6.2 05-Apr-2012  mrg sync to latest -current.
 1.56.6.1 18-Feb-2012  mrg merge to -current.
 1.56.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.56.2.2 30-Oct-2012  yamt sync with head
 1.56.2.1 17-Apr-2012  yamt sync with head
 1.58.2.3 03-Dec-2017  jdolecek update from HEAD
 1.58.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.58.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.59.2.1 18-May-2014  rmind sync with head
 1.61.2.1 10-Aug-2014  tls Rebase.
 1.62.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.64.32.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.65.2.1 13-May-2021  thorpej Sync with HEAD.
 1.66.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.44 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.43 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.42 27-Apr-2021  thorpej branches: 1.42.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.41 27-Oct-2012  chs branches: 1.41.54;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.40 15-Dec-2011  phx branches: 1.40.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.39 20-Dec-2010  matt branches: 1.39.8; 1.39.12;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.38 26-Oct-2009  cegger branches: 1.38.4;
kill extra whitespaces
reviewed by tsutsui@
 1.37 18-Mar-2009  cegger bcopy -> memcpy
 1.36 04-Mar-2007  christos branches: 1.36.44; 1.36.52; 1.36.58;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.35 01-Jan-2003  thorpej branches: 1.35.18; 1.35.56;
Use aprint_normal() for cfprint routines.
 1.34 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.33 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.32 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.31 17-Mar-2002  atatat branches: 1.31.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.30 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.29 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.28 29-Jun-2000  mrg branches: 1.28.4; 1.28.8;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.27 26-Jun-2000  mrg remove redundant vm includes.
 1.26 24-Mar-1999  mrg branches: 1.26.8;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.25 10-Jul-1998  mhitch Add UVM support to amiga
 1.24 12-Jan-1998  thorpej Adjust for changes to config.
 1.23 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.22 13-Oct-1996  christos backout previous kprintf change
 1.21 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.20 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.19 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.18 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.17 16-Feb-1995  chopps cleanup copyright stuff
 1.16 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.13 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.11 10-Apr-1994  chopps little bit of KNiFeing, view and ite ioctl names cleaned. ite bell
values made sensical for users. (that is pitch,msec not period,count)
 1.10 30-Mar-1994  chopps remove dlists.h oops.
 1.9 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.8 11-Feb-1994  chopps Add missing Id's
 1.7 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.6 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.5 31-Oct-1993  mw Change gfx-drivers to used g_data for their private data, and use regaddr
for what it's meant, that's to point to the register area. Now, both
gfx drivers should be fairly controllable from user-level applications.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.26.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.28.8.5 03-Jan-2003  thorpej Sync with HEAD.
 1.28.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.28.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.28.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.28.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.28.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.28.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.31.4.1 16-May-2002  gehenna Call device interfaces via device switch, not directly.
 1.35.56.1 12-Mar-2007  rmind Sync with HEAD.
 1.35.18.1 03-Sep-2007  yamt sync with head.
 1.36.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.36.44.2 11-Mar-2010  yamt sync with head
 1.36.44.1 04-May-2009  yamt sync with head.
 1.38.4.1 05-Mar-2011  rmind sync with head
 1.39.12.1 18-Feb-2012  mrg merge to -current.
 1.39.8.2 30-Oct-2012  yamt sync with head
 1.39.8.1 17-Apr-2012  yamt sync with head
 1.40.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.41.54.1 13-May-2021  thorpej Sync with HEAD.
 1.42.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.10 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.9 21-Apr-1996  veego branches: 1.9.44; 1.9.48;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.8 16-Feb-1995  chopps cleanup copyright stuff
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.9.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.9.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.58 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.57 27-Aug-2023  andvar amiga/grfcl(4): return prx, pry definition/assigment lost with rev 1.49,
however under CL_SHIFTSPRITE code block only, where it is used.

Fixes build with the CL_SHIFTSPRITE enabled option.
 1.56 14-Feb-2023  andvar s/programm/program/ and s/suuport/support/ in comments and message.
 1.55 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.54 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.53 04-Oct-2021  andvar follow fcambus steps by fixing typos for "unknown" in few more error messages.
 1.52 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.51 27-Apr-2021  thorpej branches: 1.51.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.50 16-Nov-2015  phx branches: 1.50.34;
wscons and Xorg support for CirrusLogic GD542x based boards (grf3).
 1.49 22-Jan-2014  christos branches: 1.49.6;
gcc-4.8.x unused variable fixes
 1.48 08-Nov-2012  rkujawa branches: 1.48.2;
Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.47 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.46 15-Dec-2011  phx branches: 1.46.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.45 26-Oct-2009  cegger branches: 1.45.12; 1.45.16;
kill extra whitespaces
reviewed by tsutsui@
 1.44 18-Mar-2009  cegger bcopy -> memcpy
 1.43 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.42 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.41 17-Oct-2007  garbled branches: 1.41.20; 1.41.28; 1.41.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.40 20-Aug-2007  is branches: 1.40.2;
First part of amigappc support patches by Frank Wille.
 1.39 06-Mar-2007  he branches: 1.39.2; 1.39.10; 1.39.14; 1.39.18;
Make the various graphics card drivers compile again.
Try to preserve `volatile' qualification where possible, though
uses of kvtop() gain an unfortunate but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
 1.38 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 24-Nov-2006  wiz branches: 1.37.4;
s/independant/independent/, from Zafer.
 1.36 11-Dec-2005  christos branches: 1.36.20; 1.36.22;
merge ktrace-lwp.
 1.35 13-Jun-2005  jmc branches: 1.35.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.34 01-Jan-2003  thorpej branches: 1.34.2;
Use aprint_normal() for cfprint routines.
 1.33 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.30 14-May-2002  matt branches: 1.30.2; 1.30.4;
Eliminate commons. (including a few unused or mismatched ones).
 1.29 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.28 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.27 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.26 05-Aug-2001  jdolecek branches: 1.26.6;
use unsigned variable types as appropriate
 1.25 29-Jun-1999  is branches: 1.25.12; 1.25.16;
Fix horizontal timings for console mode (this helps, at least,
Lars Hecking).
 1.24 25-Mar-1999  is branches: 1.24.2; 1.24.4; 1.24.6;
defopt Amiga graphics console options
 1.23 14-Mar-1999  veego Add support for future PicassoIV's which use an autoconfig space of 64MB.
The framebuffer base address is then at a different offset.
The patch is from Klaus Burkert.
 1.22 17-Apr-1998  veego Don't use an 'register char' as an array index, change it to an int.
 1.21 12-Jan-1998  thorpej Adjust for changes to config.
 1.20 29-Jul-1997  veego - increase the number of possible grfmodes from 8 to 24
- changes for the grfconfig interface:
- Remove gv->{hblank_stop,vblank_stop} and calculate HBE and VBE from
gv->{htotal,vtotal}.
- Add support for gv->disp_flags to select interlace, doublescan and
horizontal/vertical sync polarity.
- Return EINVAL for gv->disp_flags and sync-on-green.
This makes it possible to use xfree values for grfconfig.
 1.19 05-Mar-1997  veego branches: 1.19.2;
- PicassoIV support
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- Clockdoubling for PicassoIV and PiccoloSD64
NOTE: Don't use the X11R6.1 Xserver with -useHWC on the SD64
with a gfxmode >80Mhz or you get a broken mousepointer.
- HiColor and TrueColor Support
(doesn't work yet, since it needs some fixes for the XServer)
 1.18 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.17 21-Oct-1996  veego Fix console problem on fast machines. pr#2777
 1.16 13-Oct-1996  christos backout previous kprintf change
 1.15 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.14 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.13 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.12 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.11 19-May-1996  veego branches: 1.11.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.10 28-Apr-1996  mhitch Cleanup for -Wall if CL5426CONSOLE is not defined.
 1.9 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.8 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.7 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 05-Mar-1996  is Fix problems with fast CPUs and Picasso boards. Patches originally by,
Klaus Burkert <crest@arkon.dontpanic.sub.org>, sent in by Ezra Story.
Closes port-amiga/2135.
k
 1.5 09-Oct-1995  chopps update from Ezra Story <ezy@panix.com>
 1.4 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 26-Jun-1995  chopps be sure of product from Ezra Story <ezy@panix.com>
 1.2 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.1 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.11.4.2 11-Jun-1996  is from trunk: leave room for darkerthan dark, which is now possible to add in the future in a compatible way; with jtc's permission
 1.11.4.1 27-May-1996  is Bug fixes for Piccolo SD64 by Bernd Ernesti, Michael Teske and Klaus Burkert.
 1.19.2.2 05-Mar-1997  veego - PicassoIV support
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- Clockdoubling for PicassoIV and PiccoloSD64
NOTE: Don't use the X11R6.1 Xserver with -useHWC on the SD64
with a gfxmode >80Mhz or you get a broken mousepointer.
- HiColor and TrueColor Support
(doesn't work yet, since it needs some fixes for the XServer)
 1.19.2.1 05-Mar-1997  veego file grf_cl.c was added on branch is-newarp on 1997-03-05 22:46:33 +0000
 1.24.6.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.24.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.24.2.1 02-Jul-1999  perry pullup 1.24->1.25 (is): Fix grf_cl console mode timing
 1.25.16.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.25.16.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.25.16.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.25.16.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.25.16.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.25.12.1 16-Aug-2001  tv Pullup [jdolecek]:

sys/arch/amiga/dev/grf_cl.c 1.26
sys/arch/amiga/dev/grfioctl.h 1.14
sys/arch/hpcmips/dev/plumvideo.c 1.20
sys/arch/macppc/dev/ofb.c 1.25
sys/arch/sparc/dev/cgtwo.c 1.35
sys/arch/sparc/include/fbio.h patch
sys/arch/sparc64/include/fbio.h patch
sys/arch/sun3/dev/cg2.c 1.14
sys/arch/sun3/include/fbio.h patch
sys/dev/pci/tga.c 1.35
sys/dev/tc/cfb.c 1.28
sys/dev/tc/mfb.c 1.27
sys/dev/tc/sfb.c 1.46
sys/dev/tc/sfbplus.c 1.10 via patch
sys/dev/tc/tfb.c 1.30
sys/dev/tc/xcfb.c 1.23
sys/net/if_ppp.c 1.71

Use unsigned variable types to make bounds checking more correct.
 1.26.6.7 03-Jan-2003  thorpej Sync with HEAD.
 1.26.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.26.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.26.6.4 20-Jun-2002  nathanw Catch up to -current.
 1.26.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.26.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.26.6.1 05-Aug-2001  nathanw file grf_cl.c was added on branch nathanw_sa on 2002-02-28 04:06:38 +0000
 1.30.4.1 07-Aug-2002  lukem Pull up revision 1.31 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.30.2.1 30-Aug-2002  gehenna catch up with -current.
 1.34.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.35.2.2 03-Sep-2007  yamt sync with head.
 1.35.2.1 30-Dec-2006  yamt sync with head.
 1.36.22.1 10-Dec-2006  yamt sync with head.
 1.36.20.1 12-Jan-2007  ad Sync with head.
 1.37.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.39.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.39.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.39.10.1 03-Oct-2007  garbled Sync with HEAD
 1.39.2.1 09-Oct-2007  ad Sync with head.
 1.40.2.1 06-Nov-2007  matt sync with HEAD
 1.41.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.41.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.41.20.2 11-Mar-2010  yamt sync with head
 1.41.20.1 04-May-2009  yamt sync with head.
 1.45.16.1 18-Feb-2012  mrg merge to -current.
 1.45.12.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.45.12.3 16-Jan-2013  yamt sync with (a bit old) head
 1.45.12.2 30-Oct-2012  yamt sync with head
 1.45.12.1 17-Apr-2012  yamt sync with head
 1.46.6.3 03-Dec-2017  jdolecek update from HEAD
 1.46.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.46.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.48.2.1 18-May-2014  rmind sync with head
 1.49.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.50.34.1 13-May-2021  thorpej Sync with HEAD.
 1.51.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.10 18-Dec-2008  mhitch Don't expose kernel functions when including these in the Xamiga server
build. Should fix the amiga build failures.
 1.9 24-Dec-2005  perry branches: 1.9.74; 1.9.78; 1.9.86;
bare asm -> __asm
 1.8 25-Apr-2002  aymeric branches: 1.8.26;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 21-Mar-1997  veego branches: 1.6.36; 1.6.40;
Add a missing test for the PicassoIV, which fix the colour problem.
 1.5 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.4 19-May-1996  veego branches: 1.4.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.3 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.2 05-Mar-1996  is Fix problems with fast CPUs and Picasso boards. Patches originally by,
Klaus Burkert <crest@arkon.dontpanic.sub.org>, sent in by Ezra Story.
Closes port-amiga/2135.
k
 1.1 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.4.4.1 27-May-1996  is Bug fixes for Piccolo SD64 by Bernd Ernesti, Michael Teske and Klaus Burkert.
 1.6.40.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.40.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.36.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.36.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.26.1 21-Jun-2006  yamt sync with head.
 1.9.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.78.1 04-May-2009  yamt sync with head.
 1.9.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.64 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.63 01-Jan-2022  msaitoh s/frambuffer/framebuffer/ in comment.
 1.62 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.61 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.60 27-Apr-2021  thorpej branches: 1.60.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.59 16-Nov-2015  phx branches: 1.59.34;
Fixed bug in wsdisplay copyrows textop.
Fixed WSDISPLAYIO_SVIDEO, which had inverted functionality.
Improved FBINFO setup. 15 and 16 bits depth both have 16bpp now.
 1.58 12-Nov-2015  phx Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.57 07-Nov-2015  phx Improved wscons support. Virtual screens are now working.
 1.56 22-Jan-2014  christos branches: 1.56.6;
gcc-4.8.x unused variable fixes
 1.55 08-Nov-2012  rkujawa branches: 1.55.2;
Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.54 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.53 15-Dec-2011  phx branches: 1.53.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.52 30-Jun-2011  wiz branches: 1.52.2; 1.52.6;
dependant -> dependent
 1.51 05-Feb-2010  phx Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.50 31-Jan-2010  phx Fixed for amigappc by executing eieio after writing to a vga register.
 1.49 30-Jan-2010  phx Fixed compiler warnings when CV_INT_NUM == 2 or CV64CONSOLE is not defined.
 1.48 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.47 18-Mar-2009  cegger bcopy -> memcpy
 1.46 17-Oct-2007  garbled branches: 1.46.20; 1.46.28; 1.46.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.45 20-Aug-2007  is branches: 1.45.2;
First part of amigappc support patches by Frank Wille.
 1.44 05-Mar-2007  he branches: 1.44.2; 1.44.10; 1.44.14; 1.44.18;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.43 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.42 24-Nov-2006  wiz branches: 1.42.4;
s/independant/independent/, from Zafer.
 1.41 03-Aug-2006  mhitch branches: 1.41.4; 1.41.6;
gcc4 checks for and warns about specifying a general register constraint
for operands that won't accept an address register. Change constraint
to specify only a data register.
 1.40 24-Dec-2005  perry branches: 1.40.4; 1.40.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.39 11-Dec-2005  christos merge ktrace-lwp.
 1.38 13-Jun-2005  jmc branches: 1.38.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.37 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.36 10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.35 31-May-2003  kristerw branches: 1.35.2;
Use __asm instead of asm, to keep lint happy.
 1.34 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.33 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.30 17-Mar-2002  atatat branches: 1.30.4; 1.30.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.29 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.28 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.27 25-Mar-1999  is branches: 1.27.22; 1.27.26;
defopt Amiga graphics console options
 1.26 06-Oct-1998  tron Add a few "nop" instructions to make the memory size probe more reliable.
 1.25 12-Jan-1998  thorpej Adjust for changes to config.
 1.24 30-Jul-1997  veego branches: 1.24.4;
Fix the doublescan mode which was broken in the last commit.
 1.23 29-Jul-1997  veego branches: 1.23.2;
- s/inline/__inline/
- Use interrrupt #6 instead of #2. #6 is the default interrupt and there
seems to be a problem with Cyberstorm 060 and #2.
- Set the interrupt register before enabling the interrupt.
- GC M2INS
- minor cleanup
- Switch from +hsync/+vsync to -hsync/-vsync.
- changes for the grfconfig interface:
- Remove gv->{hblank_stop,vblank_stop} and calculate HBE and VBE from
gv->{htotal,vtotal}.
- Add support for gv->disp_flags to select interlace, doublescan and
horizontal/vertical sync polarity.
- Return EINVAL for gv->disp_flags and sync-on-green.
This makes it possible to use xfree values for grfconfig.
 1.22 15-Jun-1997  veego Add a missing ; if CV64CONSOLE is undefined.
 1.21 25-May-1997  veego New Hardware Cursor support from Michael Teske.
 1.20 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.19 22-Oct-1996  veego Fix GRFTOGGLE.
The old version only toggles to the amiga signal and do not go back to
the CyberVision signal.
 1.18 13-Oct-1996  christos backout previous kprintf change
 1.17 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.16 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.15 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.14 19-May-1996  veego branches: 1.14.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.13 01-May-1996  veego Cleanup for -Wall if CV64CONSOLE, ULOWELLCONSOLE or RETINACONSOLE is not
defined.
 1.12 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.11 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.10 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.9 06-Mar-1996  is Back out change intended for netbsd-1-1 and accidentally committed here
 1.8 04-Mar-1996  is Fix for newer S3 chipsets by Matthias Scheler (from -current).
 1.7 02-Mar-1996  veego Updated for the new CyberVision64 console
gen_cvtab.c is no longer needed
 1.6 24-Feb-1996  chopps remove floating point expressions. gen_cvtab.c generates a conversion
table to replace a specific floating point expression in grf_cv.c
 1.5 27-Dec-1995  chopps fix for newer boards (pr#1829) from Matthias Scheler
 1.4 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.3 09-Oct-1995  chopps branches: 1.3.2;
fix use of uninit vars from Bernd Ernesti <bernd@arresum.inka.de>
 1.2 09-Oct-1995  chopps make work with newer grfconfig now in /usr/sbin. from
Bernd Ernesti <bernd@arresum.inka.de>
 1.1 09-Oct-1995  chopps new cybervision 64 from Bernd Ernesti <bernd@arresum.inka.de> (and others)
 1.3.2.4 06-Mar-1996  is Really commit Monday's fix to netbsd-1-1, where it was intended.
 1.3.2.3 10-Nov-1995  chopps final update to grf_cv device
 1.3.2.2 21-Oct-1995  chopps add rcsids
 1.3.2.1 20-Oct-1995  chopps some bug fixes from Bernd Ernesti <bernd@arresum.inka.de>
 1.14.4.1 11-Jun-1996  is from trunk: leave room for darkerthan dark, which is now possible to add in the future in a compatible way; with jtc's permission
 1.23.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.24.4.1 22-Nov-1998  cgd pull up rev 1.26 from trunk (veego)
 1.27.26.5 03-Jan-2003  thorpej Sync with HEAD.
 1.27.26.4 18-Oct-2002  nathanw Catch up to -current.
 1.27.26.3 13-Aug-2002  nathanw Catch up to -current.
 1.27.26.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.27.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.27.22.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.27.22.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.27.22.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.27.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.30.6.1 07-Aug-2002  lukem Pull up revision 1.31 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.30.4.1 30-Aug-2002  gehenna catch up with -current.
 1.35.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.35.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.35.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.35.2.1 03-Aug-2004  skrll Sync with HEAD
 1.38.2.3 03-Sep-2007  yamt sync with head.
 1.38.2.2 30-Dec-2006  yamt sync with head.
 1.38.2.1 21-Jun-2006  yamt sync with head.
 1.40.8.1 11-Aug-2006  yamt sync with head
 1.40.4.1 09-Sep-2006  rpaulo sync with head
 1.41.6.1 10-Dec-2006  yamt sync with head.
 1.41.4.1 12-Jan-2007  ad Sync with head.
 1.42.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.44.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.44.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.44.10.1 03-Oct-2007  garbled Sync with HEAD
 1.44.2.1 09-Oct-2007  ad Sync with head.
 1.45.2.1 06-Nov-2007  matt sync with HEAD
 1.46.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.46.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.46.20.2 11-Mar-2010  yamt sync with head
 1.46.20.1 04-May-2009  yamt sync with head.
 1.52.6.1 18-Feb-2012  mrg merge to -current.
 1.52.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.52.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.52.2.2 30-Oct-2012  yamt sync with head
 1.52.2.1 17-Apr-2012  yamt sync with head
 1.53.6.3 03-Dec-2017  jdolecek update from HEAD
 1.53.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.53.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.55.2.1 18-May-2014  rmind sync with head
 1.56.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.59.34.1 13-May-2021  thorpej Sync with HEAD.
 1.60.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.39 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.38 01-Jan-2022  msaitoh s/frambuffer/framebuffer/ in comment.
 1.37 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.36 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.35 27-Apr-2021  thorpej branches: 1.35.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.34 17-Jun-2016  phx branches: 1.34.34;
Remove the "totally untested" comments for the ZorroII frame buffer
select macro. The card is confirmed to work in an A2000.
 1.33 16-Nov-2015  phx Fixed bug in wsdisplay copyrows textop.
Fixed WSDISPLAYIO_SVIDEO, which had inverted functionality.
Improved FBINFO setup. 15 and 16 bits depth both have 16bpp now.
 1.32 12-Nov-2015  phx Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.31 07-Nov-2015  phx Improved wscons support. Virtual screens are now working.
 1.30 22-Jan-2014  christos branches: 1.30.6;
gcc-4.8.x unused variable fixes
 1.29 08-Nov-2012  rkujawa branches: 1.29.2;
Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.28 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.27 14-Oct-2012  phx CV3DONZORRO2 option is no longer needed.
grf_cv3d.c was successfully tested running in a Zorro2 slot.
 1.26 15-Dec-2011  phx branches: 1.26.2; 1.26.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.25 26-Oct-2009  cegger branches: 1.25.12; 1.25.16;
kill extra whitespaces
reviewed by tsutsui@
 1.24 18-Mar-2009  cegger bcopy -> memcpy
 1.23 17-Oct-2007  garbled branches: 1.23.20; 1.23.28; 1.23.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.22 20-Aug-2007  is branches: 1.22.2;
First part of amigappc support patches by Frank Wille.
 1.21 05-Mar-2007  he branches: 1.21.2; 1.21.10; 1.21.14; 1.21.18;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.20 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19 24-Nov-2006  wiz branches: 1.19.4;
s/independant/independent/, from Zafer.
 1.18 24-Dec-2005  perry branches: 1.18.20; 1.18.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.17 11-Dec-2005  christos merge ktrace-lwp.
 1.16 10-Nov-2003  wiz branches: 1.16.16;
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.15 31-May-2003  kristerw branches: 1.15.2;
Use __asm instead of asm, to keep lint happy.
 1.14 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.13 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 06-Aug-2002  itojun integer overflow. reported by silvio@qualys.com
 1.10 17-Mar-2002  atatat branches: 1.10.4; 1.10.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.9 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.8 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 25-Mar-1999  is branches: 1.7.18; 1.7.22; 1.7.26;
defopt Amiga graphics console options
 1.6 12-Jan-1998  thorpej Adjust for changes to config.
 1.5 20-Dec-1997  perry patch from is -- I don't know what it does, but he says it's critical.
 1.4 23-Nov-1997  veego Ups, forget a 'i'.
 1.3 09-Nov-1997  is - recognize CV3D in Zorro-II mode.
- use board address space > 4 MB, instead of iszthreepa(), to detect Z3-mode
boards. We dont want the bus, but want the address configuration.
- s/CV64CONSOLE/CV3DCONSOLE/
- s/cv3d_zorroIII == 1/cv3d_zorroIII/ and s/cv3d_zorroIII != 1/!cv3d_zorroIII/
 1.2 29-Oct-1997  veego The Console driver works now.
Added some fixes for Zorro2 mode, but keep it still disabled.
 1.1 19-Oct-1997  veego branches: 1.1.2;
First version of the CyberVision 3D driver. This driver is based on
the CyberVision64 driver. Modified by Tobias Abt with some bugfixes
from Bernd Ernesti.
ZorroII is at the moment not supported and there is a small problem
with the Console driver where you just get a black screen, but the
system boots and you can use X11 without a problem.
 1.1.2.4 20-Dec-1997  perry pullup patch from is -- he says it's critical.
 1.1.2.3 24-Nov-1997  mellon Pull rev 1.4 up from trunk (veego)
 1.1.2.2 11-Nov-1997  mellon Pull rev 1.3 up from trunk (is)
 1.1.2.1 30-Oct-1997  mellon Pull rev 1.2 up from trunk (veego)
 1.7.26.5 03-Jan-2003  thorpej Sync with HEAD.
 1.7.26.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.26.3 13-Aug-2002  nathanw Catch up to -current.
 1.7.26.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.22.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.22.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.22.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.7.18.1 04-Sep-2002  itojun pullup (itojun)

sys/arch/amiga/dev/grf_cv3d.c 1.11
sys/arch/hpcmips/dev/mq200.c 1.21
sys/arch/i386/i386/sys_machdep.c 1.64
sys/arch/luna68k/dev/lunafb.c 1.9
sys/arch/sparc/dev/bt_subr.c via patch
sys/arch/sparc64/dev/bt_subr.c via patch
sys/arch/sun3/dev/bt_subr.c via patch
sys/compat/ibcs2/ibcs2_stat.c 1.21-1.23
sys/dev/sun/bt_subr.c 1.3
sys/dev/tc/cfb.c 1.34
sys/dev/tc/sfb.c 1.53
sys/dev/tc/xcfb.c 1.29
integer overflow. reported by silvio@qualys.com
 1.10.6.1 07-Aug-2002  lukem Pull up revision 1.11 (requested by itojun in ticket #616):
integer overflow. reported by silvio@qualys.com
 1.10.4.1 30-Aug-2002  gehenna catch up with -current.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.3 03-Sep-2007  yamt sync with head.
 1.16.16.2 30-Dec-2006  yamt sync with head.
 1.16.16.1 21-Jun-2006  yamt sync with head.
 1.18.22.1 10-Dec-2006  yamt sync with head.
 1.18.20.1 12-Jan-2007  ad Sync with head.
 1.19.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.21.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.21.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.21.10.1 03-Oct-2007  garbled Sync with HEAD
 1.21.2.1 09-Oct-2007  ad Sync with head.
 1.22.2.1 06-Nov-2007  matt sync with HEAD
 1.23.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.23.20.2 11-Mar-2010  yamt sync with head
 1.23.20.1 04-May-2009  yamt sync with head.
 1.25.16.1 18-Feb-2012  mrg merge to -current.
 1.25.12.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.12.3 16-Jan-2013  yamt sync with (a bit old) head
 1.25.12.2 30-Oct-2012  yamt sync with head
 1.25.12.1 17-Apr-2012  yamt sync with head
 1.26.6.3 03-Dec-2017  jdolecek update from HEAD
 1.26.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.2.1 22-Nov-2012  riz Pull up following revision(s) (requested by phx in ticket #680):
sys/arch/amiga/dev/grf_cv3d.c: revision 1.27
sys/arch/amiga/conf/files.amiga: revision 1.162
CV3DONZORRO2 option is no longer needed.
grf_cv3d.c was successfully tested running in a Zorro2 slot.
 1.29.2.1 18-May-2014  rmind sync with head
 1.30.6.2 09-Jul-2016  skrll Sync with HEAD
 1.30.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.34.34.1 13-May-2021  thorpej Sync with HEAD.
 1.35.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.13 17-Jun-2016  phx Remove the "totally untested" comments for the ZorroII frame buffer
select macro. The card is confirmed to work in an A2000.
 1.12 22-Jan-2014  christos branches: 1.12.6;
gcc-4.8.x unused variable fixes
 1.11 12-Feb-2012  matt branches: 1.11.6; 1.11.10;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.10 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.9 05-Mar-2007  he branches: 1.9.78; 1.9.82;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.8 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 24-Dec-2005  perry branches: 1.7.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.6 31-May-2003  kristerw branches: 1.6.18;
Use __asm instead of asm, to keep lint happy.
 1.5 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 09-Nov-1997  is branches: 1.3.28; 1.3.32;
- recognize CV3D in Zorro-II mode.
- use board address space > 4 MB, instead of iszthreepa(), to detect Z3-mode
boards. We dont want the bus, but want the address configuration.
- s/CV64CONSOLE/CV3DCONSOLE/
- s/cv3d_zorroIII == 1/cv3d_zorroIII/ and s/cv3d_zorroIII != 1/!cv3d_zorroIII/
 1.2 29-Oct-1997  veego The Console driver works now.
Added some fixes for Zorro2 mode, but keep it still disabled.
 1.1 19-Oct-1997  veego branches: 1.1.2;
First version of the CyberVision 3D driver. This driver is based on
the CyberVision64 driver. Modified by Tobias Abt with some bugfixes
from Bernd Ernesti.
ZorroII is at the moment not supported and there is a small problem
with the Console driver where you just get a black screen, but the
system boots and you can use X11 without a problem.
 1.1.2.2 11-Nov-1997  mellon Pull rev 1.3 up from trunk (is)
 1.1.2.1 30-Oct-1997  mellon Pull rev 1.2 up from trunk (veego)
 1.3.32.2 20-Jun-2002  nathanw Catch up to -current.
 1.3.32.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.28.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.28.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.18.2 03-Sep-2007  yamt sync with head.
 1.6.18.1 21-Jun-2006  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.82.1 18-Feb-2012  mrg merge to -current.
 1.9.78.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.78.1 17-Apr-2012  yamt sync with head
 1.11.10.1 18-May-2014  rmind sync with head
 1.11.6.2 03-Dec-2017  jdolecek update from HEAD
 1.11.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.6.1 09-Jul-2016  skrll Sync with HEAD
 1.20 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.19 12-Feb-2012  matt branches: 1.19.6; 1.19.10;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.18 15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.17 21-May-2011  christos branches: 1.17.4; 1.17.8;
ifdef _KERNEL the inlines
 1.16 09-Feb-2010  phx branches: 1.16.2; 1.16.4;
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
 1.15 05-Feb-2010  phx branches: 1.15.2;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.14 31-Jan-2010  phx Fixed for amigappc by executing eieio after writing to a vga register.
 1.13 18-Dec-2008  mhitch Don't expose kernel functions when including these in the Xamiga server
build. Should fix the amiga build failures.
 1.12 05-Mar-2007  he branches: 1.12.40; 1.12.44; 1.12.52;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.11 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 24-Dec-2005  perry branches: 1.10.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 31-May-2003  kristerw branches: 1.9.18;
Use __asm instead of asm, to keep lint happy.
 1.8 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 29-Jul-1997  veego branches: 1.6.34; 1.6.38;
s/inline/__inline/
 1.5 19-May-1996  veego - grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.4 02-Mar-1996  veego Updated for the new CyberVision64 console
gen_cvtab.c is no longer needed
 1.3 27-Dec-1995  chopps fix for newer boards (pr#1829) from Matthias Scheler
 1.2 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.1 09-Oct-1995  chopps branches: 1.1.2;
new cybervision 64 from Bernd Ernesti <bernd@arresum.inka.de> (and others)
 1.1.2.3 12-Mar-1996  is Patch for new version of S3 chips; from -current.
 1.1.2.2 10-Nov-1995  chopps final update to grf_cv device
 1.1.2.1 21-Oct-1995  chopps add rcsids
 1.6.38.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.38.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.34.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.34.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.18.2 03-Sep-2007  yamt sync with head.
 1.9.18.1 21-Jun-2006  yamt sync with head.
 1.10.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.12.44.2 11-Mar-2010  yamt sync with head
 1.12.44.1 04-May-2009  yamt sync with head.
 1.12.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.15.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.16.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.2.1 31-May-2011  rmind sync with head
 1.17.8.1 18-Feb-2012  mrg merge to -current.
 1.17.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.4.1 17-Apr-2012  yamt sync with head
 1.19.10.1 18-May-2014  rmind sync with head
 1.19.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.40 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.39 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.38 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.37 27-Apr-2021  thorpej branches: 1.37.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.36 05-Mar-2018  rin branches: 1.36.20;
Remove duplicate vgaw() accidentally introduced in the previous revision.
 1.35 05-Mar-2018  christos use an inline function for the "4 reads"
 1.34 04-Mar-2018  mrg avoid gcc 6 indentation issues. rewrite:
if (vgar()); if (vgar()); if (vgar()); if (vgar());
as
vgar();
vgar();
vgar();
vgar();

verified the ass output has the 4 reads (the macro uses a
volatile pointer, so it should remain so too.)
 1.33 04-Nov-2016  phx wscons and Xorg support for Tseng ET4000/W32 based boards (grf6).
 1.32 22-Jan-2014  christos branches: 1.32.6; 1.32.10;
gcc-4.8.x unused variable fixes
 1.31 08-Nov-2012  rkujawa branches: 1.31.2;
Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.30 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.29 15-Dec-2011  phx branches: 1.29.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.28 26-Oct-2009  cegger branches: 1.28.12; 1.28.16;
kill extra whitespaces
reviewed by tsutsui@
 1.27 18-Mar-2009  cegger bcopy -> memcpy
 1.26 17-Oct-2007  garbled branches: 1.26.20; 1.26.28; 1.26.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.25 20-Aug-2007  is branches: 1.25.2;
First part of amigappc support patches by Frank Wille.
 1.24 05-Mar-2007  he branches: 1.24.2; 1.24.10; 1.24.14; 1.24.18;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.23 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 24-Nov-2006  wiz branches: 1.22.4;
s/independant/independent/, from Zafer.
 1.21 18-Apr-2003  is branches: 1.21.18; 1.21.48; 1.21.50;
fix fatal typo
 1.20 18-Apr-2003  is iszthreepa() takes a physical address, not a virtual address.
This fixes PR 19175, reported and heavily debugged by Pawel Chwalowski.
 1.19 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.18 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.17 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.16 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.15 17-Mar-2002  atatat branches: 1.15.4; 1.15.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.14 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.13 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.12 25-Mar-1999  is branches: 1.12.18; 1.12.22; 1.12.26;
defopt Amiga graphics console options
 1.11 12-Jan-1998  thorpej Adjust for changes to config.
 1.10 29-Jul-1997  veego - increase the number of possible grfmodes from 8 to 24
- changes for the grfconfig interface:
- Remove gv->{hblank_stop,vblank_stop} and calculate HBE and VBE from
gv->{htotal,vtotal}.
- Add support for gv->disp_flags to select interlace, doublescan and
horizontal/vertical sync polarity.
- Return EINVAL for gv->disp_flags and sync-on-green.
This makes it possible to use xfree values for grfconfig.
 1.9 05-Mar-1997  veego branches: 1.9.2;
- Merlin works now in ZorroIII mode
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- HiColor and TrueColor Support
- support for the Domino 16M proto card
 1.8 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.7 13-Oct-1996  christos backout previous kprintf change
 1.6 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.5 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.4 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.3 09-Jun-1996  veego Make this really work on the Domino. Patch from Klaus Burkert
 1.2 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.1 19-May-1996  veego branches: 1.1.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.1.4.5 11-Jun-1996  is from trunk: leave room for darkerthan dark, which is now possible to add in the future in a compatible way; with jtc's permission
 1.1.4.4 11-Jun-1996  veego put a few spaces around some ='s
 1.1.4.3 11-Jun-1996  thorpej Pullup from trunk, at veego's request.
 1.1.4.2 04-Jun-1996  is Minimalist change to make this driver behave like the others on GRFIOCBLANK
and FBIOCSVIDEO.
 1.1.4.1 27-May-1996  is Fixes by Tobias Abt for Amiga Tseng driver: handle Zorro-III variants of these
boards correctly.
 1.9.2.2 05-Mar-1997  veego - Merlin works now in ZorroIII mode
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- HiColor and TrueColor Support
- support for the Domino 16M proto card
 1.9.2.1 05-Mar-1997  veego file grf_et.c was added on branch is-newarp on 1997-03-05 22:50:39 +0000
 1.12.26.5 03-Jan-2003  thorpej Sync with HEAD.
 1.12.26.4 18-Oct-2002  nathanw Catch up to -current.
 1.12.26.3 13-Aug-2002  nathanw Catch up to -current.
 1.12.26.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.12.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.12.22.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.12.22.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.12.22.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.18.1 27-May-2003  msaitoh Pullup rev. 1.20-1.21 (requested by Ignatios in ticket #42)
iszthreepa() takes a physical address, not a virtual address.
Fixes PR#19175
 1.15.6.2 16-Jun-2003  grant Pull up revisions 1.20-1.21 (requested by is in ticket #1266):

iszthreepa() takes a physical address, not a virtual address.
This fixes PR 19175, reported and heavily debugged by Pawel
Chwalowski.

fix fatal typo
 1.15.6.1 07-Aug-2002  lukem Pull up revision 1.16 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.15.4.1 30-Aug-2002  gehenna catch up with -current.
 1.21.50.1 10-Dec-2006  yamt sync with head.
 1.21.48.1 12-Jan-2007  ad Sync with head.
 1.21.18.2 03-Sep-2007  yamt sync with head.
 1.21.18.1 30-Dec-2006  yamt sync with head.
 1.22.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.24.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.24.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.24.10.1 03-Oct-2007  garbled Sync with HEAD
 1.24.2.1 09-Oct-2007  ad Sync with head.
 1.25.2.1 06-Nov-2007  matt sync with HEAD
 1.26.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.26.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.26.20.2 11-Mar-2010  yamt sync with head
 1.26.20.1 04-May-2009  yamt sync with head.
 1.28.16.1 18-Feb-2012  mrg merge to -current.
 1.28.12.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.12.3 16-Jan-2013  yamt sync with (a bit old) head
 1.28.12.2 30-Oct-2012  yamt sync with head
 1.28.12.1 17-Apr-2012  yamt sync with head
 1.29.6.3 03-Dec-2017  jdolecek update from HEAD
 1.29.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.2.1 18-May-2014  rmind sync with head
 1.32.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.32.6.1 05-Dec-2016  skrll Sync with HEAD
 1.36.20.1 13-May-2021  thorpej Sync with HEAD.
 1.37.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.7 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 24-Dec-2005  perry branches: 1.6.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 26-Jan-2002  aymeric branches: 1.5.32;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 29-Jul-1997  veego branches: 1.4.34; 1.4.38;
s/inline/__inline/
 1.3 05-Mar-1997  veego branches: 1.3.2;
- Merlin works now in ZorroIII mode
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- HiColor and TrueColor Support
- support for the Domino 16M proto card
 1.2 09-Jun-1996  veego Make this really work on the Domino. Patch from Klaus Burkert
 1.1 19-May-1996  veego branches: 1.1.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.1.4.2 11-Jun-1996  thorpej Pullup from trunk, at veego's request.
 1.1.4.1 27-May-1996  is Fixes by Tobias Abt for Amiga Tseng driver: handle Zorro-III variants of these
boards correctly.
 1.3.2.2 05-Mar-1997  veego - Merlin works now in ZorroIII mode
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- HiColor and TrueColor Support
- support for the Domino 16M proto card
 1.3.2.1 05-Mar-1997  veego file grf_etreg.h was added on branch is-newarp on 1997-03-05 22:50:41 +0000
 1.4.38.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.34.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.32.2 03-Sep-2007  yamt sync with head.
 1.5.32.1 21-Jun-2006  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.62 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.61 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.60 09-Aug-2021  andvar s/definitons/definitions/
 1.59 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.58 27-Apr-2021  thorpej branches: 1.58.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.57 22-Jan-2014  christos branches: 1.57.46;
gcc-4.8.x unused variable fixes
 1.56 08-Nov-2012  rkujawa branches: 1.56.2;
Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.55 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.54 15-Dec-2011  phx branches: 1.54.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.53 26-Oct-2009  cegger branches: 1.53.12; 1.53.16;
kill extra whitespaces
reviewed by tsutsui@
 1.52 18-Mar-2009  cegger bcopy -> memcpy
 1.51 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.50 17-Oct-2007  garbled branches: 1.50.20; 1.50.28; 1.50.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.49 20-Aug-2007  is branches: 1.49.2;
First part of amigappc support patches by Frank Wille.
 1.48 05-Mar-2007  he branches: 1.48.2; 1.48.10; 1.48.14; 1.48.18;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.47 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.46 24-Nov-2006  wiz branches: 1.46.4;
s/independant/independent/, from Zafer.
 1.45 24-Dec-2005  perry branches: 1.45.20; 1.45.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.44 11-Dec-2005  christos merge ktrace-lwp.
 1.43 13-Jun-2005  jmc branches: 1.43.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.42 31-May-2003  kristerw branches: 1.42.2;
Use __asm instead of asm, to keep lint happy.
 1.41 20-Jan-2003  simonb The Double-Semi-Colon Police.
 1.40 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.39 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.38 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.37 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.36 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.35 17-Mar-2002  atatat branches: 1.35.4; 1.35.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.34 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.33 27-Jan-2002  is Add some video modes which are displayable on my LCD.
 1.32 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.31 20-Aug-2001  wiz branches: 1.31.6;
"wierd" is weird.
 1.30 26-Jul-2001  wiz Various typos in comments (neccessary, sceme, choise, ...).
 1.29 25-Mar-1999  is branches: 1.29.22;
defopt Amiga graphics console options
 1.28 12-Jan-1998  thorpej Adjust for changes to config.
 1.27 29-Jul-1997  veego - Change the check in r[ht]_getvmode for md->DEP == 4 to md->DEP != 4.
This fixes a wrong output from grfconfig /dev/grf[23]
- changes for the grfconfig interface:
- Remove gv->hblank_stop and gv->vblank_stop.
- Only print doublescan and interlace flags. Horizontal/vertical sync
polarities are not yet supported and sync-on-green will never be
supported.
 1.26 31-Dec-1996  is First part of making hardware cursor actually work.
For some reason it wouldn't get positioned right when mapped in through the
blitter memory mapped location, so switched to the register mapping, which
works.
XXX colormap handling for the cursor is still broken.
 1.25 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.24 13-Oct-1996  christos backout previous kprintf change
 1.23 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.22 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.21 11-Aug-1996  veego Disable the Hardwarecursor on the RetinaZ3 to solve the problems with
wrong mouse jumps under X11.
Remove the not working options KGDB from DRACO and GENERIC and added
an option to enable the HWC for the RetinaZ3
 1.20 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.19 24-May-1996  is Delete some occurences of kernel startup debug code, move others inside
#ifdef DEBUG_KERNEL_START.
 1.18 24-May-1996  is Make the GRFIOCBLANK ioctl set the right timing divisor when switching the
screen back on.
 1.17 19-May-1996  veego branches: 1.17.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.16 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.15 01-May-1996  veego Cleanup for -Wall if CV64CONSOLE, ULOWELLCONSOLE or RETINACONSOLE is not
defined.
 1.14 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.13 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.12 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.11 06-Mar-1996  is Altais graphics board support, and some nicer formatting of preconftab.
Closes PR #1812 by myself.
 1.10 28-Jan-1996  chopps applied patch from 1811 which unifies mode support across gfx boards.
 1.9 20-Aug-1995  chopps rename RZ3_64BIT_SPRITE to RH_64BIT_SPRITE
 1.8 20-Aug-1995  chopps make defaults more accessable.
 1.7 20-Aug-1995  chopps fix grf_rh problem with sprite and allow mode changing.
from mw@eunet.ch (Markus Wild)
 1.6 16-Feb-1995  chopps cleanup copyright stuff
 1.5 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.1 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.17.4.3 06-Sep-1996  jtc Pulled up rev 1.21 by request from Bernd Ernesti
 1.17.4.2 11-Jun-1996  is from trunk: leave room for darkerthan dark, which is now possible to add in the future in a compatible way; with jtc's permission
 1.17.4.1 26-May-1996  is Pull up of bug fixes for Retina screenblank ioctl and an unused variable
warning from if_ae when building INSTALL (that is, without bpfilter) kernels.
 1.29.22.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.29.22.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.29.22.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.29.22.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.29.22.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.29.22.1 03-Aug-2001  lukem update to -current
 1.31.6.7 03-Jan-2003  thorpej Sync with HEAD.
 1.31.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.31.6.5 17-Sep-2002  nathanw Catch up to -current.
 1.31.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.31.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.31.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.31.6.1 20-Aug-2001  nathanw file grf_rh.c was added on branch nathanw_sa on 2002-02-28 04:06:40 +0000
 1.35.6.1 07-Aug-2002  lukem Pull up revision 1.36 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.35.4.2 30-Aug-2002  gehenna catch up with -current.
 1.35.4.1 16-May-2002  gehenna Remove BANKEDDEVPAGER stuff.
 1.42.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.43.2.3 03-Sep-2007  yamt sync with head.
 1.43.2.2 30-Dec-2006  yamt sync with head.
 1.43.2.1 21-Jun-2006  yamt sync with head.
 1.45.22.1 10-Dec-2006  yamt sync with head.
 1.45.20.1 12-Jan-2007  ad Sync with head.
 1.46.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.48.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.48.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.48.10.1 03-Oct-2007  garbled Sync with HEAD
 1.48.2.1 09-Oct-2007  ad Sync with head.
 1.49.2.1 06-Nov-2007  matt sync with HEAD
 1.50.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.50.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.50.20.2 11-Mar-2010  yamt sync with head
 1.50.20.1 04-May-2009  yamt sync with head.
 1.53.16.1 18-Feb-2012  mrg merge to -current.
 1.53.12.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.53.12.3 16-Jan-2013  yamt sync with (a bit old) head
 1.53.12.2 30-Oct-2012  yamt sync with head
 1.53.12.1 17-Apr-2012  yamt sync with head
 1.54.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.56.2.1 18-May-2014  rmind sync with head
 1.57.46.1 13-May-2021  thorpej Sync with HEAD.
 1.58.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.18 20-Jul-2024  andvar s/hardwar-cursor/hardware-cursor/, s/hardrare/hardware/ in comments.
 1.17 03-May-2022  andvar branches: 1.17.10;
fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.16 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15 24-Dec-2005  perry branches: 1.15.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 24-Feb-2004  wiz branches: 1.13.16;
parameter with two es. From Peter Postma.
 1.12 10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.11 05-Feb-2003  perry branches: 1.11.2;
"Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.10 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.9 13-Mar-2000  soren branches: 1.9.8; 1.9.12;
Fix doubled 'the's in comments.
 1.8 29-Jul-1997  veego branches: 1.8.20;
s/inline/__inline/
 1.7 19-May-1996  veego - grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.6 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.5 20-Aug-1995  chopps fix grf_rh problem with sprite and allow mode changing.
from mw@eunet.ch (Markus Wild)
 1.4 16-Feb-1995  chopps cleanup copyright stuff
 1.3 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.8.20.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.9.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.9.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.16.2 03-Sep-2007  yamt sync with head.
 1.13.16.1 21-Jun-2006  yamt sync with head.
 1.15.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.17.10.1 02-Aug-2025  perseant Sync with HEAD
 1.62 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.61 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.60 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.59 27-Apr-2021  thorpej branches: 1.59.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.58 18-Oct-2014  snj branches: 1.58.36;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.57 08-Nov-2012  rkujawa Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.56 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.55 15-Dec-2011  phx branches: 1.55.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.54 26-Oct-2009  cegger branches: 1.54.12; 1.54.16;
kill extra whitespaces
reviewed by tsutsui@
 1.53 18-Mar-2009  cegger bcopy -> memcpy
 1.52 05-Mar-2007  he branches: 1.52.44; 1.52.52; 1.52.58;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.51 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.50 11-Dec-2005  christos branches: 1.50.26;
merge ktrace-lwp.
 1.49 13-Jun-2005  jmc branches: 1.49.2;
Fix some shadowing of variables
 1.48 20-Jan-2003  simonb branches: 1.48.2;
The Double-Semi-Colon Police.
 1.47 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.46 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.45 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.44 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.43 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.42 17-Mar-2002  atatat branches: 1.42.4; 1.42.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.41 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.40 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.39 20-Aug-2001  wiz branches: 1.39.6;
"wierd" is weird.
 1.38 26-Jul-2001  wiz Various typos in comments (neccessary, sceme, choise, ...).
 1.37 25-Mar-1999  is branches: 1.37.22;
defopt Amiga graphics console options
 1.36 12-Jan-1998  thorpej Adjust for changes to config.
 1.35 29-Jul-1997  veego - Change the check in r[ht]_getvmode for md->DEP == 4 to md->DEP != 4.
This fixes a wrong output from grfconfig /dev/grf[23]
- changes for the grfconfig interface:
- Remove gv->hblank_stop and gv->vblank_stop.
- Only print doublescan and interlace flags. Horizontal/vertical sync
polarities are not yet supported and sync-on-green will never be
supported.
 1.34 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.33 13-Oct-1996  christos backout previous kprintf change
 1.32 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.31 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.30 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.29 25-May-1996  is Fix stupid pasto.
 1.28 24-May-1996  is Make the GRFIOCBLANK ioctl set the right timing divisor when switching the
screen back on.
 1.27 19-May-1996  veego branches: 1.27.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.26 01-May-1996  veego Cleanup for -Wall if CV64CONSOLE, ULOWELLCONSOLE or RETINACONSOLE is not
defined.
 1.25 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.24 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.23 28-Jan-1996  chopps applied patch from 1811 which unifies mode support across gfx boards.
 1.22 23-Feb-1995  chopps fix warnings (br#816)
 1.21 16-Feb-1995  chopps cleanup copyright stuff
 1.20 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.18 26-Oct-1994  cgd new RCS ID format.
 1.17 31-Jul-1994  chopps branches: 1.17.2;
fix default frequency so that normal VGA monitor types don't puke.
 1.16 23-Jun-1994  chopps branches: 1.16.2;
some various fixes from ahh@netcom.com (Andy Heffernan)
 1.15 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.14 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.13 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.12 03-Jun-1994  chopps z buses early config support, needs testing.
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 26-Apr-1994  chopps don't reinit board twice if it works once.
 1.9 22-Apr-1994  chopps Changed fonts. Added 2 non (c) fonts kf_8x{8,11}.c retina now uses
kf_8x8. CC console users can now choose between the provided fonts
or provide there own.
 1.8 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.7 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3 31-Oct-1993  mw Change gfx-drivers to used g_data for their private data, and use regaddr
for what it's meant, that's to point to the register area. Now, both
gfx drivers should be fairly controllable from user-level applications.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.16.2.1 03-Aug-1994  cgd from trunk.
 1.17.2.2 31-Jul-1994  chopps fix default frequency so that normal VGA monitor types don't puke.
 1.17.2.1 31-Jul-1994  chopps file grf_rt.c was added on branch netbsd-1-0 on 1994-07-31 18:42:07 +0000
 1.27.4.2 11-Jun-1996  is from trunk: leave room for darkerthan dark, which is now possible to add in the future in a compatible way; with jtc's permission
 1.27.4.1 26-May-1996  is Pull up of bug fixes for Retina screenblank ioctl and an unused variable
warning from if_ae when building INSTALL (that is, without bpfilter) kernels.
 1.37.22.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.37.22.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.37.22.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.37.22.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.37.22.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.37.22.1 03-Aug-2001  lukem update to -current
 1.39.6.7 03-Jan-2003  thorpej Sync with HEAD.
 1.39.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.39.6.5 17-Sep-2002  nathanw Catch up to -current.
 1.39.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.39.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.39.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.39.6.1 20-Aug-2001  nathanw file grf_rt.c was added on branch nathanw_sa on 2002-02-28 04:06:41 +0000
 1.42.6.1 07-Aug-2002  lukem Pull up revision 1.43 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.42.4.2 30-Aug-2002  gehenna catch up with -current.
 1.42.4.1 16-May-2002  gehenna Remove BANKEDDEVPAGER stuff.
 1.48.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.49.2.1 03-Sep-2007  yamt sync with head.
 1.50.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.52.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.52.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.52.44.2 11-Mar-2010  yamt sync with head
 1.52.44.1 04-May-2009  yamt sync with head.
 1.54.16.1 18-Feb-2012  mrg merge to -current.
 1.54.12.3 16-Jan-2013  yamt sync with (a bit old) head
 1.54.12.2 30-Oct-2012  yamt sync with head
 1.54.12.1 17-Apr-2012  yamt sync with head
 1.55.6.2 03-Dec-2017  jdolecek update from HEAD
 1.55.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.58.36.1 13-May-2021  thorpej Sync with HEAD.
 1.59.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.17 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.16 28-Feb-2010  snj Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.
 1.15 04-Mar-2007  christos branches: 1.15.44; 1.15.64;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14 24-Dec-2005  perry branches: 1.14.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.13 11-Dec-2005  christos merge ktrace-lwp.
 1.12 10-Nov-2003  wiz branches: 1.12.16;
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.11 26-Jan-2002  aymeric branches: 1.11.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 26-Jul-2001  wiz branches: 1.10.6;
Various typos in comments (neccessary, sceme, choise, ...).
 1.9 13-Mar-2000  soren branches: 1.9.8;
Fix doubled 'the's in comments.
 1.8 29-Jul-1997  veego branches: 1.8.20;
s/inline/__inline/
 1.7 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.6 16-Feb-1995  chopps cleanup copyright stuff
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.8.20.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.9.8.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.8.1 03-Aug-2001  lukem update to -current
 1.10.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.10.6.1 26-Jul-2001  nathanw file grf_rtreg.h was added on branch nathanw_sa on 2002-02-28 04:06:42 +0000
 1.11.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.16.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.2 03-Sep-2007  yamt sync with head.
 1.12.16.1 21-Jun-2006  yamt sync with head.
 1.14.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.64.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.15.44.1 11-Mar-2010  yamt sync with head
 1.6 01-Mar-1995  mycroft Clean up deleted files.
 1.5 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.56 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.55 28-Aug-2023  andvar rename DEBUG_UL to UL_DEBUG for naming consistency.
remove stray UL_DEBUG definition in grf_ul.c
 1.54 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.53 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.52 27-Apr-2021  thorpej branches: 1.52.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.51 03-Nov-2016  kamil branches: 1.51.32;
Prefer modern simple past tense and past participle of catch

The "catched" form is obsolete and nonstandard, prefer "caught".
 1.50 22-Jan-2014  christos branches: 1.50.6; 1.50.10;
gcc-4.8.x unused variable fixes
 1.49 08-Nov-2012  rkujawa branches: 1.49.2;
Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
 1.48 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.47 15-Dec-2011  phx branches: 1.47.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.46 26-Oct-2009  cegger branches: 1.46.12; 1.46.16;
kill extra whitespaces
reviewed by tsutsui@
 1.45 18-Mar-2009  cegger bcopy -> memcpy
 1.44 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.43 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.42 28-Apr-2008  martin branches: 1.42.8; 1.42.14;
Remove clause 3 and 4 from TNF licenses
 1.41 05-Mar-2007  he branches: 1.41.40; 1.41.42; 1.41.44;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.40 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.39 24-Dec-2005  perry branches: 1.39.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.38 11-Dec-2005  christos merge ktrace-lwp.
 1.37 13-Feb-2004  wiz branches: 1.37.16;
Uppercase CPU, plural is CPUs.
 1.36 06-Jan-2003  wiz branches: 1.36.2;
interrupt with two rs.
 1.35 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.34 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.33 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.32 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.31 17-Mar-2002  atatat branches: 1.31.4; 1.31.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.30 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.29 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.28 25-Mar-1999  is branches: 1.28.22; 1.28.26;
defopt Amiga graphics console options
 1.27 16-Feb-1999  is Fix Copyright dates
 1.26 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.25 12-Jan-1998  thorpej Adjust for changes to config.
 1.24 29-Jul-1997  veego - changes for the grfconfig interface (provided by Ignatios Souvatzis):
- Remove gv->{hblank_stop,vblank_stop} and use the other grfvideo_mode
values to set ba->data.
- Add gv->disp_flags to select interlace.
- Not yet supported are: doublescan, sync-on-green and the horizontal/vertical
sync polarity.
This makes it possible to use xfree values for grfconfig.
 1.23 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.22 13-Oct-1996  christos backout previous kprintf change
 1.21 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.20 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.19 08-Jul-1996  is Cleaned up copyright notice, fixed a typo, and sync the comment in the
GSP assembler file with reality.
 1.18 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.17 09-May-1996  is branches: 1.17.4;
First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.16 01-May-1996  veego Cleanup for -Wall if CV64CONSOLE, ULOWELLCONSOLE or RETINACONSOLE is not
defined.
 1.15 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.14 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.13 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.12 04-Mar-1996  is Grr... my fault when send-pr'ing the "CPU too fast" error patch. The chip
is called BT458, not BT478.
 1.11 28-Jan-1996  chopps fix bounds check #1939
 1.10 27-Dec-1995  chopps add support for GRFIOCBLANK (pr#1810) from Ignatios Souvatzis
 1.9 27-Dec-1995  chopps fix initializtion (pr#1853) from Ignatios Souvatzis
 1.8 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.7 09-Oct-1995  chopps branches: 1.7.2;
update from Ignatios Souvatzis <is@beverly.rhein.de>
 1.6 09-Oct-1995  chopps new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.5 07-Oct-1995  chopps update from Ignatios Souvatzis <is@beverly.rhein.de>
 1.4 07-Oct-1995  chopps transpose osc values from Ignatios Souvatzis <is@beverly.rhein.de>
 1.3 29-Sep-1995  chopps fix wrong arg to strncpy
 1.2 18-Aug-1995  chopps resolve conflict with grf_rt over monitor_defs symbol
 1.1 18-Aug-1995  chopps new a2410 driver from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.7.2.2 04-Mar-1996  is Two bug fixes from -current:
1) remove a timing assumption in grf_ul.c which breaks on Amigas with
68040 accelerator boards
2) correct an off-by-one error in a test which made grf_ul reject the last
monitor definition in the table.
 1.7.2.1 10-Nov-1995  chopps update grf_ul; support files now only used if needed.
 1.17.4.1 11-Jun-1996  is from trunk: leave room for darkerthan dark, which is now possible to add in the future in a compatible way; with jtc's permission
 1.28.26.6 07-Jan-2003  thorpej Sync with HEAD.
 1.28.26.5 03-Jan-2003  thorpej Sync with HEAD.
 1.28.26.4 18-Oct-2002  nathanw Catch up to -current.
 1.28.26.3 13-Aug-2002  nathanw Catch up to -current.
 1.28.26.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.28.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.28.22.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.22.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.28.22.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.28.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.31.6.1 07-Aug-2002  lukem Pull up revision 1.32 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.31.4.1 30-Aug-2002  gehenna catch up with -current.
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.37.16.2 03-Sep-2007  yamt sync with head.
 1.37.16.1 21-Jun-2006  yamt sync with head.
 1.39.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.41.44.3 11-Mar-2010  yamt sync with head
 1.41.44.2 04-May-2009  yamt sync with head.
 1.41.44.1 16-May-2008  yamt sync with head.
 1.41.42.1 18-May-2008  yamt sync with head.
 1.41.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.42.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.42.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.46.16.1 18-Feb-2012  mrg merge to -current.
 1.46.12.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.46.12.3 16-Jan-2013  yamt sync with (a bit old) head
 1.46.12.2 30-Oct-2012  yamt sync with head
 1.46.12.1 17-Apr-2012  yamt sync with head
 1.47.6.3 03-Dec-2017  jdolecek update from HEAD
 1.47.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.47.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.49.2.1 18-May-2014  rmind sync with head
 1.50.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.50.6.1 05-Dec-2016  skrll Sync with HEAD
 1.51.32.1 13-May-2021  thorpej Sync with HEAD.
 1.52.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.2 27-Dec-1995  chopps rename grf_ul.gsp
 1.1 18-Aug-1995  chopps branches: 1.1.2;
new a2410 driver from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.1.2.1 10-Nov-1995  chopps update grf_ul; support files now only used if needed.
 1.10 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.9 05-Mar-2007  he branches: 1.9.40; 1.9.42; 1.9.44;
Make the various graphics card drivers compile again.
Use casts to char* before pointer arithmetic.
Try to preserve `volatile' qualification where possible, though
uses of kvtop(), strcpy(), copyin() and copyout() gain an unfortunate
but probably unavoidable __UNVOLATILE().
Correct various instances of "void *ba, fb" to have * in front of fb as well.
Remove some redundant parenthesis pairs in some of the vga* macros.
 1.8 24-Dec-2005  perry branches: 1.8.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 26-Jan-2002  aymeric branches: 1.7.32;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 16-Feb-1999  is branches: 1.6.22; 1.6.26;
Fix Copyright dates
 1.5 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.4 08-Jul-1996  is Cleaned up copyright notice, fixed a typo, and sync the comment in the
GSP assembler file with reality.
 1.3 31-Dec-1995  chopps explicitly mask the address value
 1.2 07-Oct-1995  chopps update from Ignatios Souvatzis <is@beverly.rhein.de>
 1.1 18-Aug-1995  chopps new a2410 driver from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.6.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.7.32.2 03-Sep-2007  yamt sync with head.
 1.7.32.1 21-Jun-2006  yamt sync with head.
 1.8.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.44.1 16-May-2008  yamt sync with head.
 1.9.42.1 18-May-2008  yamt sync with head.
 1.9.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 26-May-2002  jdolecek branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
regen (RCS Id fix)
 1.1 26-May-2002  jdolecek pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.2.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.8.1 26-May-2002  jdolecek file grf_ultms.c was added on branch kqueue on 2002-06-23 17:34:28 +0000
 1.2.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.6.1 26-May-2002  nathanw file grf_ultms.c was added on branch nathanw_sa on 2002-06-20 03:37:53 +0000
 1.2.4.2 30-May-2002  gehenna Catch up with -current.
 1.2.4.1 26-May-2002  gehenna file grf_ultms.c was added on branch gehenna-devsw on 2002-05-30 15:32:34 +0000
 1.2.2.3 28-May-2002  tv Pull up revision 1.2 (requested by jdolecek):
regen (RCS Id fix)
 1.2.2.2 28-May-2002  tv Pull up revision 1.1 (requested by jdolecek):
pregenerate grf_ultms.c, so that gspa isn't needed during kernel build
 1.2.2.1 26-May-2002  tv file grf_ultms.c was added on branch netbsd-1-6 on 2002-05-28 19:34:58 +0000
 1.10 09-Nov-2009  is Move to two-clause license.
 1.9 11-Dec-2005  christos branches: 1.9.78;
merge ktrace-lwp.
 1.8 16-Jul-2003  is Update comments.
 1.7 26-May-2002  jdolecek branches: 1.7.6;
update comments
 1.6 26-Jan-2002  aymeric branches: 1.6.8; 1.6.10;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.5 13-Jun-2001  wiz branches: 1.5.2; 1.5.8;
withough -> without
 1.4 05-Jan-1998  perry branches: 1.4.26;
RCSID Police.
 1.3 08-Jul-1996  is Cleaned up copyright notice, fixed a typo, and sync the comment in the
GSP assembler file with reality.
 1.2 27-Dec-1995  chopps rename grf_ul.gsp
 1.1 10-Nov-1995  chopps branches: 1.1.2;
file grf_ultms.g was initially added on branch netbsd-1-1.
 1.1.2.1 10-Nov-1995  chopps update grf_ul; support files now only used if needed.
 1.4.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.5.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.1 13-Jun-2001  nathanw file grf_ultms.g was added on branch nathanw_sa on 2002-02-28 04:06:42 +0000
 1.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.10.1 28-May-2002  tv Pull up revision 1.7 (requested by jdolecek):
update comments
 1.6.8.1 30-May-2002  gehenna Catch up with -current.
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.78.1 11-Mar-2010  yamt sync with head
 1.2 09-Oct-1995  chopps file is now generated at compile time
 1.1 18-Aug-1995  chopps new a2410 driver from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.7 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.6 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.5 21-Apr-1996  veego branches: 1.5.44; 1.5.48;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2 27-Mar-1994  chopps dlists.h ==> sys/queue.h
 1.1 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.5.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.39 12-Jul-2023  mlelstv Make inclusion of sys/intr.h explicit for spl*.
 1.38 23-Jan-2023  andvar s/makre/make/ in comment.
 1.37 26-Mar-2022  andvar branches: 1.37.4;
s/logial/logical/
 1.36 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.35 08-Jul-2011  mrg avoid uninitialised variable warnings.
 1.34 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.33 26-Oct-2009  cegger branches: 1.33.4;
kill extra whitespaces
reviewed by tsutsui@
 1.32 18-Mar-2009  cegger bcopy -> memcpy
 1.31 18-Mar-2009  cegger bzero -> memset
 1.30 17-Oct-2007  garbled branches: 1.30.20; 1.30.28; 1.30.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.29 16-Jun-2007  dsl branches: 1.29.10;
Put the argument to '#if defined' in ().
The C standard allows either form, but we normally treat 'defined' as
a function, not an operator.
 1.28 08-Mar-2006  lukem branches: 1.28.20; 1.28.22; 1.28.28;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.27 11-Dec-2005  christos branches: 1.27.4; 1.27.6; 1.27.8; 1.27.10;
merge ktrace-lwp.
 1.26 13-Jun-2005  jmc branches: 1.26.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.25 24-Feb-2004  wiz becuase -> because. From Peter Postma.
 1.24 01-Apr-2003  thorpej branches: 1.24.2;
Use PAGE_SIZE rather than NBPG.
 1.23 13-Mar-2002  jandberg Fixed cc_load_mode restart copper after setting the new list
when called with null argument. This is needed for the screen
blank to actually take effect.
 1.22 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.21 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.20 25-May-2000  is branches: 1.20.8; 1.20.12;
Prepare for AmigaPPC.
 1.19 25-Mar-1999  is branches: 1.19.8;
Defopting grf_cc configuration parameters
 1.18 24-Mar-1999  is AGA: VGAonly timing (GRF_AGA_VGA), by Adam Ciarcinski
 1.17 19-Sep-1997  mhitch Add an 800x600 Super72 mode; started by Neil Clark and finished by me.
NOTE: due to hardware requirement of the AGA chipset, the framebuffer width
has to be a multiple of 64 bits. An 800x600 display will use a memory width
of 832 bits, which the current X server can't handle. To get a usable
display, the width needs to be 832 or 768.
 1.16 10-Jun-1997  veego branches: 1.16.4;
s/amiga_round_page/m68k_round_page/
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.12 19-May-1996  veego branches: 1.12.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.11 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.10 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 26-Jun-1995  chopps fix for sprite problem from Kenneth Dyke <kcd@babylon5.jumpgate.com>
 1.7 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 30-Jun-1994  chopps some aga cleanup from osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.4 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.3 27-Mar-1994  chopps dlists.h ==> sys/queue.h
 1.2 14-Mar-1994  chopps use dmode passed in to fetch the frame pointers. fix from,
francis@hasler.ascom.ch (Francis Demierre).
 1.1 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.12.4.1 28-May-1996  is The AGA changes for VGA monitors seem to have problems for some people,
especially when making screens large. Put them inside #ifdef GRF_AGA_VGA
until a better fix is known. (On request from veego)
 1.16.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.19.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.20.12.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.20.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.20.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.20.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.24.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.2 03-Sep-2007  yamt sync with head.
 1.26.2.1 21-Jun-2006  yamt sync with head.
 1.27.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.27.8.1 13-Mar-2006  yamt sync with head.
 1.27.6.1 22-Apr-2006  simonb Sync with head.
 1.27.4.1 09-Sep-2006  rpaulo sync with head
 1.28.28.1 26-Jun-2007  garbled Sync with HEAD.
 1.28.22.1 11-Jul-2007  mjf Sync with head.
 1.28.20.1 15-Jul-2007  ad Sync with head.
 1.29.10.1 06-Nov-2007  matt sync with HEAD
 1.30.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.30.20.2 11-Mar-2010  yamt sync with head
 1.30.20.1 04-May-2009  yamt sync with head.
 1.33.4.1 05-Mar-2011  rmind sync with head
 1.37.4.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.11 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.10 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.9 25-Mar-1999  is branches: 1.9.22; 1.9.26;
Defopting grf_cc configuration parameters
 1.8 28-Apr-1996  mhitch Fix warnings from -Wall.
 1.7 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 02-Jul-1994  chopps couple fixes from Michael. 2091 now uses 24bit only dma (oops)
 1.4 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.3 27-Mar-1994  chopps dlists.h ==> sys/queue.h
 1.2 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.1 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.9.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.9.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9 08-Mar-2006  lukem Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.8 26-Jan-2002  aymeric branches: 1.8.32; 1.8.46; 1.8.48; 1.8.50; 1.8.52;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 19-Sep-1997  mhitch branches: 1.7.30; 1.7.34;
Add an 800x600 Super72 mode; started by Neil Clark and finished by me.
NOTE: due to hardware requirement of the AGA chipset, the framebuffer width
has to be a multiple of 64 bits. An 800x600 display will use a memory width
of 832 bits, which the current X server can't handle. To get a usable
display, the width needs to be 832 or 768.
 1.6 05-Oct-1995  chopps branches: 1.6.14;
first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.2 27-Mar-1994  chopps dlists.h ==> sys/queue.h
 1.1 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.6.14.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.34.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.30.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.52.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.8.50.1 13-Mar-2006  yamt sync with head.
 1.8.48.1 22-Apr-2006  simonb Sync with head.
 1.8.46.1 09-Sep-2006  rpaulo sync with head
 1.8.32.1 21-Jun-2006  yamt sync with head.
 1.10 05-Dec-2021  msaitoh s/convience/convenience/ in comment.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.7 26-Jan-2002  aymeric branches: 1.7.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 13-Jan-2002  jandberg Amiga wsdisplay updates.

conf/GENERIC:
conf/files.amiga:
- Bring in wsfont definitions.

dev/grfabs_reg.h:
- Add macros for decomposing palette entries.

dev/amidisplaycc.c:
- Support for fonts, either wsfonts compiled into kernel
or runtime-loadable by ioctl. Font width still limited to 8,
height may vary.
- Limited support for mapped displays. No way to adjust display
mode. Palette setting works.
- Prettier default palette (white on black).
- Probes correctly as WSDISPLAY_TYPE_AMIGACC.
- Support for screen blanking.
 1.5 21-Apr-1996  veego branches: 1.5.44; 1.5.48;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.2 27-Mar-1994  chopps dlists.h ==> sys/queue.h
 1.1 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.5.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.7.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.23 24-May-2022  andvar s/changable/changeable/ in comments.
 1.22 01-Nov-2021  andvar fix typos, mainly in words minimum and maximum, but also few others.
 1.21 07-Sep-2015  dholland Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.20 08-Feb-2011  rmind branches: 1.20.14; 1.20.32;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.19 04-Mar-2007  christos branches: 1.19.66; 1.19.72; 1.19.74;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.18 24-Nov-2006  wiz branches: 1.18.4;
s/independant/independent/, from Zafer.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 07-Aug-2003  agc branches: 1.16.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.15 26-Jan-2002  aymeric branches: 1.15.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.14 05-Aug-2001  jdolecek branches: 1.14.6;
use unsigned variable types as appropriate
 1.13 29-Jul-1997  veego branches: 1.13.30; 1.13.34;
- Remove grfvideo_mode->hblank_stop and grfvideo_mode->vblank_stop.
- Add grfvideo_mode->disp_flags to select interlace, doublescan,
sync-on-green and horizontal/vertical sync polarity.
- Add some constants for grfvideo_mode->disp_flags.
 1.12 03-Jun-1996  is #define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off.
Make all grf_??.c (which supported it) use the same polarity of the test.
While being here, use a > test instead of implicit != to make it extensible
to darker than dark values for power managment systems.
 1.11 09-Oct-1995  chopps branches: 1.11.6;
new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.10 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.9 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.8 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11.6.1 04-Jun-1996  is From main branch: add GRFIOCBLANK_LIVE and _DARK definitions, so that
X server writers will know what to use.
 1.13.34.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.13.34.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.13.30.1 16-Aug-2001  tv Pullup [jdolecek]:

sys/arch/amiga/dev/grf_cl.c 1.26
sys/arch/amiga/dev/grfioctl.h 1.14
sys/arch/hpcmips/dev/plumvideo.c 1.20
sys/arch/macppc/dev/ofb.c 1.25
sys/arch/sparc/dev/cgtwo.c 1.35
sys/arch/sparc/include/fbio.h patch
sys/arch/sparc64/include/fbio.h patch
sys/arch/sun3/dev/cg2.c 1.14
sys/arch/sun3/include/fbio.h patch
sys/dev/pci/tga.c 1.35
sys/dev/tc/cfb.c 1.28
sys/dev/tc/mfb.c 1.27
sys/dev/tc/sfb.c 1.46
sys/dev/tc/sfbplus.c 1.10 via patch
sys/dev/tc/tfb.c 1.30
sys/dev/tc/xcfb.c 1.23
sys/net/if_ppp.c 1.71

Use unsigned variable types to make bounds checking more correct.
 1.14.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.6.1 05-Aug-2001  nathanw file grfioctl.h was added on branch nathanw_sa on 2002-02-28 04:06:44 +0000
 1.15.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.16.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.2 03-Sep-2007  yamt sync with head.
 1.16.16.1 30-Dec-2006  yamt sync with head.
 1.17.22.1 10-Dec-2006  yamt sync with head.
 1.17.20.1 12-Jan-2007  ad Sync with head.
 1.18.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.74.1 17-Feb-2011  bouyer Sync with HEAD
 1.19.72.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.66.1 05-Mar-2011  rmind sync with head
 1.20.32.1 22-Sep-2015  skrll Sync with HEAD
 1.20.14.1 03-Dec-2017  jdolecek update from HEAD
 1.25 07-Nov-2015  phx Improved wscons support. Virtual screens are now working.
 1.24 27-Oct-2012  chs branches: 1.24.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.23 15-Dec-2011  phx branches: 1.23.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.22 08-Feb-2011  rmind branches: 1.22.4; 1.22.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.21 21-Nov-2008  he branches: 1.21.8; 1.21.10; 1.21.12;
Don't define struct grf_softc unless _KERNEL is defined, because it
depends on struct device which is also not defined unless _KERNEL is
defined. Fixes usr.sbin/videomode build.
 1.20 04-Mar-2007  christos branches: 1.20.40; 1.20.44; 1.20.50; 1.20.52;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19 11-Dec-2005  christos branches: 1.19.26;
merge ktrace-lwp.
 1.18 07-Aug-2003  agc branches: 1.18.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.17 26-Jan-2002  aymeric branches: 1.17.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.16 16-Aug-1999  is branches: 1.16.16; 1.16.20;
Add a quick and dirty FBIOGVIDEO implementation. This is hardware independent,
by saving the last written FIOSVIDEO/GRFIOCBLANK value into a shadow variable
in the grf_softc and returning this value on FBIOGVIDEO.
The presence of this ioctl is needed by screenblank(8) nowadays.
Original problem reported by Lars Hecking on the port-amiga mailing list.
 1.15 19-Oct-1997  veego branches: 1.15.10;
New unit number for the CyberVision 64/3D.
 1.14 19-May-1996  veego - grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.13 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.12 09-Oct-1995  chopps new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.11 18-Aug-1995  chopps change for a2410 from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.10 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.7 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.15.10.1 18-Feb-2000  he Pull up revision 1.16 (requested by is):
Implement GRFIOGLANK ioctl, which is nowadays needed by
screenblank(8).
 1.16.20.1 28-Feb-2002  nathanw Catch up to -current.
 1.16.16.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.17.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.16.1 03-Aug-2004  skrll Sync with HEAD
 1.18.16.1 03-Sep-2007  yamt sync with head.
 1.19.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.20.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.50.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.44.1 04-May-2009  yamt sync with head.
 1.20.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.21.12.1 17-Feb-2011  bouyer Sync with HEAD
 1.21.10.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.8.1 05-Mar-2011  rmind sync with head
 1.22.8.1 18-Feb-2012  mrg merge to -current.
 1.22.4.2 30-Oct-2012  yamt sync with head
 1.22.4.1 17-Apr-2012  yamt sync with head
 1.23.6.2 03-Dec-2017  jdolecek update from HEAD
 1.23.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2 07-Nov-2015  phx Improved wscons support. Virtual screens are now working.
 1.1 15-Dec-2011  phx branches: 1.1.4; 1.1.6; 1.1.10; 1.1.28;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.1.28.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.10.1 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 15-Dec-2011  yamt file grfws.h was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 15-Dec-2011  mrg file grfws.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:17 +0000
 1.43 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.42 24-Apr-2021  thorpej branches: 1.42.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.41 27-Oct-2012  chs branches: 1.41.18; 1.41.28; 1.41.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.40 09-Feb-2010  phx branches: 1.40.10; 1.40.20;
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
 1.39 05-Feb-2010  phx branches: 1.39.2;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.38 13-Jun-2008  cegger use device_lookup_private to get softc
 1.37 03-Dec-2007  ad branches: 1.37.14; 1.37.16; 1.37.18; 1.37.20; 1.37.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.36 08-Mar-2006  lukem branches: 1.36.20; 1.36.38; 1.36.40; 1.36.46;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.35 11-Dec-2005  christos branches: 1.35.4; 1.35.6; 1.35.8; 1.35.10;
merge ktrace-lwp.
 1.34 07-Aug-2003  agc branches: 1.34.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.33 03-May-2003  wiz branches: 1.33.2;
DMA, not dma nor Dma.
 1.32 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.31 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.30 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.29 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.28 25-Apr-2001  bouyer branches: 1.28.2; 1.28.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.27 05-Dec-1998  mjacob branches: 1.27.10; 1.27.22;
Update HBAs to incorporate the new max_lun property.
 1.26 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.25 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.24 21-Aug-1998  is Prepare for support of Apollo-cpuboard-reworked A3000 mainboard SCSI.
 1.23 12-Jan-1998  thorpej Adjust for changes to config.
 1.22 27-Aug-1997  bouyer branches: 1.22.4;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.21 21-Jan-1997  thorpej branches: 1.21.6; 1.21.8;
Initialize max_target in the SCSI link.
 1.20 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.19 13-Oct-1996  christos backout previous kprintf change
 1.18 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.17 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.16 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.15 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.14 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.13 04-Sep-1995  chopps sbic and board changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.10 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 06-Oct-1994  chopps branches: 1.6.2;
fix a thinko in gvp diag. Add 4091 driver from Michael Hitch
(osymh@gemini.oscs.montana.edu)
 1.5 16-Jun-1994  chopps fix boot diag output.
 1.4 25-May-1994  chopps add beginning of support for series I controllers doesn't work yet.
 1.3 16-May-1994  chopps move mysterious dk_establish() stub routine from gtsc driver to disksubr.c
 1.2 11-May-1994  chopps general cleanup including boot diag messages.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6.2.2 06-Oct-1994  chopps fix a thinko in gvp diag. Add 4091 driver from Michael Hitch
(osymh@gemini.oscs.montana.edu)
 1.6.2.1 06-Oct-1994  chopps file gtsc.c was added on branch netbsd-1-0 on 1994-10-06 19:06:42 +0000
 1.21.8.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.6.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.22.4.1 19-Jan-1999  cgd pull up rev 1.24 from trunk (is)
 1.27.22.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.10.2 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.27.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.28.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.28.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.28.8.1 25-Apr-2001  nathanw file gtsc.c was added on branch nathanw_sa on 2002-02-28 04:06:45 +0000
 1.28.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.33.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.33.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.33.2.1 03-Aug-2004  skrll Sync with HEAD
 1.34.16.2 07-Dec-2007  yamt sync with head
 1.34.16.1 21-Jun-2006  yamt sync with head.
 1.35.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.35.8.1 13-Mar-2006  yamt sync with head.
 1.35.6.1 22-Apr-2006  simonb Sync with head.
 1.35.4.1 09-Sep-2006  rpaulo sync with head
 1.36.46.1 08-Dec-2007  mjf Sync with HEAD.
 1.36.40.1 09-Jan-2008  matt sync with HEAD
 1.36.38.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.36.20.1 03-Dec-2007  ad Sync with HEAD.
 1.37.22.1 18-Jun-2008  simonb Sync with head.
 1.37.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.37.18.2 11-Mar-2010  yamt sync with head
 1.37.18.1 04-May-2009  yamt sync with head.
 1.37.16.1 17-Jun-2008  yamt sync with head.
 1.37.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.39.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.40.20.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.40.10.1 30-Oct-2012  yamt sync with head
 1.41.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.41.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.41.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.41.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.42.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 26-Oct-1994  cgd branches: 1.2.66;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.66.1 03-Aug-2004  skrll Sync with HEAD
 1.8 01-Mar-1995  mycroft Clean up deleted files.
 1.7 18-Apr-1994  chopps make current with recent vm changes.
 1.6 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.5 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.28 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.27 24-Apr-2021  thorpej branches: 1.27.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.26 27-Oct-2012  chs branches: 1.26.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.25 03-Jun-2011  matt branches: 1.25.2; 1.25.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.24 26-Oct-2009  cegger branches: 1.24.4; 1.24.6; 1.24.10;
kill extra whitespaces
reviewed by tsutsui@
 1.23 18-Mar-2009  cegger bcopy -> memcpy
 1.22 01-Jan-2003  thorpej branches: 1.22.108; 1.22.116; 1.22.122;
Use aprint_normal() for cfprint routines.
 1.21 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.20 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.19 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.18 27-Jan-2002  is Attach multifunction GVP boards.
 1.17 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.16 12-Jan-1998  thorpej branches: 1.16.28; 1.16.32;
Adjust for changes to config.
 1.15 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.14 13-Oct-1996  christos backout previous kprintf change
 1.13 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.11 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.10 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.9 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 05-Mar-1995  chopps add recognition of GVP 530 and change magnum scsi interrupt level to 6
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 21-Jun-1994  chopps no gvp series I yet. and if_le.c from Rob Healey (rhealey@aggregate.com)
 1.2 25-May-1994  chopps add beginning of support for series I controllers doesn't work yet.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.16.32.3 03-Jan-2003  thorpej Sync with HEAD.
 1.16.32.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.32.1 28-Feb-2002  nathanw Catch up to -current.
 1.16.28.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.28.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.22.122.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.116.1 28-Apr-2009  skrll Sync with HEAD.
 1.22.108.2 11-Mar-2010  yamt sync with head
 1.22.108.1 04-May-2009  yamt sync with head.
 1.24.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.24.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.24.4.1 12-Jun-2011  rmind sync with head
 1.25.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.2.1 30-Oct-2012  yamt sync with head
 1.26.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.27.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.8 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 05-Mar-1995  chopps add recognition of GVP 530 and change magnum scsi interrupt level to 6
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 02-Mar-1995  chopps fix long standing bug with A2091 and dma.
Move the copy from bounce buffer after dmafree() in the case of
the A2091 this allows the dma fifo to be flushed.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.4 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 25-May-1994  chopps add beginning of support for series I controllers doesn't work yet.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.22 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21 24-Apr-2021  thorpej branches: 1.21.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.20 27-Oct-2012  chs branches: 1.20.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19 19-Jul-2011  dyoung branches: 1.19.2; 1.19.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.18 02-Feb-2010  phx Fix compilation warnings and errors with amigappc.
 1.17 09-Nov-2009  is Move to two-clause license.
 1.16 04-Mar-2007  christos branches: 1.16.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15 21-Dec-2006  yamt branches: 1.15.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.14 06-Jan-2003  wiz branches: 1.14.18; 1.14.48; 1.14.50;
interrupt with two rs.
 1.13 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.12 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.9 28-Jan-2002  aymeric branches: 1.9.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.8 27-Jan-2002  is remove double {
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 08-Nov-2000  is branches: 1.6.4; 1.6.8;
Remove some of the bitrot.
 1.5 23-Jan-2000  aymeric sync with new bus.h
 1.4 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.3 01-Apr-1999  is branches: 1.3.8;
snchronize with reality.
Actually, this should have been done months ago, but slipped the cracks.
 1.2 12-Jan-1998  thorpej Adjust for changes to config.
 1.1 19-Oct-1997  is zbus.c
 1.3.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.3.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.8.5 07-Jan-2003  thorpej Sync with HEAD.
 1.6.8.4 03-Jan-2003  thorpej Sync with HEAD.
 1.6.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.6.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.8.1 16-May-2002  gehenna Include sys/conf.h directly.
 1.14.50.1 29-Sep-2006  yamt implement splraiseipl/makeiplcookie for amiga.
 1.14.48.1 12-Jan-2007  ad Sync with head.
 1.14.18.2 03-Sep-2007  yamt sync with head.
 1.14.18.1 30-Dec-2006  yamt sync with head.
 1.15.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.44.1 11-Mar-2010  yamt sync with head
 1.19.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.2.1 30-Oct-2012  yamt sync with head
 1.20.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.21.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.22 27-Oct-2012  chs branches: 1.22.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.21 19-Jul-2011  dyoung branches: 1.21.2; 1.21.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.20 02-Feb-2010  phx Fix compilation warnings and errors with amigappc.
 1.19 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.18 11-Dec-2005  christos branches: 1.18.74; 1.18.76; 1.18.78;
merge ktrace-lwp.
 1.17 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.16 01-Jan-2003  thorpej branches: 1.16.2;
Use aprint_normal() for cfprint routines.
 1.15 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.12 28-Jan-2002  aymeric branches: 1.12.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.11 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 30-Dec-1999  is branches: 1.10.8; 1.10.12;
Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.9 10-May-1999  is branches: 1.9.2;
Add HyperCom 3+/4+ parallel port support
 1.8 16-Feb-1999  is branches: 1.8.2; 1.8.4; 1.8.6;
Fix Copyright dates
 1.7 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.6 10-Jan-1999  is Make this compile again. 1.5 was committed from the wrong directory.
We apologize for any inconvenience caused.
 1.5 26-Dec-1998  is Make it table-driven. Besides making adding more devices easier, the resulting
code is 14% smaller (alas, for this file only).
 1.4 14-Dec-1998  is Support for Hypercom 3+ / 4+. Untested yet, but its only some additional
entries in a table.
 1.3 09-Aug-1998  is Cosmetics: it's a "HyperCom 3Z" on a ZBUS, no "HyperCom 3".
 1.2 12-Jan-1998  thorpej Adjust for changes to config.
 1.1 18-Oct-1997  is Driver for the VMC HyperCom3/zbus and the VMC HyperCom4.
lpt on HyperCom3 isn't supported yet.
 1.8.6.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.8.2.1 18-Jun-1999  perry pullup 1.8->1.9 (is): Support for HyperCom 3+/4+ lpt ports
 1.9.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.10.12.4 03-Jan-2003  thorpej Sync with HEAD.
 1.10.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.12.2 17-Sep-2002  nathanw Catch up to -current.
 1.10.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.10.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.8.1 16-May-2002  gehenna Include sys/conf.h directly.
 1.16.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.78.2 11-Mar-2010  yamt sync with head
 1.18.78.1 16-May-2008  yamt sync with head.
 1.18.76.1 18-May-2008  yamt sync with head.
 1.18.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.2.1 30-Oct-2012  yamt sync with head
 1.22.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.23.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.61 26-Mar-2006  is idesc.c was unreferenced for 14 months; time has finally come to move it]
to the Attic.
 1.60 29-Jan-2006  dsl branches: 1.60.2; 1.60.4; 1.60.6; 1.60.8; 1.60.10;
Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
 1.59 11-Dec-2005  christos branches: 1.59.2;
merge ktrace-lwp.
 1.58 21-Feb-2005  thorpej branches: 1.58.4;
Part 1 of a cleanup pass over the SCSI subsystem. The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding. Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes. Place items described
by the SCSI Primary Commands document into scsi_spc.h.
 1.57 07-Dec-2004  thorpej branches: 1.57.2; 1.57.4;
READ_CAPACITY -> READ_CAPACITY_10
 1.56 07-Dec-2004  thorpej USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).
 1.55 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.54 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.53 18-Jun-2003  drochner branches: 1.53.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.52 17-Jan-2003  lonewolf Compiles and works (tested on my A1200) again
XXX scsipi mid layer spews out a few "generic HBA error"s during device probe (no slave device on bus), I don't know how to fix this
XXX This whole thing should die now that we have wdc_amiga
 1.51 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.50 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.49 28-Jan-2002  aymeric branches: 1.49.10;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.48 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.47 25-Apr-2001  bouyer branches: 1.47.2; 1.47.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.46 25-May-2000  is branches: 1.46.6;
Prepare for AmigaPPC.
 1.45 18-Jan-2000  thorpej Remove one line of junk.
 1.44 15-Jan-2000  aymeric make this compile again
 1.43 10-Dec-1999  mhitch Check for valid device when starting a request with interrupts; device
probes are now done with interrupts, and would hang when probing for
non-existent device.
 1.42 30-Sep-1999  thorpej branches: 1.42.2; 1.42.8;
Update for SCSIPI changes.
 1.41 17-Apr-1999  mhitch Correct the way I was using the transfer length for ATAPI commands. ATAPI ZIP
drives are now usable.
 1.40 17-Apr-1999  mhitch Do a REQUEST SENSE when ATAPI operation returns an error. This is needed to clear
the Unit Attention status, i.e. after a media change on a CDROM.
 1.39 16-Apr-1999  mhitch Change reading the ATAPI IDENTIFY data: a ZIP drive responds differently than my CDROM
and will cause the drive to hang on boot. The ZIP drive still does not work, but the
system no longer will hang,
 1.38 01-Apr-1999  mhitch branches: 1.38.2;
Turn off some ATAPI debugging output.
 1.37 26-Mar-1999  mhitch Add some ATAPI support. My CDROM drive works, but I don't have other devices to
test. This should provide interim ATAPI support until the MI wdc driver is used.
 1.36 10-Jan-1999  tron Don't use void pointer for arithmetic.
 1.35 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.34 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.33 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.32 15-Aug-1998  mycroft Make copyright notices with my name consistent.
 1.31 12-Jan-1998  thorpej Adjust for changes to config.
 1.30 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.29 23-Dec-1996  veego branches: 1.29.8; 1.29.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.28 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.27 13-Oct-1996  christos backout previous kprintf change
 1.26 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.25 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.24 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.23 30-May-1996  mhitch Fix the third LBA extraction from a 6 byte SCSI command that I missed.
 1.22 27-May-1996  mhitch The logical block address in a 6 byte command is 21 bits, not 20.
Also a transfer length of 0 indicates 256 blocks.
 1.21 12-May-1996  mhitch branches: 1.21.4;
Remove old-style disk instrumentation now that iostat, systat, and
vmstat are fixed.
 1.20 28-Apr-1996  mhitch Fix warning from -Wall.
 1.19 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.18 24-Mar-1996  mhitch Fix for SCSI mode sense disk_pages structure change, and use the _lto3b()
conversion function.
 1.17 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.16 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.15 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.14 05-Oct-1995  chopps first attempt at A4000T support, remove GRF_AGA's dependence on GRF_ECS.
page 0 is now invalid, other minor cleanup.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.11 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.10 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 06-Oct-1994  chopps branches: 1.5.2;
Add Amiga 1200 support (kbd and ide) from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 22-Jun-1994  chopps cleanup from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 22-May-1994  chopps fix check for configured device in interrupt routine.
 1.1 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5.2.2 06-Oct-1994  chopps Add Amiga 1200 support (kbd and ide) from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5.2.1 06-Oct-1994  chopps file idesc.c was added on branch netbsd-1-0 on 1994-10-06 19:54:29 +0000
 1.21.4.2 30-May-1996  mhitch Pulled up the other SCSI emulation fix from the trunk.
 1.21.4.1 28-May-1996  mhitch Pull in bug fix for SCSI emulation of 6 byte commands.
 1.29.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.29.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.38.2.3 19-Apr-1999  cjs branches: 1.38.2.3.2;
Pull up to HEAD 1.41, per Michael L. Hitch <osymh@terra.oscs.montana.edu>.
 1.38.2.2 17-Apr-1999  mhitch Pull up revision 1.40. Approved by Curt Sampson.
A request sense operation is required on ATAPI devices so the Unit Attention
status gets cleared. Changing CDROM media now works without needing to reboot
the system.
 1.38.2.1 16-Apr-1999  mhitch Pull up revision 1.39.
Change reading ATAPI IDENTIFY data to prevent ZIP drive from hanging
system on boot.
 1.38.2.3.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.42.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.42.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.46.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.47.8.4 17-Jan-2003  thorpej Sync with HEAD.
 1.47.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.47.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.47.8.1 25-Apr-2001  nathanw file idesc.c was added on branch nathanw_sa on 2002-02-28 04:06:45 +0000
 1.47.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.47.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.49.10.1 26-Jan-2003  jmc Pullup revisions 1.51-1.52 (requested by lonewolf in ticket #1101)
Compiles and works (tested on my A1200) again
 1.53.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.53.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.53.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.53.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.53.2.1 03-Aug-2004  skrll Sync with HEAD
 1.57.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.57.2.1 29-Apr-2005  kent sync with -current
 1.58.4.1 21-Jun-2006  yamt sync with head.
 1.59.2.1 01-Feb-2006  yamt sync with head.
 1.60.10.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.60.8.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.60.6.1 01-Apr-2006  yamt sync with head.
 1.60.4.1 22-Apr-2006  simonb Sync with head.
 1.60.2.1 09-Sep-2006  rpaulo sync with head
 1.15 27-Mar-1997  veego if_le supports now the Ariadne card.
 1.14 18-Mar-1997  veego Remove NAE, put the revision into ae_softc and fixes from dev/ic/am7990.c:
>Signed shifts are evil.
>Thanks to Michael Smith for reporting, Jason Thorpe for pointing to the
>report, doing a quick workaround which pointed me to the right code part and
>for testing the final fix.
 1.13 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.12 23-Dec-1996  veego branches: 1.12.6;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.11 13-Oct-1996  christos backout previous kprintf change
 1.10 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.9 25-May-1996  is Yet another unused variable cleanup; noticed in a kernel without bpfilter.
 1.8 07-May-1996  thorpej branches: 1.8.4;
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.7 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.6 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.5 24-Feb-1996  chopps use newly allocated ethernet address (fixes #2117)
 1.4 24-Dec-1995  mycroft The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
 1.3 07-Oct-1995  chopps update to ariadne ethernet device from Bernd Ernesti <bernd@arresum.inka.de>
 1.2 18-Aug-1995  chopps add rcs ids
 1.1 18-Aug-1995  chopps ariadne ethernet driver from Bernd Ernesti <bernd@arresum.inka.de>
 1.8.4.1 26-May-1996  is Pull up of bug fixes for Retina screenblank ioctl and an unused variable
warning from if_ae when building INSTALL (that is, without bpfilter) kernels.
 1.12.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.12.6.1 06-Mar-1997  is Convert to new ARP style.
 1.3 27-Mar-1997  veego if_le supports now the Ariadne card.
 1.2 18-Aug-1995  chopps add rcs ids
 1.1 18-Aug-1995  chopps ariadne ethernet driver from Bernd Ernesti <bernd@arresum.inka.de>
 1.35 02-Sep-1998  is Split SMC chipset ARCnet driver into
- machine independent chip driver, in dev/ic/smc90cx6.c/...reg.h,...var.h,
using bus_space methods
- ZBUS frontend in arch/amiga/dev/if_bah_zbus.c
- added IPL_SOFTNET to arch/amiga/include/intr.h, for this
Implementing the ISA bus frontend is left as an exercise to the reader.
 1.34 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.33 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.32 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.31 12-Jan-1998  thorpej Adjust for changes to config.
 1.30 04-Apr-1997  is Actually ask for ARP initialization on this interface.
Somehow this commit was forgotten. Sorry folks.
 1.29 23-Mar-1997  is Now that ARP on ARCnet works, set it as default.
 1.28 17-Mar-1997  is Make this compile on Amiga. Bug report by Bernd Ernesti.
 1.27 16-Mar-1997  is move if_arc.h to sys/net
 1.26 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.25 23-Dec-1996  veego branches: 1.25.6;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.24 18-Nov-1996  is Change the token loss report algorithm:

Earlier, we re-complained about excessive token losses about once a minute.
However, on small ARCnet networks, the token will also be lost if only one
station (us) is active (ifconfig'd down interfaces don't take place in the
token exchange), and our syslog would be filled with repeated messages about
this condition.

Our new code only complains once, starts a timeout() each time a token
regeneration is reported by the chip, and generates a log message about
the regenerated token if it was stable for 15 seconds.
 1.23 18-Nov-1996  is Fix a bug in the "spurious rx interupt" detection: don't copy the spurious
buffer out of the hardware (it is invalid!).
This fixes hangups due to spurious rx interupts.
XXX Maybe I should completely reset the hardware in this case?
 1.22 13-Oct-1996  christos backout previous kprintf change
 1.21 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.20 08-Sep-1996  is "Never type in what you can equally well cut'n'paste." - (myself)
 1.19 02-Sep-1996  is Add IP multicast support as per RFC 1122 section 3.3.7 to ARCnet.
"The mapping of IP Class D addresses to local addresses is
currently specified for the following types of networks:
[...]
o Any network that supports broadcast but not multicast,
addressing: all IP Class D addresses map to the local
broadcast address."
 1.18 07-May-1996  thorpej branches: 1.18.4;
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.17 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.16 20-Mar-1996  is - Zeroth version of M68060 support (dont want to cause emulation traps for
the "Fast Assembler Version of the copy loop)
- Yet another sanity check included: initialize unused receive buffers to
zero sender id; and test for sender hardware id of zero in the receiver.
Gives us better error messages in case flaky hardware causes spurious
receive interupts.
 1.15 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.14 27-Dec-1995  chopps make changed from pr#1824 from Ignatios Souvatzis
 1.13 24-Dec-1995  mycroft The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
 1.12 09-Oct-1995  chopps add prototypes for isr stuff fixes pr# 1284 and 1569
 1.11 09-Oct-1995  chopps fix hang bug from Ignatios Souvatzis <ignatios@theory.cs.uni-bonn.de>
 1.10 02-Jul-1995  mycroft Remove references to if_addrlist.
 1.9 27-Jun-1995  chopps udpate to match ifnets new use of sys/queue.h
 1.8 07-Jun-1995  cgd update from Ignatios Souvatzis
 1.7 15-Apr-1995  cgd cleanup; mostly KNF.
 1.6 14-Apr-1995  chopps couple small changes plus a new watchdog timer from Ignatios Souvatzis <is@beverly.rhein.de>
 1.5 11-Apr-1995  chopps fix up some changes
 1.4 11-Apr-1995  mycroft Sync with the rest of the world. Various additional cleanup.
 1.3 02-Mar-1995  chopps some cleanup..
 1.2 01-Mar-1995  chopps Fixup (c)'s and ids.
 1.1 28-Feb-1995  chopps new arcnet (2060) device from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.18.4.1 05-Dec-1996  rat Pullup request 1.22 -> 1.23 from Ignatios Souvatzis <is@beverly.rhein.de>

>The (new in -1.2) spurious RX interupt / invalid sender id code didn't ignore
>the bad packets, but tried to copy them out anyway, messing up the drivers
>notion of the hardware state. This would hang the driver.
 1.25.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.25.6.1 06-Mar-1997  is Convert to new ARP style.
 1.18 24-Feb-2020  rin 0x%p --> %p for non-external codes.
 1.17 23-Oct-2017  msaitoh branches: 1.17.4; 1.17.10;
Return if bah_attach_subr() failed.
 1.16 30-Oct-2015  phx branches: 1.16.10;
Fixed format string types to make it compile with BAH_DEBUG again.
 1.15 27-Oct-2012  chs branches: 1.15.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.14 19-Jul-2011  dyoung branches: 1.14.2; 1.14.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.13 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.12 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.11 28-Apr-2008  martin branches: 1.11.20; 1.11.22;
Remove clause 3 and 4 from TNF licenses
 1.10 02-Oct-2002  thorpej branches: 1.10.108; 1.10.110; 1.10.112;
Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 23-Jan-2000  aymeric branches: 1.6.8; 1.6.12;
sync with new bus.h
 1.5 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.4 16-Feb-1999  is branches: 1.4.8;
Fix Copyright dates
 1.3 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.2 04-Sep-1998  is Account for the 68060 store buffer.
 1.1 02-Sep-1998  is Split SMC chipset ARCnet driver into
- machine independent chip driver, in dev/ic/smc90cx6.c/...reg.h,...var.h,
using bus_space methods
- ZBUS frontend in arch/amiga/dev/if_bah_zbus.c
- added IPL_SOFTNET to arch/amiga/include/intr.h, for this
Implementing the ISA bus frontend is left as an exercise to the reader.
 1.4.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.112.2 11-Aug-2010  yamt sync with head.
 1.10.112.1 16-May-2008  yamt sync with head.
 1.10.110.1 18-May-2008  yamt sync with head.
 1.10.108.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.22.2 05-Mar-2011  rmind sync with head
 1.11.22.1 03-Jul-2010  rmind sync with head
 1.11.20.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.11.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.14.12.2 03-Dec-2017  jdolecek update from HEAD
 1.14.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.1 30-Oct-2012  yamt sync with head
 1.15.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.16.10.1 10-Dec-2017  snj Pull up following revision(s) (requested by msaitoh in ticket #427):
sys/arch/amiga/dev/if_bah_zbus.c: 1.17
sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
sys/arch/usermode/dev/if_veth.c: 1.9
sys/dev/ic/an.c: 1.66
sys/dev/ic/athn.c: 1.17
sys/dev/ic/atw.c: 1.162
sys/dev/ic/bwi.c: 1.33
sys/dev/ic/dwc_gmac.c: 1.41-1.42
sys/dev/ic/malo.c: 1.10
sys/dev/ic/rt2560.c: 1.31
sys/dev/ic/rt2661.c: 1.36
sys/dev/ic/rt2860.c: 1.29
sys/dev/ic/rtw.c: 1.127
sys/dev/ic/rtwvar.h: 1.46
sys/dev/ic/smc90cx6.c: 1.71
sys/dev/ic/smc90cx6var.h: 1.12
sys/dev/ic/wi.c: 1.244
sys/dev/pci/if_ipw.c: 1.66
sys/dev/pci/if_iwi.c: 1.104
sys/dev/pci/if_iwm.c: 1.76
sys/dev/pci/if_iwn.c: 1.86
sys/dev/pci/if_rtwn.c: 1.13
sys/dev/pci/if_wm.c: 1.541
sys/dev/pci/if_wpi.c: 1.79
sys/dev/pci/ixgbe/ixgbe.c: 1.106
sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
sys/dev/scsipi/if_se.c: 1.95
sys/dev/usb/if_upl.c: 1.60
sys/net/if.c: 1.396
sys/net/if.h: 1.241
sys/net/if_arc.h: 1.23
sys/net/if_arcsubr.c: 1.78
sys/net/if_bridge.c: 1.136-1.137
sys/net/if_etherip.c: 1.39
sys/net/if_faith.c: 1.56
sys/net/if_gif.c: 1.131
sys/net/if_loop.c: 1.96
sys/net/if_mpls.c: 1.30
sys/net/if_pppoe.c: 1.129
sys/net/if_srt.c: 1.27
sys/net/if_stf.c: 1.102
sys/net/if_tap.c: 1.100
sys/net/if_vlan.c: 1.105
sys/netinet/ip_carp.c: 1.91
sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
Return if bah_attach_subr() failed.
If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
If error occured in bcmeth_ccb_attach(), free resources and return.
If error occured in pq3etsec_attach(), free resources and return.
If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
If if_initialize() failed in the attach function, free resources and return.
If if_attach() failed in the attach function, free resources and return.
- If if_initialize() failed in the attach function, free resources and return.
- KNF
- If if_attach() failed in the attach function, free resources and return.
- KNF
Fix compile error.
Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice
 1.17.10.1 29-Feb-2020  ad Sync with head.
 1.17.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5 27-Feb-1999  is Oops.
Forgot to commit this LONG ago.
 1.4 07-Jun-1995  cgd update from Ignatios Souvatzis
 1.3 02-Mar-1995  chopps some cleanup..
 1.2 01-Mar-1995  chopps Fixup (c)'s and ids.
 1.1 28-Feb-1995  chopps new arcnet (2060) device from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.63 14-Oct-2012  phx New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
 1.62 05-Apr-2010  joerg branches: 1.62.8; 1.62.14; 1.62.18;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.61 19-Jan-2010  pooka branches: 1.61.2; 1.61.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.60 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.59 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.58 18-Mar-2009  cegger bcopy -> memcpy
 1.57 18-Mar-2009  cegger bcmp -> memcmp
 1.56 07-Nov-2008  dyoung branches: 1.56.4;
*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.55 17-Oct-2007  garbled branches: 1.55.16; 1.55.20; 1.55.26; 1.55.28;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.54 03-Sep-2007  he Rename function argument from command to cmd, to make the code
actually build after the previous change.

Also remove a local variable which is no longer used.
 1.53 01-Sep-2007  dyoung Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.52 26-Aug-2007  dyoung branches: 1.52.2;
Constify.
 1.51 05-Mar-2007  he branches: 1.51.2; 1.51.10; 1.51.14; 1.51.18;
Do pointer arithmetic on char* or u_char* pointers.
 1.50 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.49 29-Mar-2006  thorpej branches: 1.49.14;
Use device_cfdata().
 1.48 11-Dec-2005  christos branches: 1.48.4; 1.48.6; 1.48.8; 1.48.10; 1.48.12;
merge ktrace-lwp.
 1.47 13-Jun-2005  jmc branches: 1.47.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.46 30-Oct-2004  thorpej When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.45 24-Feb-2004  wiz branches: 1.45.4;
Spell interrupt with two rs. From Peter Postma.
 1.44 21-Jan-2003  bouyer branches: 1.44.2;
Pass proper len to word_zero().
Bump totlen in the last wantsbyte case, so that it's always even.
Both pointed out by Gunther Nikl.
 1.43 20-Jan-2003  bouyer bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.42 06-Jan-2003  wiz interrupt with two rs.
 1.41 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.40 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.39 28-Jan-2002  aymeric branches: 1.39.10;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.38 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.37 16-Sep-2001  wiz branches: 1.37.4;
Spell 'occurred' with two 'r's.
 1.36 12-Jun-2001  wiz branches: 1.36.2; 1.36.4;
retrieve, not retreive
 1.35 15-Nov-2000  thorpej branches: 1.35.2;
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.34 01-Oct-2000  thorpej Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
 1.33 11-Feb-2000  is Only output message on really special DEBUG kernels.
 1.32 18-May-1999  thorpej branches: 1.32.2;
Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
 1.31 25-Mar-1999  thorpej branches: 1.31.2; 1.31.4;
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.30 10-Jan-1999  tron Don't use void pointer for arithmetic.
 1.29 05-Jul-1998  jonathan branches: 1.29.6;
defopt NS, NSIP.
 1.28 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.27 12-Jan-1998  thorpej Adjust for changes to config.
 1.26 17-Mar-1997  is Make this compile again on Amiga. Fix by Bernd Ernesti.
 1.25 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.24 23-Dec-1996  veego branches: 1.24.6;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.23 13-Oct-1996  christos backout previous kprintf change
 1.22 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.21 07-May-1996  thorpej Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.20 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.19 21-Mar-1996  is Interupts must be disabled and cleared before the PROM is read, as the int
line is shared with one of the PROMs address lines.
From PR #1478 by Jukka Marin.
 1.18 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.17 24-Dec-1995  mycroft The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
 1.16 01-Oct-1995  chopps only use one xmit buffer for ASDG
 1.15 20-Aug-1995  chopps fix bogus length check (#1299)
 1.14 02-Jul-1995  mycroft Remove references to if_addrlist.
 1.13 28-Jun-1995  cgd note that most of dev/ic's contents have changed names
 1.12 27-Jun-1995  chopps udpate to match ifnets new use of sys/queue.h
 1.11 11-May-1995  chopps fix len bug from Jason Thorpe <thorpej@nas.nasa.gov>
 1.10 08-May-1995  chopps fix a few thinkos
 1.9 08-May-1995  chopps may now work for asdg boards.. offsets obtained months ago but untestable here
 1.8 16-Apr-1995  chopps new driver from charles.
 1.7 14-Apr-1995  chopps update doomed driver (i.e. its going to be replace soon)
 1.6 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.5 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 26-Jul-1994  chopps branches: 1.2.2;
fix check in edintr(), do not deref NULL pointer.
 1.1 16-Jul-1994  chopps branches: 1.1.2;
ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.1.2.1 26-Jul-1994  cgd from trunk.
 1.2.2.2 26-Jul-1994  chopps fix check in edintr(), do not deref NULL pointer.
 1.2.2.1 26-Jul-1994  chopps file if_ed.c was added on branch netbsd-1-0 on 1994-07-26 17:51:20 +0000
 1.24.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.24.6.1 06-Mar-1997  is Convert to new ARP style.
 1.29.6.1 11-Dec-1998  kenh The beginnings of interface detach support. Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.
 1.31.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.31.2.1 12-Feb-2000  he Pull up revision 1.33 (requested by is):
Only output diagnostic message on really special DEBUG kernels.
 1.32.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.32.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.35.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.36.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.36.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.36.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.36.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.37.4.4 07-Jan-2003  thorpej Sync with HEAD.
 1.37.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.37.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.37.4.1 16-Sep-2001  nathanw file if_ed.c was added on branch nathanw_sa on 2002-02-28 04:06:46 +0000
 1.39.10.1 28-Jan-2003  jmc Pullup revisions 1.42-1.44 (requested by bouyer in ticket #1121)
Bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
Pass proper len to word_zero().
Bump totlen in the last wantsbyte case, so that it's always even.
 1.44.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.44.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.44.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.44.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.44.2.1 03-Aug-2004  skrll Sync with HEAD
 1.45.4.1 24-Jan-2005  he Pull up revision 1.46 (requested by thorpej in ticket #939):
When adding or deleting multicast addresses, only change
the address filter if the interface is marked RUNNING.
Fixes PR#27678.
 1.47.2.2 03-Sep-2007  yamt sync with head.
 1.47.2.1 21-Jun-2006  yamt sync with head.
 1.48.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.48.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.48.8.1 01-Apr-2006  yamt sync with head.
 1.48.6.1 22-Apr-2006  simonb Sync with head.
 1.48.4.1 09-Sep-2006  rpaulo sync with head
 1.49.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.51.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.51.14.2 10-Sep-2007  skrll Sync with HEAD.
 1.51.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.51.10.1 03-Oct-2007  garbled Sync with HEAD
 1.51.2.1 09-Oct-2007  ad Sync with head.
 1.52.2.1 06-Nov-2007  matt sync with HEAD
 1.55.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.55.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.55.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.55.20.4 11-Aug-2010  yamt sync with head.
 1.55.20.3 11-Mar-2010  yamt sync with head
 1.55.20.2 20-Jun-2009  yamt sync with head
 1.55.20.1 04-May-2009  yamt sync with head.
 1.55.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.56.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.61.4.1 30-May-2010  rmind sync with head
 1.61.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.62.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.62.14.1 22-Nov-2012  riz Pull up following revision(s) (requested by phx in ticket #681):
sys/arch/amiga/dev/if_edreg.h: file removal
sys/dev/ic/dp8390reg.h: revision 1.9
sys/arch/amiga/conf/files.amiga: revision 1.161
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.1
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.2
sys/arch/amiga/dev/if_ed.c: file removal
New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
Fixed receiving of odd-length packets. Driver works now perfectly.
Thanks to Harald Meinzer for providing me with a Hydra for a few days.
ed_ring structure is no longer needed for compatibility, as the last
device driver using it (amiga/ed(4)) has been converted now.
 1.62.8.1 30-Oct-2012  yamt sync with head
 1.2 27-Oct-2012  phx branches: 1.2.2; 1.2.4; 1.2.6;
Fixed receiving of odd-length packets. Driver works now perfectly.
Thanks to Harald Meinzer for providing me with a Hydra for a few days.
 1.1 14-Oct-2012  phx New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
 1.2.6.2 22-Nov-2012  riz Pull up following revision(s) (requested by phx in ticket #681):
sys/arch/amiga/dev/if_edreg.h: file removal
sys/dev/ic/dp8390reg.h: revision 1.9
sys/arch/amiga/conf/files.amiga: revision 1.161
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.1
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.2
sys/arch/amiga/dev/if_ed.c: file removal
New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
Fixed receiving of odd-length packets. Driver works now perfectly.
Thanks to Harald Meinzer for providing me with a Hydra for a few days.
ed_ring structure is no longer needed for compatibility, as the last
device driver using it (amiga/ed(4)) has been converted now.
 1.2.6.1 27-Oct-2012  riz file if_ed_zbus.c was added on branch netbsd-6 on 2012-11-22 00:27:54 +0000
 1.2.4.2 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.1 27-Oct-2012  tls file if_ed_zbus.c was added on branch tls-maxphys on 2012-11-20 03:00:58 +0000
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 27-Oct-2012  yamt file if_ed_zbus.c was added on branch yamt-pagecache on 2012-10-30 17:18:49 +0000
 1.5 14-Oct-2012  phx New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
 1.4 08-May-1995  chopps branches: 1.4.206; 1.4.212; 1.4.216;
may now work for asdg boards.. offsets obtained months ago but untestable here
 1.3 16-Apr-1995  chopps new driver from charles.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 16-Jul-1994  chopps branches: 1.1.2;
ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.1.2.2 16-Jul-1994  chopps ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.1.2.1 16-Jul-1994  chopps file if_edreg.h was added on branch netbsd-1-0 on 1994-07-16 02:27:46 +0000
 1.4.216.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.212.1 22-Nov-2012  riz Pull up following revision(s) (requested by phx in ticket #681):
sys/arch/amiga/dev/if_edreg.h: file removal
sys/dev/ic/dp8390reg.h: revision 1.9
sys/arch/amiga/conf/files.amiga: revision 1.161
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.1
sys/arch/amiga/dev/if_ed_zbus.c: revision 1.2
sys/arch/amiga/dev/if_ed.c: file removal
New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
Fixed receiving of odd-length packets. Driver works now perfectly.
Thanks to Harald Meinzer for providing me with a Hydra for a few days.
ed_ring structure is no longer needed for compatibility, as the last
device driver using it (amiga/ed(4)) has been converted now.
 1.4.206.1 30-Oct-2012  yamt sync with head
 1.70 27-Aug-2023  andvar amiga/es(4): start_ptr/end_ptr are initialized with USEPKTBUF option only,
thus add this option check, when they are defined/used under ESDEBUG.
 1.69 26-Aug-2023  andvar amiga/es(4): constify es_dump_smcregs char* argument to fix ESDEBUG build.
 1.68 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.67 20-Aug-2022  thorpej esstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
 1.66 24-May-2022  andvar fix various typos in comment, documentation and log messages.
 1.65 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.64 29-May-2019  msaitoh branches: 1.64.4;
Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
- Add ec_ifmedia into struct ethercom.
- ec_mii in struct ethercom is kept and used as it is. It might be used in
future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
ec_mii for keeping the if_media. Those should be changed in future.
 1.63 29-May-2019  msaitoh KNF. No functional change.
 1.62 29-May-2019  msaitoh Whitespace fix. No functional change.
 1.61 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.60 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.59 26-Jun-2018  msaitoh branches: 1.59.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.58 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.57 22-Feb-2017  nonaka branches: 1.57.6; 1.57.12;
Apply deferred if_start to more MD drivers.
 1.56 15-Dec-2016  ozaki-r branches: 1.56.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.55 10-Jun-2016  ozaki-r branches: 1.55.2;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.54 09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.53 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.52 22-Jan-2014  christos branches: 1.52.6;
gcc-4.8.x unused variable fixes
 1.51 27-Oct-2012  chs branches: 1.51.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.50 05-Apr-2010  joerg branches: 1.50.8; 1.50.18;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.49 19-Jan-2010  pooka branches: 1.49.2; 1.49.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.48 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.47 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.46 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.45 19-Mar-2009  he Correct one more bungled bcopy() -> memcpy() conversion.
 1.44 18-Mar-2009  cegger bcopy -> memcpy
 1.43 07-Nov-2008  dyoung branches: 1.43.4;
*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.42 17-Oct-2007  garbled branches: 1.42.16; 1.42.20; 1.42.26; 1.42.28;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.41 03-Sep-2007  he Rename function argument from command to cmd, to make the code
actually build after the previous change.
 1.40 01-Sep-2007  dyoung Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.39 26-Aug-2007  dyoung branches: 1.39.2;
Constify.
 1.38 04-Mar-2007  christos branches: 1.38.2; 1.38.10; 1.38.14; 1.38.18;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 11-Dec-2005  christos branches: 1.37.26;
merge ktrace-lwp.
 1.36 13-Jun-2005  jmc branches: 1.36.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.35 30-Oct-2004  thorpej When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.34 28-Jan-2003  wiz branches: 1.34.2; 1.34.6;
success, not sucess. Noted by mjl.
 1.33 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 06-Mar-2002  mhitch Add media support (such as it is), manual is all you get.
 1.30 03-Mar-2002  mhitch Enable transmit error and EPH interrupt, and reset NIC on EPH interrupt.
Fixes a source of lost interrupts.
 1.29 02-Mar-2002  mhitch Make reset actually do something and enable the use of the watchdog timer.
Losing interrupts no longer will hang the network.
 1.28 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.27 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.26 15-Nov-2000  thorpej branches: 1.26.4; 1.26.8;
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.25 01-Oct-2000  thorpej Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
 1.24 10-Dec-1999  mhitch Add multicast capability to the A4066 (es) driver; now it will do IPv6.
 1.23 18-May-1999  thorpej branches: 1.23.2; 1.23.8;
Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
 1.22 05-Jul-1998  jonathan branches: 1.22.6; 1.22.10;
defopt NS, NSIP.
 1.21 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.20 04-Jul-1998  jonathan defopt DDB.
 1.19 12-Jan-1998  thorpej Adjust for changes to config.
 1.18 17-Mar-1997  is if_es.c
 1.17 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.16 23-Dec-1996  veego branches: 1.16.6;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 07-May-1996  thorpej Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.12 01-May-1996  mhitch Define BSR_MASK and use BSR_MASK to get the current bank select register.
Clean up the debugging code a bit and the warnings from -Wall.
Don't define ESDEBUG - it can now be set from the config file.

If the Ethernet chip gets reset during the copy of the transmit buffer,
requeue the current packet and reinitialize the controller. This recovers
from an apparent hardware bug when running on my A2000/Zeus system.
 1.11 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.10 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.9 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.8 24-Dec-1995  mycroft The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
 1.7 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 02-Jul-1995  mycroft Remove references to if_addrlist.
 1.5 27-Jun-1995  chopps udpate to match ifnets new use of sys/queue.h
 1.4 14-Apr-1995  chopps bring up-to-date with recent chages (arpwhohas->arp_ifinit
and int xx_start->void xx_start)
 1.3 11-Apr-1995  mycroft Sync with the rest of the world. Define BSR_BANK[0-3] constants and use them.
Various other cleanup.
 1.2 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 13-Feb-1995  chopps add ethernet driver (from Michael)
 1.16.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.16.6.1 06-Mar-1997  is Convert to new ARP style.
 1.22.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.22.6.1 11-Dec-1998  kenh The beginnings of interface detach support. Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.
 1.23.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.23.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.23.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.26.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.26.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.26.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.26.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.26.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.26.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.34.6.1 24-Jan-2005  he Pull up revision 1.35 (requested by thorpej in ticket #939):
When adding or deleting multicast addresses, only change
the address filter if the interface is marked RUNNING.
Fixes PR#27678.
 1.34.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.1 02-Nov-2004  skrll Sync with HEAD.
 1.36.2.1 03-Sep-2007  yamt sync with head.
 1.37.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.38.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.38.14.2 10-Sep-2007  skrll Sync with HEAD.
 1.38.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.38.10.1 03-Oct-2007  garbled Sync with HEAD
 1.38.2.1 09-Oct-2007  ad Sync with head.
 1.39.2.1 06-Nov-2007  matt sync with HEAD
 1.42.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.42.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.42.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.42.20.4 11-Aug-2010  yamt sync with head.
 1.42.20.3 11-Mar-2010  yamt sync with head
 1.42.20.2 20-Jun-2009  yamt sync with head
 1.42.20.1 04-May-2009  yamt sync with head.
 1.42.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.43.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.49.4.1 30-May-2010  rmind sync with head
 1.49.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.50.18.3 03-Dec-2017  jdolecek update from HEAD
 1.50.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.50.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.50.8.1 30-Oct-2012  yamt sync with head
 1.51.2.1 18-May-2014  rmind sync with head
 1.52.6.5 28-Aug-2017  skrll Sync with HEAD
 1.52.6.4 05-Feb-2017  skrll Sync with HEAD
 1.52.6.3 09-Jul-2016  skrll Sync with HEAD
 1.52.6.2 19-Mar-2016  skrll Sync with HEAD
 1.52.6.1 06-Jun-2015  skrll Sync with HEAD
 1.55.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.55.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.56.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.57.12.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.57.12.2 28-Jul-2018  pgoyette Sync with HEAD
 1.57.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.57.6.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.59.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.59.2.1 10-Jun-2019  christos Sync with HEAD
 1.64.4.1 29-Feb-2020  ad Sync with head.
 1.10 24-Jun-2023  msaitoh Fix typo in comment.
 1.9 19-Feb-2023  andvar s/collsions/collisions/ in comment.
 1.8 31-May-2022  andvar fix various typos in comments, documentation and messages.
 1.7 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.6 28-Jan-2003  wiz branches: 1.6.108;
success, not sucess. Noted by mjl.
 1.5 03-Mar-2002  mhitch Enable transmit error and EPH interrupt, and reset NIC on EPH interrupt.
Fixes a source of lost interrupts.
 1.4 01-May-1996  mhitch branches: 1.4.44; 1.4.48;
Define BSR_MASK and use BSR_MASK to get the current bank select register.
 1.3 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 11-Apr-1995  mycroft Sync with the rest of the world. Define BSR_BANK[0-3] constants and use them.
Various other cleanup.
 1.1 13-Feb-1995  chopps add ethernet driver (from Michael)
 1.4.48.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.44.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6.108.1 11-Mar-2010  yamt sync with head
 1.47 01-Aug-2023  andvar fix various typos in comments.
 1.46 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.45 19-Jan-2010  pooka branches: 1.45.12; 1.45.22; 1.45.26;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.44 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.43 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.42 04-Apr-2008  tsutsui branches: 1.42.2; 1.42.4;
Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.41 24-Dec-2005  perry branches: 1.41.74;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40 11-Dec-2005  christos merge ktrace-lwp.
 1.39 13-Jun-2005  jmc branches: 1.39.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.38 02-Oct-2002  thorpej branches: 1.38.6;
Use CFATTACH_DECL().
 1.37 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.36 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.35 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.34 20-Jun-2001  jdolecek branches: 1.34.2; 1.34.8;
Adapt to lance_init() change
 1.33 30-May-2001  mrg use _KERNEL_OPT
 1.32 10-Jan-1999  tron branches: 1.32.20;
Don't use void pointer for arithmetic.
 1.31 17-Aug-1998  mycroft Assign my copyrights to TNF.
 1.30 21-Jul-1998  drochner adapt to LANCE driver split
 1.29 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.28 09-Mar-1998  is Bug fix for the Ariadne panic: don't touch addresses outside the buffer we
got passed.
- analysis by Charles Hannum
- bugfix by Michael van Elst
- test by Thorsten Frueauf & Matthias Scheler
 1.27 04-Oct-1997  thorpej branches: 1.27.2;
Copyright assigned to The NetBSD Foundation.
 1.26 27-Mar-1997  veego branches: 1.26.4;
if_le supports now the Ariadne card.
 1.25 17-Mar-1997  is Make this compile again on Amiga. Fix by Bernd Ernesti.
 1.24 17-Mar-1997  thorpej #include <net/if_media.h>
 1.23 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.22 23-Dec-1996  veego branches: 1.22.6;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.21 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.20 22-Apr-1996  christos Add a hardware dependent initialization function lehwinit()
 1.19 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.18 18-Apr-1996  cgd change LANCE copy & zero functions' names to start with amd7990_, and
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
 1.17 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.16 27-Dec-1995  chopps remove uneeded routines (pr#1837) from Bernd Ernesti
 1.15 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.14 02-Jul-1995  mycroft Remove references to if_addrlist.
 1.13 27-Jun-1995  chopps udpate to match ifnets new use of sys/queue.h
 1.12 13-Apr-1995  chopps couple small changes from Michael.
 1.11 11-Apr-1995  chopps fix up some changes
 1.10 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.9 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 21-Jun-1994  chopps no gvp series I yet. and if_le.c from Rob Healey (rhealey@aggregate.com)
 1.5 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.4 12-Feb-1994  chopps no more if_init.
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.22.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.22.6.1 06-Mar-1997  is Convert to new ARP style.
 1.26.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.27.2.1 05-May-1998  mycroft Pull up 1.28, per request of is.
 1.32.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.34.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.34.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.34.8.1 20-Jun-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-02-28 04:06:47 +0000
 1.34.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.34.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.38.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.39.2.1 21-Jun-2006  yamt sync with head.
 1.41.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.42.4.3 11-Mar-2010  yamt sync with head
 1.42.4.2 20-Jun-2009  yamt sync with head
 1.42.4.1 16-May-2008  yamt sync with head.
 1.42.2.1 18-May-2008  yamt sync with head.
 1.45.26.1 18-May-2014  rmind sync with head
 1.45.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 30-Sep-1995  chopps no longer needed by lance driver (now uses /dev/ic...)
 1.5 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 27-Mar-1997  veego branches: 1.5.56;
if_le supports now the Ariadne card.
 1.4 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.3 07-May-1996  thorpej branches: 1.3.8;
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.2 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 30-Sep-1995  chopps oops, forgot to cvs add this
 1.3.8.1 06-Mar-1997  is Convert to new ARP style.
 1.5.56.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.56.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.56.1 03-Aug-2004  skrll Sync with HEAD
 1.5 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.4 13-Aug-2013  rkujawa branches: 1.4.2; 1.4.6; 1.4.10;
Add support for X-Surf 100 integrated MII PHY. MAC part seems to be compatible
with AX88190, while PHY itself can be handled by ukphy.
 1.3 13-Aug-2013  rkujawa Clean up a bit, add debug function to print the register mappings.
 1.2 11-Aug-2013  rkujawa Use the proper NE2000_TYPE for AX88796.
 1.1 08-Aug-2013  rkujawa Add preliminary support for Individual Computers new X-Surf 100 network card.
 1.4.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 13-Aug-2013  tls file if_ne_xsh.c was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.4.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 13-Aug-2013  yamt file if_ne_xsh.c was added on branch yamt-pagecache on 2014-05-22 11:39:28 +0000
 1.4.2.2 28-Aug-2013  rmind sync with head
 1.4.2.1 13-Aug-2013  rmind file if_ne_xsh.c was added on branch rmind-smpnet on 2013-08-28 23:59:10 +0000
 1.2 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.1 15-May-2012  rkujawa branches: 1.1.2; 1.1.4;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1.4.2 02-Jun-2012  mrg sync to latest -current.
 1.1.4.1 15-May-2012  mrg file if_ne_xsurf.c was added on branch jmcneill-usbmp on 2012-06-02 11:08:50 +0000
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 15-May-2012  yamt file if_ne_xsurf.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.17 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.16 15-May-2012  rkujawa - Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.15 09-Apr-2012  rkujawa Workaround for the fake X-Surf autoconfig entry, created by the Deneb firmware v11.
 1.14 19-Jul-2011  dyoung branches: 1.14.2; 1.14.6; 1.14.8; 1.14.12; 1.14.14;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.13 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.12 12-Mar-2008  cube branches: 1.12.2; 1.12.4;
Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments. Use device_t accessors, correct types, and ANSIfy when
appropriate.
 1.11 02-Oct-2002  thorpej branches: 1.11.22; 1.11.84; 1.11.104; 1.11.108;
Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.8 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 12-Feb-2001  thorpej branches: 1.7.4; 1.7.8;
Adjust the way that media is initialized on DP8390-compatible
chips. The dp8390_softc now has media_init and media_fini
function pointers that do the work.
 1.6 29-Dec-2000  is The name is X-surf, not X-serv. I'll never learn this.
Thanks to Petri Koistinen for the correction.
 1.5 23-Jan-2000  aymeric branches: 1.5.4;
sync with new bus.h
 1.4 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.3 25-Nov-1999  is Address range scaling is hidden by the bus_space functions. Correct the
definitions in case we ever do bus_space accounting on Amiga.
 1.2 25-Nov-1999  is Another RTL8019 board: X-serve by Individual Computers Jens Schoenfeld.
 1.1 11-Nov-1998  veego branches: 1.1.4; 1.1.10; 1.1.16;
New driver for the Ariadne II.
 1.1.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.10.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.10.2 05-Jan-2001  bouyer Sync with HEAD
 1.1.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.4.1 23-Jan-2000  he Pull up revision 1.2 (requested by is):
Add support for X-surf board.
 1.5.4.1 25-Jan-2001  jhawk Pull up revision 1.6 (requested by is):
Correct and add (Respectively) the name of the X-surf board in comments.
 1.7.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.7.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.108.2 02-Jun-2008  mjf Sync with HEAD.
 1.11.108.1 03-Apr-2008  mjf Sync with HEAD.
 1.11.104.1 24-Mar-2008  keiichi sync with head.
 1.11.84.1 23-Mar-2008  matt sync with HEAD
 1.11.22.1 17-Mar-2008  yamt sync with head.
 1.12.4.1 16-May-2008  yamt sync with head.
 1.12.2.1 18-May-2008  yamt sync with head.
 1.14.14.1 06-Jun-2013  riz Pull up following revision(s) (requested by rkujawa in ticket #892):
sys/arch/amiga/dev/if_ne_zbus.c: revision 1.15
Workaround for the fake X-Surf autoconfig entry, created by the Deneb =
firmware v11.
 1.14.12.1 06-Jun-2013  riz Pull up following revision(s) (requested by rkujawa in ticket #892):
sys/arch/amiga/dev/if_ne_zbus.c: revision 1.15
Workaround for the fake X-Surf autoconfig entry, created by the Deneb =
firmware v11.
 1.14.8.1 06-Jun-2013  riz Pull up following revision(s) (requested by rkujawa in ticket #892):
sys/arch/amiga/dev/if_ne_zbus.c: revision 1.15
Workaround for the fake X-Surf autoconfig entry, created by the Deneb =
firmware v11.
 1.14.6.2 02-Jun-2012  mrg sync to latest -current.
 1.14.6.1 29-Apr-2012  mrg sync to latest -current.
 1.14.2.2 23-May-2012  yamt sync with head.
 1.14.2.1 17-Apr-2012  yamt sync with head
 1.53 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.52 17-Sep-2022  thorpej Make qn_softc::transmit_pending a bool. NFC.
 1.51 17-Sep-2022  thorpej Remove statically allocated qn_softc[] array. NFC, as it was not
referenced by anything.
 1.50 05-Dec-2021  msaitoh s/timout/timeout/
 1.49 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.48 12-Nov-2019  msaitoh branches: 1.48.2;
Add missing initialization of sc_dev.
 1.47 05-Feb-2019  msaitoh branches: 1.47.4;
Remove very old IFF_NOTRAILERS flag.
 1.46 26-Jun-2018  msaitoh branches: 1.46.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.45 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.44 22-Feb-2017  nonaka branches: 1.44.6; 1.44.12;
Apply deferred if_start to more MD drivers.
 1.43 15-Dec-2016  ozaki-r branches: 1.43.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.42 10-Jun-2016  ozaki-r branches: 1.42.2;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.41 09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.40 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.39 27-Oct-2012  chs branches: 1.39.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.38 05-Apr-2010  joerg branches: 1.38.8; 1.38.18;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.37 19-Jan-2010  pooka branches: 1.37.2; 1.37.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.36 18-Jan-2010  pooka Fix bpf. compile-tested only.
 1.35 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.34 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.33 18-Mar-2009  cegger bcopy -> memcpy
 1.32 07-Nov-2008  dyoung branches: 1.32.4;
*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.31 17-Oct-2007  garbled branches: 1.31.16; 1.31.20; 1.31.26; 1.31.28;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.30 03-Sep-2007  he Rename function argument from command to cmd, to make the code
actually build after the previous change.
 1.29 01-Sep-2007  dyoung Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.28 26-Aug-2007  dyoung branches: 1.28.2;
Constify.
 1.27 05-Mar-2007  he branches: 1.27.2; 1.27.10; 1.27.14; 1.27.18;
Cast to char* before doing pointer arithmetic.
 1.26 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.25 10-May-2006  skrll branches: 1.25.14;
Fix a bunch of cast lvalues.
 1.24 02-Oct-2002  thorpej branches: 1.24.22; 1.24.36; 1.24.38; 1.24.40; 1.24.42; 1.24.44;
Use CFATTACH_DECL().
 1.23 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.22 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.21 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.20 15-Nov-2000  thorpej branches: 1.20.4; 1.20.8;
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.19 01-Oct-2000  thorpej Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
 1.18 18-May-1999  thorpej branches: 1.18.2;
Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
 1.17 25-Mar-1999  thorpej branches: 1.17.4;
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves. Subtract ETHER_CRC_LEN as necessary to get the same values
for these constants as were previously defined locally.
 1.16 05-Jul-1998  jonathan branches: 1.16.6;
defopt NS, NSIP.
 1.15 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.14 17-Apr-1998  veego Add missing int after an register.
 1.13 12-Jan-1998  thorpej Adjust for changes to config.
 1.12 17-Mar-1997  is Make this compile again.
 1.11 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.10 23-Dec-1996  veego branches: 1.10.6;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.9 13-Oct-1996  christos backout previous kprintf change
 1.8 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.7 18-Jun-1996  is During the data type cleanup, a bug crept in in the code handling mbufs with
odd length. This would lead to corrupt data sent.
 1.6 07-May-1996  thorpej branches: 1.6.4;
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.5 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.4 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.3 24-Dec-1995  mycroft The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
 1.2 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.1 07-Oct-1995  chopps branches: 1.1.2;
new quicknet ethernet driver from Kortelainen Mika <k125374@cs.tut.fi>
 1.1.2.1 10-Nov-1995  chopps update to if_qn from root@aivo.ton.tut.fi (Mika Kortelainen)
 1.6.4.1 18-Jun-1996  is Critical bug fix from the trunk:
During the recent data type cleanups, a bug crept in in the handling of
mbufs with odd length, leading to possible data corruption.
Fixes PR 2521 by Mika Kortelainen.
 1.10.6.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.10.6.1 06-Mar-1997  is Convert to new ARP style.
 1.16.6.1 11-Dec-1998  kenh The beginnings of interface detach support. Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.
 1.17.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.18.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.18.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.20.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.20.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.20.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.20.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.24.44.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.24.42.1 11-May-2006  elad sync with head
 1.24.40.1 24-May-2006  yamt sync with head.
 1.24.38.1 01-Jun-2006  kardel Sync with head.
 1.24.36.1 09-Sep-2006  rpaulo sync with head
 1.24.22.2 03-Sep-2007  yamt sync with head.
 1.24.22.1 21-Jun-2006  yamt sync with head.
 1.25.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.27.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.27.14.2 10-Sep-2007  skrll Sync with HEAD.
 1.27.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.27.10.1 03-Oct-2007  garbled Sync with HEAD
 1.27.2.1 09-Oct-2007  ad Sync with head.
 1.28.2.1 06-Nov-2007  matt sync with HEAD
 1.31.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.31.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.31.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.31.20.4 11-Aug-2010  yamt sync with head.
 1.31.20.3 11-Mar-2010  yamt sync with head
 1.31.20.2 20-Jun-2009  yamt sync with head
 1.31.20.1 04-May-2009  yamt sync with head.
 1.31.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.32.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.37.4.1 30-May-2010  rmind sync with head
 1.37.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.38.18.2 03-Dec-2017  jdolecek update from HEAD
 1.38.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.38.8.1 30-Oct-2012  yamt sync with head
 1.39.14.5 28-Aug-2017  skrll Sync with HEAD
 1.39.14.4 05-Feb-2017  skrll Sync with HEAD
 1.39.14.3 09-Jul-2016  skrll Sync with HEAD
 1.39.14.2 19-Mar-2016  skrll Sync with HEAD
 1.39.14.1 06-Jun-2015  skrll Sync with HEAD
 1.42.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.42.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.43.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.44.12.2 28-Jul-2018  pgoyette Sync with HEAD
 1.44.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.44.6.2 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1439):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.


Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


Add missing initialization of sc_dev.
 1.44.6.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.46.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.46.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.46.2.1 10-Jun-2019  christos Sync with HEAD
 1.47.4.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #425):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.

Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.

Add missing initialization of sc_dev.
 1.48.2.1 29-Feb-2020  ad Sync with head.
 1.2 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.1 07-Oct-1995  chopps branches: 1.1.2;
new quicknet ethernet driver from Kortelainen Mika <k125374@cs.tut.fi>
 1.1.2.1 10-Nov-1995  chopps update to if_qn from root@aivo.ton.tut.fi (Mika Kortelainen)
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.19 27-Oct-2012  chs branches: 1.19.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 19-Jul-2011  dyoung branches: 1.18.2; 1.18.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.17 21-Jul-2010  jklos Fix the port order so that port ttyC0 refers to port 1 on the IOBlix,
ttyC1 to port 2, ttyC2 to port 3, and ttyC3 to port 4.
 1.16 20-Jul-2010  jklos Properly initialize the IOBlix card's lpt port on boot. From Frank Wille
and Michael L. Hitch.
 1.15 02-Feb-2010  phx branches: 1.15.2; 1.15.4;
Fix compilation warnings and errors with amigappc.
 1.14 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.13 11-Dec-2005  christos branches: 1.13.74; 1.13.76; 1.13.78;
merge ktrace-lwp.
 1.12 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.11 06-Jan-2003  wiz branches: 1.11.2;
interrupt with two rs.
 1.10 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.6 28-Jan-2002  aymeric branches: 1.6.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.5 27-Jan-2002  is Register a shutdown handler that switches off interupts.
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 10-Mar-2001  is branches: 1.3.2; 1.3.8;
- The ioblix zbus board comes in 24 MHz and 22.1184 MHz clock variants.
We default to the (newer, more sane) 22.1184 MHz value, but set it from
the iobzclock variable (in Hz), which is initialized from the IOBZCLOCK
configuration option and patchable.
XXX we should time the clock at system startup.
- add ioblix_zbus to the GENERIC configuration.
 1.2 08-Mar-2001  is Add rcsid.
 1.1 23-Mar-2000  is branches: 1.1.6; 1.1.8;
Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).
 1.1.8.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.6.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 23-Mar-2000  bouyer file ioblix_zbus.c was added on branch thorpej_scsipi on 2000-11-20 19:58:37 +0000
 1.3.8.6 07-Jan-2003  thorpej Sync with HEAD.
 1.3.8.5 03-Jan-2003  thorpej Sync with HEAD.
 1.3.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.3.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.8.1 10-Mar-2001  nathanw file ioblix_zbus.c was added on branch nathanw_sa on 2002-02-28 04:06:48 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.8.1 16-May-2002  gehenna Include sys/conf.h directly.
 1.11.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.78.3 11-Aug-2010  yamt sync with head.
 1.13.78.2 11-Mar-2010  yamt sync with head
 1.13.78.1 16-May-2008  yamt sync with head.
 1.13.76.1 18-May-2008  yamt sync with head.
 1.13.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.15.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.19.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.20.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.20 22-Sep-2018  maxv Remove isic(4). It is part of ISDN, which we are now retiring.
 1.19 27-Oct-2012  chs branches: 1.19.36; 1.19.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 19-Jul-2011  dyoung branches: 1.18.2; 1.18.12;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.17 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.16 11-Dec-2005  christos branches: 1.16.78;
merge ktrace-lwp.
 1.15 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.14 21-Nov-2004  is Somebody forgot this change when changing the structure name.
Pointed out by Nick Hudson.
 1.13 06-Jan-2003  wiz branches: 1.13.2; 1.13.4;
interrupt with two rs.
 1.12 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 24-Mar-2002  martin Now that we have all the pieces of the puzzle available start to unriddle
and move them in their proper places.

Move the BRI registry from layer 2 (duh!) to layer 4, so active cards
(which don't have layer 3 or layer 2 in their driver). Remove all remaining
hard coded controller and driver types. Remove any arbitrary hard coded
limits, at least those that show up in the internal API.

This fixes PR 15950.
 1.9 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.8 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 26-Apr-2001  is branches: 1.7.2; 1.7.8;
Be more specific than "some isic board".
 1.6 25-Mar-2001  is Missing changes to the last update, making this compile (and work) again.
 1.5 24-Mar-2001  martin Adjust to new hardware driver <-> isdn layer 2 and above sheme.
 1.4 20-Feb-2001  martin branches: 1.4.2;
Filename cleanup: remove i4b_ prefixes outside sys/netisdn, last round.

Renamed in sys/dev/ic:
i4b_hscx.c -> hscx.c
i4b_hscx.h -> hscx.h
i4b_ipac.h -> ipac.h
i4b_isac.c -> isac.c
i4b_isac.h -> isac.h
i4b_isic.c -> isic.c
i4b_isicbchan.c -> isic_bchan.c
i4b_isicl1.c -> isic_l1.c
i4b_isicl1.h -> isic_l1.h
i4b_isicl1fsm.c -> isic_l1fsm.c
 1.3 28-Jan-2001  is branches: 1.3.2;
Add NetBSD rcsid, clean up comments.
 1.2 25-Jan-2001  is Add support for ISDN Surfer (ISDN only, for the time being).
 1.1 21-Jan-2001  is Amiga part of isdn4bsd, and an example kernel configuration file.
 1.3.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.3.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.3.2.1 28-Jan-2001  bouyer file isic_supio.c was added on branch thorpej_scsipi on 2001-02-11 19:08:47 +0000
 1.4.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.7.8.5 07-Jan-2003  thorpej Sync with HEAD.
 1.7.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.1 26-Apr-2001  nathanw file isic_supio.c was added on branch nathanw_sa on 2002-02-28 04:06:48 +0000
 1.7.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.13.4.1 29-Nov-2004  jmc Pullup rev 1.14 (requested by is in ticket #996)

Typo in structure name
 1.13.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.1 29-Nov-2004  skrll Sync with HEAD.
 1.16.78.1 20-Jun-2009  yamt sync with head
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.19.38.1 10-Jun-2019  christos Sync with HEAD
 1.19.36.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.100 28-May-2022  andvar fix various typos, mainly in comments.
 1.99 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.98 25-Jul-2014  dholland branches: 1.98.26; 1.98.28;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.97 22-Mar-2014  christos branches: 1.97.2;
kill sprintf
fix unused variables
 1.96 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.95 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.94 27-Oct-2012  chs branches: 1.94.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.93 15-Dec-2011  phx branches: 1.93.6;
Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.92 24-Apr-2011  rmind branches: 1.92.4; 1.92.8;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.91 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.90 30-Jan-2010  phx branches: 1.90.4; 1.90.6; 1.90.8;
Do not crash when ite wasn't configured to be console.
 1.89 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.88 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.87 18-Mar-2009  cegger bcopy -> memcpy
 1.86 18-Mar-2009  cegger bzero -> memset
 1.85 18-Mar-2009  cegger bcmp -> memcmp
 1.84 11-Jun-2008  tsutsui branches: 1.84.4; 1.84.10;
Use device_private() and device_lookup_private() to get softc.
 1.83 20-May-2008  phx branches: 1.83.2;
amiga/amiga/isr.h must not be included for __m68k__ only.
At the moment it is required by amigappc as well.
 1.82 02-Dec-2007  mhitch branches: 1.82.14; 1.82.16; 1.82.18; 1.82.20;
Initializing the callout structure while it's in use is bad.
Only do it on the first call to iteinit().
 1.81 19-Nov-2007  ad - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.80 18-Oct-2007  joerg branches: 1.80.2;
Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
 1.79 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.78 11-Jul-2007  he branches: 1.78.8; 1.78.10; 1.78.14;
Move the declaration of repeat_ch up before its first use,
so that this builds again.
 1.77 09-Jul-2007  ad Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.76 04-Mar-2007  christos branches: 1.76.2; 1.76.4; 1.76.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.75 01-Oct-2006  elad branches: 1.75.4;
Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.74 23-Jul-2006  ad branches: 1.74.4; 1.74.6;
Use the LWP cached credentials where sane.
 1.73 14-May-2006  elad integrate kauth.
 1.72 11-Dec-2005  christos branches: 1.72.4; 1.72.6; 1.72.8; 1.72.10; 1.72.12;
merge ktrace-lwp.
 1.71 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.70 13-Jun-2005  jmc branches: 1.70.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.69 02-Mar-2005  chs getitesp() can return NULL, so check for that in iteopen().
pointed out by Michael Hitch.
 1.68 19-Jan-2005  chs branches: 1.68.2;
use a flag in the softc to indicate if an instance has been configured,
rather than a bit in 32-bit global variable indexed by unit number.
 1.67 24-Feb-2004  wiz branches: 1.67.8;
becuase -> because. From Peter Postma.
 1.66 01-Nov-2003  jdolecek g/c local index() routine and switch to (libkern's) strchr()
 1.65 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.64 23-Oct-2002  jdolecek branches: 1.64.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.63 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.62 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.61 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.60 30-May-2002  thorpej Statements must follow labels.
 1.59 17-Mar-2002  atatat branches: 1.59.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.58 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.57 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.56 02-May-2001  scw branches: 1.56.2; 1.56.4; 1.56.8;
Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.55 13-Jan-2001  aymeric branches: 1.55.2;
Make these compile again, plus minor aesthetic changes.
 1.54 02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.53 25-May-2000  is Prepare for AmigaPPC.
 1.52 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.51 04-Jul-1998  jonathan branches: 1.51.14;
defopt DDB.
 1.50 25-Mar-1998  is - remove one level of soft interupt in the software autorepeat code
- WOPEN -> wopen
 1.49 23-Feb-1998  is Initialize keyboard structures also from kbdopen(), if necessary.
To do this, move the flag variable to kbdenable().
This will make kernels with serial console provice a working keyboard driver.
 1.48 12-Jan-1998  thorpej Adjust for changes to config.
 1.47 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.46 13-Oct-1996  christos backout previous kprintf change
 1.45 12-Oct-1996  mhitch KDASSERT is now in lib/libkern/libkern.h, so we don't need
amiga/amiga/kdassert.h.
 1.44 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.43 02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.42 06-Jun-1996  mhitch Add tty_attach() calls for pstat -t. Closes PR #2519
 1.41 19-May-1996  is branches: 1.41.4;
Yet some more cleanup for missing prototypes, if DRACO is supported.
 1.40 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.39 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.38 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.37 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.36 16-Mar-1996  mhitch Removed Debugger() declaration - the prototype is in sys/systm.h.
 1.35 24-Feb-1996  chopps remove local strncmp (fixes #2115)
 1.34 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.33 20-Oct-1995  chopps cleanup warnings (fixes pr#1642)
 1.32 09-Oct-1995  chopps branches: 1.32.2;
add prototypes for isr stuff fixes pr# 1284 and 1569
 1.31 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.30 14-May-1995  chopps fix ITEIOC[GS]BELL and ITEIOCGREPT cases in iteioctl()
 1.29 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.28 23-Apr-1995  chopps bring up-to-date with recent conf.c and sunos changes.
 1.27 10-Apr-1995  mycroft Add dummy itestop(), and rename a few functions.
 1.26 02-Mar-1995  chopps allow 8 bit chars in ite.
 1.25 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.23 26-Oct-1994  cgd new RCS ID format.
 1.22 23-Jun-1994  chopps some various fixes from ahh@netcom.com (Andy Heffernan)
 1.21 16-Jun-1994  chopps fix boot diag output.
 1.20 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.18 31-May-1994  chopps MIN/MAX->min/max
 1.17 11-May-1994  chopps general cleanup including boot diag messages.
 1.16 09-May-1994  chopps update for recent sig changes and fix clock.c and ite.c
 1.15 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.14 20-Mar-1994  chopps yes ite is now auto margin, this fixes a conflict with the
termcap which has vt100 vt102 vt200 and v320 all as automargin.
 1.13 14-Mar-1994  chopps add LALT-LMETA-F10 to enter the kernel debugger.
 1.12 11-Mar-1994  chopps ack yucky dependenc on unit nums, temp hack for now.
 1.11 21-Feb-1994  chopps toss chars instead of outputing when in GRF mode.
 1.10 21-Feb-1994  chopps fixed a couple minor bugs in con code for ite. added floptical support in
sd.c (based on patch from Andreas E. Heitman).
 1.9 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.8 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.7 11-Feb-1994  chopps ioctl's always pass proc.
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.32.2.2 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.32.2.1 20-Oct-1995  chopps bring in changes from mainbranch (oops)
 1.41.4.1 06-Jun-1996  mhitch Pull up from trunk:
> Add tty_attach() calls for pstat -t. Closes PR #2519
 1.51.14.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.51.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.51.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.55.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.56.8.7 11-Nov-2002  nathanw Catch up to -current
 1.56.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.56.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.56.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.56.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.56.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.56.8.1 02-May-2001  nathanw file ite.c was added on branch nathanw_sa on 2002-02-28 04:06:48 +0000
 1.56.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.56.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.56.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.56.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.56.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.59.4.2 09-Jul-2002  gehenna catch up with -current.
 1.59.4.1 16-May-2002  gehenna Add the character device switch.
 1.64.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.64.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.64.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.64.6.4 21-Nov-2004  skrll Adapt to branch.
 1.64.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.64.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.64.6.1 03-Aug-2004  skrll Sync with HEAD
 1.67.8.1 29-Apr-2005  kent sync with -current
 1.68.2.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.70.2.5 07-Dec-2007  yamt sync with head
 1.70.2.4 27-Oct-2007  yamt sync with head.
 1.70.2.3 03-Sep-2007  yamt sync with head.
 1.70.2.2 30-Dec-2006  yamt sync with head.
 1.70.2.1 21-Jun-2006  yamt sync with head.
 1.72.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.72.10.3 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.72.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.72.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.72.8.2 11-Aug-2006  yamt sync with head
 1.72.8.1 24-May-2006  yamt sync with head.
 1.72.6.1 01-Jun-2006  kardel Sync with head.
 1.72.4.1 09-Sep-2006  rpaulo sync with head
 1.74.6.1 22-Oct-2006  yamt sync with head
 1.74.4.1 18-Nov-2006  ad Sync with head.
 1.75.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.76.10.1 03-Oct-2007  garbled Sync with HEAD
 1.76.4.1 11-Jul-2007  mjf Sync with head.
 1.76.2.4 03-Dec-2007  ad Sync with HEAD.
 1.76.2.3 03-Dec-2007  ad Sync with HEAD.
 1.76.2.2 23-Oct-2007  ad Sync with head.
 1.76.2.1 15-Jul-2007  ad Sync with head.
 1.78.14.2 21-Nov-2007  bouyer Sync with HEAD
 1.78.14.1 25-Oct-2007  bouyer Sync with HEAD.
 1.78.10.2 09-Jan-2008  matt sync with HEAD
 1.78.10.1 06-Nov-2007  matt sync with HEAD
 1.78.8.3 03-Dec-2007  joerg Sync with HEAD.
 1.78.8.2 21-Nov-2007  joerg Sync with HEAD.
 1.78.8.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.80.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.82.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.82.18.3 11-Mar-2010  yamt sync with head
 1.82.18.2 20-Jun-2009  yamt sync with head
 1.82.18.1 04-May-2009  yamt sync with head.
 1.82.16.2 17-Jun-2008  yamt sync with head.
 1.82.16.1 04-Jun-2008  yamt sync with head
 1.82.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.82.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.83.2.1 18-Jun-2008  simonb Sync with head.
 1.84.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.84.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.90.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.90.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.90.4.2 31-May-2011  rmind sync with head
 1.90.4.1 05-Mar-2011  rmind sync with head
 1.92.8.1 18-Feb-2012  mrg merge to -current.
 1.92.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.92.4.2 30-Oct-2012  yamt sync with head
 1.92.4.1 17-Apr-2012  yamt sync with head
 1.93.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.93.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.94.2.1 18-May-2014  rmind sync with head
 1.97.2.1 10-Aug-2014  tls Rebase.
 1.98.28.1 10-Jun-2019  christos Sync with HEAD
 1.98.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.40 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.39 18-Mar-2009  cegger branches: 1.39.62; 1.39.64;
bzero -> memset
 1.38 04-Mar-2007  christos branches: 1.38.44; 1.38.52; 1.38.58;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 11-Dec-2005  christos branches: 1.37.26;
merge ktrace-lwp.
 1.36 13-Jun-2005  jmc branches: 1.36.2;
Fix some shadowing of variables
 1.35 24-Feb-2004  wiz becuase -> because. From Peter Postma.
 1.34 31-May-2003  kristerw branches: 1.34.2;
Use __asm instead of asm, to keep lint happy.
 1.33 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.32 17-Mar-2002  atatat branches: 1.32.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.31 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.30 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.29 21-Jun-2000  is branches: 1.29.4; 1.29.8;
- auto-USE_C_BFOPS when !defined(__m68k__)
- for bold characters, only blit the leftmost ftwidth pixels per character
cell row. The rightmost row which used to be printed would have been
overwritten formerly by the next character on sequential output, so no
visible change will result most of the time.
This fixes two problems:
* USE_C_BFOPS (which only works for 8 pixel wide fonts) blits the same
for bold characters now... it used to print the rightmost 8 pixel columns
of the bold-smeared characters
* we no longer need a reserved 1 pixel column at the right end of the screen.
That is, a 640x400 screen will hold 80x50 charactes with the 8x8 font.
 1.28 24-May-2000  is branches: 1.28.4;
missed one line when converting m68k asm() to macro calls.
 1.27 20-Sep-1999  is branches: 1.27.2;
replace inline asm by macro calls, that expand to the original inline asm
or to C replacements depending on the USE_C_BFOPS option.
The C replacement only works for our 8 bit wide fonts.
 1.26 25-Mar-1999  is Defopting grf_cc configuration parameters
 1.25 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.24 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.23 02-Mar-1995  chopps allow 8 bit chars in ite.
 1.22 16-Feb-1995  chopps cleanup copyright stuff
 1.21 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.20 26-Oct-1994  cgd new RCS ID format.
 1.19 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.18 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.17 25-May-1994  chopps MIN() -> min()
 1.16 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.15 22-Apr-1994  chopps spaces pasted should be tabs
 1.14 22-Apr-1994  chopps Changed fonts. Added 2 non (c) fonts kf_8x{8,11}.c retina now uses
kf_8x8. CC console users can now choose between the provided fonts
or provide there own.
 1.13 10-Apr-1994  chopps little bit of KNiFeing, view and ite ioctl names cleaned. ite bell
values made sensical for users. (that is pitch,msec not period,count)
 1.12 30-Mar-1994  chopps remove dlists.h oops.
 1.11 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.10 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.9 11-Feb-1994  chopps Add missing Id's
 1.8 11-Feb-1994  chopps ioctl's always pass proc.
 1.7 30-Jan-1994  chopps Re-enabled views, fixed warning in serial driver.
 1.6 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.5 31-Oct-1993  mw Change gfx-drivers to used g_data for their private data, and use regaddr
for what it's meant, that's to point to the register area. Now, both
gfx drivers should be fairly controllable from user-level applications.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.27.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.28.4.1 25-Jun-2000  is Sync to -current (with releng permission):
Only plot font_width pixel colums even for bold chars.
The excess column would have been overwritten by the next sequentially written
character anyway. Besides, the C methods did not do this right at all.
As a result, a 640 pixel column screen now holds 80 character columns.
 1.29.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.29.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.29.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.29.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.29.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.29.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.32.4.1 16-May-2002  gehenna Call device interfaces via device switch, not directly.
 1.34.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.4 21-Nov-2004  skrll Adapt to branch.
 1.34.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1 03-Aug-2004  skrll Sync with HEAD
 1.36.2.2 03-Sep-2007  yamt sync with head.
 1.36.2.1 21-Jun-2006  yamt sync with head.
 1.37.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.38.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.38.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.38.44.1 04-May-2009  yamt sync with head.
 1.39.64.1 10-Jun-2019  christos Sync with HEAD
 1.39.62.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.11 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.10 18-Mar-2009  cegger bcopy -> memcpy
 1.9 05-Mar-2007  he branches: 1.9.44; 1.9.52; 1.9.58;
Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.8 11-Dec-2005  christos branches: 1.8.26;
merge ktrace-lwp.
 1.7 14-Oct-2004  mhitch branches: 1.7.12;
The gcc3 compiler optimized away writing character data to the Cirrus chip,
which results in a blank display - making it rather difficult to do an
install or upgrade when using a Cirrus-based display. Change the pointer
used to write the character and attribute to volatile. The console screen
now shows data and is usable.
 1.6 28-Jan-2002  aymeric branches: 1.6.16; 1.6.18;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 27-Jun-1999  is branches: 1.4.16; 1.4.20;
Don't even try to output to, scroll or clear the device if we are in graphics
mode. On this chip, we need to access some registers to set the text plane,
which messes up the graphics setup.
This should fix the grf3 problems reported by several people.
Michael Hitch and Joerg Lehners analyzed the problem and provided the fix.
 1.3 25-Mar-1999  is branches: 1.3.2; 1.3.4; 1.3.6;
defopt Amiga graphics console options
 1.2 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.3.6.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.3.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.3.2.1 28-Jun-1999  perry pullup 1.3->1.4 (is)
 1.4.20.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.16.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.18.1 12-Nov-2004  jmc Pullup rev 1.7 (requested by mhitch in ticket #923)

The gcc3 compiler optimized away writing character data to the Cirrus chip,
which results in a blank display - making it rather difficult to do an
install or upgrade when using a Cirrus-based display. Change the pointer
used to write the character and attribute to volatile. The console screen
now shows data and is usable.
 1.6.16.1 19-Oct-2004  skrll Sync with HEAD
 1.7.12.1 03-Sep-2007  yamt sync with head.
 1.8.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.44.2 11-Mar-2010  yamt sync with head
 1.9.44.1 04-May-2009  yamt sync with head.
 1.8 05-Mar-2007  he Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.7 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 28-Jan-2002  aymeric branches: 1.6.32; 1.6.70;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 25-Mar-1999  is branches: 1.4.22; 1.4.26;
defopt Amiga graphics console options
 1.3 19-May-1996  veego - grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.2 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 02-Mar-1996  veego console driver for the CyberVision64
 1.4.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.70.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.32.1 03-Sep-2007  yamt sync with head.
 1.7 05-Mar-2007  he Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.6 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5 28-Jan-2002  aymeric branches: 1.5.32; 1.5.70;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 25-Mar-1999  is branches: 1.3.22; 1.3.26;
defopt Amiga graphics console options
 1.2 10-Nov-1997  is Forgot this yestereve: s/CV64CONSOLE/CV3DCONSOLE/
 1.1 19-Oct-1997  veego branches: 1.1.2;
First version of the CyberVision 3D driver. This driver is based on
the CyberVision64 driver. Modified by Tobias Abt with some bugfixes
from Bernd Ernesti.
ZorroII is at the moment not supported and there is a small problem
with the Console driver where you just get a black screen, but the
system boots and you can use X11 without a problem.
 1.1.2.1 11-Nov-1997  mellon Pull rev 1.2 up from trunk (is)
 1.3.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.70.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.32.1 03-Sep-2007  yamt sync with head.
 1.12 05-Mar-2007  he Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.11 07-Jun-2006  he branches: 1.11.12;
Get rid of LHS casts by introducing a pair of local helper variables.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.14;
merge ktrace-lwp.
 1.9 13-Jun-2005  jmc branches: 1.9.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.8 30-Dec-2004  is Hardware pointers must be volatile.
Patch by Pawel Chwalowski via PR 28810, from a similar patch by Michael
Hitch to ite_cl.c.
 1.7 06-Sep-2004  is While in graphics mode, short-circuit text-mode functions that would destroy
graphics state. Same fix as ite_cl.c 1.4.
Problem reported, and original fix provided, by Pawel Chwalowski in PR 26788
(but had to be recreated because the original patch didn't apply due to
a whitespace problem).
 1.6 28-Jan-2002  aymeric branches: 1.6.10; 1.6.16; 1.6.18;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 25-Mar-1999  is branches: 1.4.22; 1.4.26;
defopt Amiga graphics console options
 1.3 05-Mar-1997  veego branches: 1.3.2;
- Merlin works now in ZorroIII mode
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- HiColor and TrueColor Support
- support for the Domino 16M proto card
 1.2 08-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.1 19-May-1996  veego branches: 1.1.4;
- grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.1.4.1 27-May-1996  is Fixes by Tobias Abt for Amiga Tseng driver: handle Zorro-III variants of these
boards correctly.
 1.3.2.2 05-Mar-1997  veego - Merlin works now in ZorroIII mode
- Fixes for Interlace and DoubleScan
- Memorysizedetction for 1MB Bords
- HiColor and TrueColor Support
- support for the Domino 16M proto card
 1.3.2.1 05-Mar-1997  veego file ite_et.c was added on branch is-newarp on 1997-03-05 22:50:42 +0000
 1.4.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.18.1 10-Sep-2004  jmc branches: 1.6.18.1.2;
Pullup rev 1.7 (requested by is in ticket #816)

While in graphics mode, short-circuit text-mode functions that would destroy
graphics state. PR#26788
 1.6.18.1.2.1 06-Apr-2005  he Pull up revision 1.8 (requested by is in ticket #1055):
Ensure that hardware pointers are volatile. Fixes PR#28810.
 1.6.16.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.16.3 17-Jan-2005  skrll Sync with HEAD.
 1.6.16.2 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.16.1 18-Sep-2004  skrll Sync with HEAD.
 1.6.10.1 11-Nov-2004  he Pull up revision 1.7 (requested by is in ticket #1742):
While in graphics mode, short-circuit text-mode functions
which would otherwise destroy graphics state. Fixes PR#26788.
 1.9.2.2 03-Sep-2007  yamt sync with head.
 1.9.2.1 21-Jun-2006  yamt sync with head.
 1.10.14.1 19-Jun-2006  chap Sync with head.
 1.10.8.1 26-Jun-2006  yamt sync with head.
 1.10.6.1 07-Jun-2006  kardel Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.12.1 12-Mar-2007  rmind Sync with HEAD.
 1.14 20-Dec-2017  msaitoh rt_init() in a comment must be rh_init(). Fix it.
 1.13 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.12 18-Mar-2009  cegger bcopy -> memcpy
 1.11 05-Mar-2007  he branches: 1.11.44; 1.11.52; 1.11.58;
Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.10 28-Jan-2002  aymeric branches: 1.10.32; 1.10.70;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.9 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.8 25-Mar-1999  is branches: 1.8.22; 1.8.26;
defopt Amiga graphics console options
 1.7 23-Apr-1996  veego Added some ifdef's for RETINA_SPEED_HACK
Argh, why is a fuction from the RetinaZ2 console driver in the console
driver for the RetinaZ3 ? Fixed.
Fixed some warnings from -Wall if you don't use -DDEBUG
 1.6 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.5 06-Apr-1995  chopps made current retina vertical scroll code conditional on the new
option RETINA_SPEED_HACK. Old commented code has been resurected.
This reportedly fixes the smear problems some retinas have.
John Vrolijk <dsnjvro@etmsun.etm.ericsson.se> noticed this.
 1.4 16-Feb-1995  chopps cleanup copyright stuff
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.1 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me.
 1.8.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.70.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.32.1 03-Sep-2007  yamt sync with head.
 1.11.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.44.2 11-Mar-2010  yamt sync with head
 1.11.44.1 04-May-2009  yamt sync with head.
 1.25 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.24 26-Oct-2009  cegger branches: 1.24.12; 1.24.22; 1.24.26;
kill extra whitespaces
reviewed by tsutsui@
 1.23 18-Mar-2009  cegger bcopy -> memcpy
 1.22 05-Mar-2007  he branches: 1.22.44; 1.22.52; 1.22.58;
Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.21 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.20 24-Dec-2005  perry branches: 1.20.26;
bare asm -> __asm
 1.19 06-Sep-2002  gehenna branches: 1.19.22;
Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.18 28-Jan-2002  aymeric branches: 1.18.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.17 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.16 23-Apr-1996  veego branches: 1.16.44; 1.16.48;
Added some ifdef's for RETINA_SPEED_HACK
Argh, why is a fuction from the RetinaZ2 console driver in the console
driver for the RetinaZ3 ? Fixed.
Fixed some warnings from -Wall if you don't use -DDEBUG
 1.15 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.14 08-Apr-1995  chopps fix typo
 1.13 06-Apr-1995  chopps made current retina vertical scroll code conditional on the new
option RETINA_SPEED_HACK. Old commented code has been resurected.
This reportedly fixes the smear problems some retinas have.
John Vrolijk <dsnjvro@etmsun.etm.ericsson.se> noticed this.
 1.12 16-Feb-1995  chopps cleanup copyright stuff
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.9 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.8 05-Apr-1994  chopps allow user to not use their retina board as the console.
 1.7 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.6 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 31-Oct-1993  mw Change gfx-drivers to used g_data for their private data, and use regaddr
for what it's meant, that's to point to the register area. Now, both
gfx drivers should be fairly controllable from user-level applications.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.16.48.2 17-Sep-2002  nathanw Catch up to -current.
 1.16.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.16.44.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.18.8.1 16-May-2002  gehenna Remove BANKEDDEVPAGER stuff.
 1.19.22.2 03-Sep-2007  yamt sync with head.
 1.19.22.1 21-Jun-2006  yamt sync with head.
 1.20.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.22.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.22.44.2 11-Mar-2010  yamt sync with head
 1.22.44.1 04-May-2009  yamt sync with head.
 1.24.26.1 18-May-2014  rmind sync with head
 1.24.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 26-Jan-1994  mycroft Clean up deleted files.
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.6 01-Mar-1995  mycroft Clean up deleted files.
 1.5 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.17 28-Aug-2023  andvar rename DEBUG_UL to UL_DEBUG for naming consistency.
remove stray UL_DEBUG definition in grf_ul.c
 1.16 28-Aug-2023  andvar fix format specifier from %lx to %hx, cmd has a type of u_int16_t.

fixes DEBUG_UL build for amiga (will be renamed to UL_DEBUG in next commit).
 1.15 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.14 14-Mar-2009  dsl branches: 1.14.62; 1.14.64;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.13 28-Apr-2008  martin branches: 1.13.8; 1.13.14;
Remove clause 3 and 4 from TNF licenses
 1.12 05-Mar-2007  he branches: 1.12.40; 1.12.42; 1.12.44;
Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.
Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
 1.11 28-Jan-2002  aymeric branches: 1.11.32; 1.11.70;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.10 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.9 16-Feb-1999  is branches: 1.9.22; 1.9.26;
Fix Copyright dates
 1.8 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.7 13-Oct-1996  christos backout previous kprintf change
 1.6 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.5 08-Jul-1996  is Cleaned up copyright notice, fixed a typo, and sync the comment in the
GSP assembler file with reality.
 1.4 10-May-1996  is Back out last change, which was caused by a wrong way merge at home.
Sorry for the inconvenience.
 1.3 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.2 27-Dec-1995  chopps cleanup for -Wall (pr#1559) from Ignatios Souvatzis
 1.1 18-Aug-1995  chopps new a2410 driver from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.9.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.9.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.70.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.32.1 03-Sep-2007  yamt sync with head.
 1.12.44.2 04-May-2009  yamt sync with head.
 1.12.44.1 16-May-2008  yamt sync with head.
 1.12.42.1 18-May-2008  yamt sync with head.
 1.12.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.64.1 10-Jun-2019  christos Sync with HEAD
 1.14.62.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.14 01-Nov-2021  andvar fix typos, mainly in words minimum and maximum, but also few others.
 1.13 07-Sep-2015  dholland Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.12 08-Feb-2011  rmind branches: 1.12.14; 1.12.32;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.11 11-Dec-2005  christos branches: 1.11.100; 1.11.106; 1.11.108;
merge ktrace-lwp.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 26-Oct-1994  cgd branches: 1.9.66;
new RCS ID format.
 1.8 11-May-1994  chopps general cleanup including boot diag messages.
 1.7 10-Apr-1994  chopps little bit of KNiFeing, view and ite ioctl names cleaned. ite bell
values made sensical for users. (that is pitch,msec not period,count)
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.9.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.66.1 03-Aug-2004  skrll Sync with HEAD
 1.11.108.1 17-Feb-2011  bouyer Sync with HEAD
 1.11.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.100.1 05-Mar-2011  rmind sync with head
 1.12.32.1 22-Sep-2015  skrll Sync with HEAD
 1.12.14.1 03-Dec-2017  jdolecek update from HEAD
 1.20 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19 04-Mar-2007  christos branches: 1.19.78; 1.19.88;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.18 11-Dec-2005  christos branches: 1.18.26;
merge ktrace-lwp.
 1.17 19-Jan-2005  chs branches: 1.17.8;
use a flag in the softc to indicate if an instance has been configured,
rather than a bit in 32-bit global variable indexed by unit number.
 1.16 06-Sep-2002  gehenna branches: 1.16.6; 1.16.14;
Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.15 26-Jan-2002  aymeric branches: 1.15.8;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.14 21-Apr-1996  veego branches: 1.14.42; 1.14.44; 1.14.48;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.13 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.12 20-Oct-1995  chopps cleanup warnings (fixes pr#1642)
 1.11 20-Aug-1995  chopps branches: 1.11.2;
fix protos (#1390) from Bernd Ernesti <bernd@arresum.inka.de>
 1.10 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.7 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11.2.2 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11.2.1 20-Oct-1995  chopps bring in changes from mainbranch (oops)
 1.14.48.2 17-Sep-2002  nathanw Catch up to -current.
 1.14.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.14.44.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.14.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.14.42.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.15.8.1 16-May-2002  gehenna Remove unnecessary prototypes.
 1.16.14.1 29-Apr-2005  kent sync with -current
 1.16.6.2 24-Jan-2005  skrll Sync with HEAD.
 1.16.6.1 21-Nov-2004  skrll Adapt to branch.
 1.17.8.2 03-Sep-2007  yamt sync with head.
 1.17.8.1 21-Jun-2006  yamt sync with head.
 1.18.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.88.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.78.1 30-Oct-2012  yamt sync with head
 1.39 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.38 24-Apr-2021  thorpej branches: 1.38.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.37 22-Jan-2014  christos branches: 1.37.44;
gcc-4.8.x unused variable fixes
 1.36 27-Oct-2012  chs branches: 1.36.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.35 11-Dec-2005  christos branches: 1.35.112; 1.35.122;
merge ktrace-lwp.
 1.34 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 02-Oct-2002  thorpej branches: 1.32.6;
Use CFATTACH_DECL().
 1.31 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.30 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.29 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.28 25-Apr-2001  bouyer branches: 1.28.2; 1.28.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.27 10-Jan-1999  tron branches: 1.27.8; 1.27.20;
Don't use void pointer for arithmetic.
 1.26 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.25 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.24 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.23 12-Jan-1998  thorpej Adjust for changes to config.
 1.22 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.21 23-Dec-1996  veego branches: 1.21.8; 1.21.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.20 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.19 13-Oct-1996  christos backout previous kprintf change
 1.18 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.17 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.16 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.15 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.14 28-Mar-1996  is The interrupt routine of the ivsc (and the empsc, which seems to have copied
it) looks truncated. At least the return(1) is missing, which I now add as
a first stopgap. Somebody needs to find out if anything else is missing for
these boards.
 1.13 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.12 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.10 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.9 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.8 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 06-Oct-1994  chopps branches: 1.4.2;
fix a couple warnings.
 1.3 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.4.2.2 06-Oct-1994  chopps fix a couple warnings.
 1.4.2.1 06-Oct-1994  chopps file ivsc.c was added on branch netbsd-1-0 on 1994-10-06 20:34:26 +0000
 1.21.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.27.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.28.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.28.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.28.8.1 25-Apr-2001  nathanw file ivsc.c was added on branch nathanw_sa on 2002-02-28 04:06:50 +0000
 1.28.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.28.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.32.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.6.1 03-Aug-2004  skrll Sync with HEAD
 1.35.122.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.35.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.35.112.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.35.112.1 30-Oct-2012  yamt sync with head
 1.36.2.1 18-May-2014  rmind sync with head
 1.37.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.38.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.62 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.61 07-Aug-2021  thorpej branches: 1.61.12;
Merge thorpej-cfargs2.
 1.60 03-Jun-2021  rin branches: 1.60.2;
kbd(4) and ms(4) carry multiple interface attributes. They are configurable
both as standalone drivers for legacy framebuffer console, or parents of
wskbd(4) and wsmouse(4), respectively. For the latter, be explicit about
using "wskbddev" and "wsmousedev" interface attributes for children.
 1.59 24-Apr-2021  thorpej branches: 1.59.2; 1.59.6;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.58 24-Feb-2019  jandberg branches: 1.58.14;
fix comment
 1.57 25-Jul-2014  dholland branches: 1.57.28;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.56 16-Mar-2014  dholland branches: 1.56.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.55 27-Oct-2012  chs branches: 1.55.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.54 03-Jun-2011  matt branches: 1.54.2; 1.54.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.53 12-Dec-2009  phx branches: 1.53.4; 1.53.6; 1.53.10;
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.52 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.51 12-Jan-2009  mhitch branches: 1.51.2;
Retain compatibility with old firm_event. Old Xamiga binary now works with
-current kernel.
 1.50 28-Dec-2007  joerg branches: 1.50.6; 1.50.10; 1.50.18; 1.50.20; 1.50.26;
Prepare for timecounter support on amiga.
 1.49 04-Mar-2007  christos branches: 1.49.20; 1.49.26; 1.49.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.48 11-Dec-2005  christos branches: 1.48.26;
merge ktrace-lwp.
 1.47 01-Jun-2005  jandberg branches: 1.47.2;
Tell kbd when it is the console keyboard instead of always assuming
it is. Also console keyboard initialization is now made during consinit
instead of autoconf.
Reviewed by <is>.
 1.46 21-Sep-2003  jdolecek cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
the owner of descriptor, according to appropriate sematics
of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
 1.45 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.44 06-Jan-2003  wiz branches: 1.44.2;
interrupt with two rs.
 1.43 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.42 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.41 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.40 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.39 17-Mar-2002  atatat branches: 1.39.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.38 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.37 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.36 13-Jan-2002  jandberg wskbd updates.
kbd.c: Now identifies itself as WSKBD_TYPE_AMIGA.
wskbdmap_amiga.c: Updated de/dk/sv/no keymaps.
 1.35 02-Feb-2001  is branches: 1.35.2; 1.35.4; 1.35.8;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.34 25-May-2000  is Prepare for AmigaPPC.
 1.33 26-Jul-1998  is branches: 1.33.14;
yet more atomic operations accessing DraCo registers
 1.32 08-Mar-1998  is Conditionally (on defined(DRACO)) compile new DraCo keyboard code sequences.
Pointed out by Bernd Ernesti.
 1.31 28-Feb-1998  is Probe for the native DraCo (rekeycaped MF-II) keyboard, instead of guessing
it from the QuickLogic chip version byte.
If found, switch it to non-autorepeat mode (which seems to avoid the race
condition which made my keyboard driver / X server lose state under heavy
interupt load).
If not found, assume an Amiga keyboard on CIA-A.
XXX We should probe for the presence of the CIAs on the DraCo.
 1.30 23-Feb-1998  is Initialize keyboard structures also from kbdopen(), if necessary.
To do this, move the flag variable to kbdenable().
This will make kernels with serial console provice a working keyboard driver.
 1.29 12-Jan-1998  thorpej Adjust for changes to config.
 1.28 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.27 30-Nov-1996  is The DraCo MF-II to Amiga translation table is const-ant.
 1.26 13-Oct-1996  christos backout previous kprintf change
 1.25 11-Oct-1996  mhitch Changes for poll(2).
 1.24 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.23 14-Sep-1996  is Kill two debug printfs whose output always haunt me in the boot
messages, but which I didn't find when looking for then.
 1.22 16-May-1996  is merge.
 1.21 16-May-1996  is Correct a -Wall correction.
 1.20 10-May-1996  is Cleanup the mess I left when committing yestereve's changes; in this case,
an unused variable.
 1.19 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.18 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.17 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.16 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.15 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.14 10-Apr-1995  mycroft Nuke write routines.
 1.13 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.12 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 06-Oct-1994  chopps branches: 1.10.2;
Add Amiga 1200 support (kbd and ide) from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.8 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.7 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.2.2 06-Oct-1994  chopps Add Amiga 1200 support (kbd and ide) from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10.2.1 06-Oct-1994  chopps file kbd.c was added on branch netbsd-1-0 on 1994-10-06 19:54:31 +0000
 1.33.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.33.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.35.8.6 07-Jan-2003  thorpej Sync with HEAD.
 1.35.8.5 11-Nov-2002  nathanw Catch up to -current
 1.35.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.35.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.35.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.35.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.35.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.35.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.35.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.35.4.1 09-Sep-2001  thorpej Add kqueue support (not yet compiled).
 1.35.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.39.4.1 16-May-2002  gehenna Add the character device switch.
 1.44.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.44.2.4 21-Nov-2004  skrll Adapt to branch.
 1.44.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.44.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.44.2.1 03-Aug-2004  skrll Sync with HEAD
 1.47.2.3 21-Jan-2008  yamt sync with head
 1.47.2.2 03-Sep-2007  yamt sync with head.
 1.47.2.1 21-Jun-2006  yamt sync with head.
 1.48.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.49.32.1 02-Jan-2008  bouyer Sync with HEAD
 1.49.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.49.20.1 09-Jan-2008  matt sync with HEAD
 1.50.26.1 20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.50.20.1 16-Jul-2010  riz Pull up following revision(s) (requested by phx in ticket #1412):
sys/arch/amiga/dev/clock.c: revision 1.51
sys/arch/amiga/amiga/locore.s: revision 1.149 via patch
sys/arch/amiga/dev/kbd.c: revision 1.53
sys/arch/amiga/amiga/amiga_init.c: revision 1.118
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
 1.50.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.50.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.50.10.2 11-Mar-2010  yamt sync with head
 1.50.10.1 04-May-2009  yamt sync with head.
 1.50.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.51.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.53.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.53.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.53.4.1 12-Jun-2011  rmind sync with head
 1.54.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.54.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.54.2.1 30-Oct-2012  yamt sync with head
 1.55.2.1 18-May-2014  rmind sync with head
 1.56.2.1 10-Aug-2014  tls Rebase.
 1.57.28.1 10-Jun-2019  christos Sync with HEAD
 1.58.14.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.59.6.1 06-Jun-2021  cjep sync with head
 1.59.2.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.60.2.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.61.12.1 02-Aug-2025  perseant Sync with HEAD
 1.13 08-Aug-2014  joerg Avoid non-UTF8 input.
 1.12 28-Jan-2002  aymeric branches: 1.12.166; 1.12.182;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.11 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 06-Sep-1997  veego branches: 1.10.32; 1.10.36;
Add missing keypad entry for '+' and correct a comment. From pr#3893.
 1.9 21-Apr-1996  veego branches: 1.9.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.8 16-Feb-1995  chopps cleanup copyright stuff
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.9.12.1 06-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.10.36.1 28-Feb-2002  nathanw Catch up to -current.
 1.10.32.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.182.1 10-Aug-2014  tls Rebase.
 1.12.166.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 21-Apr-1996  veego branches: 1.10.44; 1.10.48;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.9 07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.8 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.7 16-Feb-1995  chopps cleanup copyright stuff
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.10.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8 07-Sep-2015  dholland Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.7 11-Dec-2005  christos branches: 1.7.122; 1.7.142;
merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 26-Oct-1994  cgd branches: 1.5.66;
new RCS ID format.
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.5.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.66.1 03-Aug-2004  skrll Sync with HEAD
 1.7.142.1 22-Sep-2015  skrll Sync with HEAD
 1.7.122.1 03-Dec-2017  jdolecek update from HEAD
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 01-Jun-2005  jandberg branches: 1.1.8;
Tell kbd when it is the console keyboard instead of always assuming
it is. Also console keyboard initialization is now made during consinit
instead of autoconf.
Reviewed by <is>.
 1.1.8.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.1 01-Jun-2005  skrll file kbdvar.h was added on branch ktrace-lwp on 2005-11-10 13:51:36 +0000
 1.5 22-Apr-1994  mycroft Clean up deleted files.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.7 19-Apr-2002  heinz Removed the files after renaming to kf_iso8859_1_* (in agreement with
is@netbsd.org).
 1.6 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 21-Oct-1997  is branches: 1.4.28; 1.4.32;
Make l different from |.
Downgrades PR 1998 from software bug to change request.
 1.3 26-Oct-1994  cgd branches: 1.3.18;
new RCS ID format.
 1.2 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.1 22-Apr-1994  chopps Changed fonts. Added 2 non (c) fonts kf_8x{8,11}.c retina now uses
kf_8x8. CC console users can now choose between the provided fonts
or provide there own.
 1.3.18.1 22-Oct-1997  mellon pull up from main trunk
 1.4.32.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.32.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.28.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.28.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.7 19-Apr-2002  heinz Removed the files after renaming to kf_iso8859_1_* (in agreement with
is@netbsd.org).
 1.6 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.5 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 21-Oct-1997  is branches: 1.4.28; 1.4.32;
Make l different from |.
Downgrades PR 1998 from software bug to change request.
 1.3 26-Oct-1994  cgd branches: 1.3.18;
new RCS ID format.
 1.2 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.1 22-Apr-1994  chopps Changed fonts. Added 2 non (c) fonts kf_8x{8,11}.c retina now uses
kf_8x8. CC console users can now choose between the provided fonts
or provide there own.
 1.3.18.1 22-Oct-1997  mellon pull up from main trunk
 1.4.32.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.32.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.28.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.28.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1 17-Apr-2002  heinz branches: 1.1.6; 1.1.8;
Renamed kf_8x8.c and kf_8x11.c to kf_iso8859_1_8x8.c and kf_iso8859_1_8x11.c
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 17-Apr-2002  jdolecek file kf_iso8859_1_8x11.c was added on branch kqueue on 2002-06-23 17:34:29 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 17-Apr-2002  nathanw file kf_iso8859_1_8x11.c was added on branch nathanw_sa on 2002-06-20 03:37:54 +0000
 1.1 17-Apr-2002  heinz branches: 1.1.6; 1.1.8;
Renamed kf_8x8.c and kf_8x11.c to kf_iso8859_1_8x8.c and kf_iso8859_1_8x11.c
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 17-Apr-2002  jdolecek file kf_iso8859_1_8x8.c was added on branch kqueue on 2002-06-23 17:34:29 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 17-Apr-2002  nathanw file kf_iso8859_1_8x8.c was added on branch nathanw_sa on 2002-06-20 03:37:54 +0000
 1.1 17-Apr-2002  heinz branches: 1.1.6; 1.1.8;
Add East European (iso8859-2) console fonts
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 17-Apr-2002  jdolecek file kf_iso8859_2_8x11.c was added on branch kqueue on 2002-06-23 17:34:30 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 17-Apr-2002  nathanw file kf_iso8859_2_8x11.c was added on branch nathanw_sa on 2002-06-20 03:37:54 +0000
 1.1 17-Apr-2002  heinz branches: 1.1.6; 1.1.8;
Add East European (iso8859-2) console fonts
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 17-Apr-2002  jdolecek file kf_iso8859_2_8x8.c was added on branch kqueue on 2002-06-23 17:34:30 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 17-Apr-2002  nathanw file kf_iso8859_2_8x8.c was added on branch nathanw_sa on 2002-06-20 03:37:54 +0000
 1.14 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.
 1.13 23-Nov-2009  rmind Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.12 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11 07-Mar-2008  cube branches: 1.11.2; 1.11.4;
Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
 1.10 02-Oct-2002  thorpej branches: 1.10.22; 1.10.84; 1.10.104; 1.10.108;
Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 22-Jun-1999  is branches: 1.6.16; 1.6.20;
Align adresses better
 1.5 16-Feb-1999  is branches: 1.5.4;
Fix Copyright dates
 1.4 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.3 18-Jul-1998  is Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).
 1.2 11-Apr-1998  is amiga_ttyspl -> amiga_serialspl (and keep ttyspl constant at 4 again).
(Part of this change slipped in with my last machdep commit; thanks to
Matthias Scheler for pointing this out).
 1.1 27-Sep-1997  is branches: 1.1.2;
First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.1.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Sep-1997  thorpej file lpt_supio.c was added on branch marc-pcmcia on 1997-10-14 08:26:41 +0000
 1.5.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.6.20.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.20.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.16.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.16.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.108.2 02-Jun-2008  mjf Sync with HEAD.
 1.10.108.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.104.1 24-Mar-2008  keiichi sync with head.
 1.10.84.1 23-Mar-2008  matt sync with HEAD
 1.10.22.1 17-Mar-2008  yamt sync with head.
 1.11.4.2 11-Mar-2010  yamt sync with head
 1.11.4.1 16-May-2008  yamt sync with head.
 1.11.2.1 18-May-2008  yamt sync with head.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3 21-Jan-2002  jdolecek Switch to MI dev/md_root.c for archs which don't have any special
memory disk hooks (i.e. everything except atari).
 1.2 17-Mar-1999  sommerfe branches: 1.2.22; 1.2.26;
defopt MINIROOTSIZE
 1.1 03-Jul-1998  mhitch Add memory disk.
 1.2.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.22.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.19 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.18 27-Oct-2012  chs branches: 1.18.38; 1.18.40;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.17 23-Nov-2011  jmcneill branches: 1.17.8;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.
 1.16 19-Jul-2011  dyoung branches: 1.16.2; 1.16.4;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.15 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.14 17-Oct-2007  garbled branches: 1.14.16; 1.14.18; 1.14.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.13 07-Sep-2007  lukem Fix caddr_t fallout; use "uint8_t *" as the type for sc_intack because that
seems it will result in the closest behaviour to that of the caddr_t
abusing code (which did, amongst other things, " *sc->sc_intack = 0; ".)
 1.12 04-Mar-2007  christos branches: 1.12.2; 1.12.10; 1.12.14; 1.12.18; 1.12.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 02-Oct-2002  thorpej branches: 1.11.22; 1.11.60; 1.11.62;
Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.8 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 23-Jan-2000  aymeric branches: 1.7.8; 1.7.12;
sync with new bus.h
 1.6 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.5 16-Feb-1999  is branches: 1.5.8;
Fix Copyright dates
 1.4 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.3 10-Jan-1999  tron Don't use void pointer for arithmetic.
 1.2 12-Jan-1998  thorpej Adjust for changes to config.
 1.1 16-Oct-1997  is TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.7.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.7.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.62.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.11.60.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.22.2 27-Oct-2007  yamt sync with head.
 1.11.22.1 03-Sep-2007  yamt sync with head.
 1.12.20.1 06-Nov-2007  matt sync with HEAD
 1.12.18.1 02-Oct-2007  joerg Sync with HEAD.
 1.12.14.1 10-Sep-2007  skrll Sync with HEAD.
 1.12.10.1 03-Oct-2007  garbled Sync with HEAD
 1.12.2.1 09-Oct-2007  ad Sync with head.
 1.14.20.1 16-May-2008  yamt sync with head.
 1.14.18.1 18-May-2008  yamt sync with head.
 1.14.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 20-Nov-2011  jmcneill adapt to audiomp api changes
 1.16.2.2 30-Oct-2012  yamt sync with head
 1.16.2.1 17-Apr-2012  yamt sync with head
 1.17.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.40.1 25-Apr-2019  isaki Adapt to audio2.
- Starting playback in init_output() no longer works.
Introduce sc_active flag instead and do it in start_output().
 1.18.38.1 10-Jun-2019  christos Sync with HEAD
 1.62 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.61 26-Oct-2022  riastradh branches: 1.61.8;
amiga/mfc(4): Convert to ttylock/ttyunlock.
 1.60 21-Oct-2021  andvar fix various typos, mainly in comments, but also in man pages and log messages.
 1.59 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.58 24-Apr-2021  thorpej branches: 1.58.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.57 25-Jul-2014  dholland branches: 1.57.8; 1.57.18; 1.57.42;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.56 16-Mar-2014  dholland branches: 1.56.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.55 27-Oct-2012  chs branches: 1.55.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.54 24-Apr-2011  rmind branches: 1.54.4; 1.54.14;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.53 26-Oct-2009  cegger branches: 1.53.4; 1.53.6;
kill extra whitespaces
reviewed by tsutsui@
 1.52 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.51 18-Mar-2009  cegger bcopy -> memcpy
 1.50 11-Jun-2008  tsutsui branches: 1.50.4; 1.50.10;
Use device_private() and device_lookup_private() to get softc.
 1.49 25-May-2008  ad branches: 1.49.2;
Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()
some time again.
 1.48 19-Nov-2007  ad branches: 1.48.14; 1.48.16; 1.48.18; 1.48.20;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.47 07-Nov-2007  ad Merge tty changes from the vmlocking branch.
 1.46 04-Mar-2007  christos branches: 1.46.2; 1.46.18; 1.46.20; 1.46.24; 1.46.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.45 24-Jan-2007  hubertf branches: 1.45.2;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.44 01-Oct-2006  elad More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.43 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN, batch #2 from Matt Fleming, thanks!

Also, add forgotten splx() calls in some places.
 1.42 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.41 23-Jul-2006  ad branches: 1.41.4; 1.41.6;
Use the LWP cached credentials where sane.
 1.40 14-May-2006  elad integrate kauth.
 1.39 26-Mar-2006  thorpej Use device_unit().
 1.38 11-Dec-2005  christos branches: 1.38.4; 1.38.6; 1.38.8; 1.38.10; 1.38.12;
merge ktrace-lwp.
 1.37 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.36 13-Jun-2005  jmc branches: 1.36.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.35 25-Apr-2004  matt Constify the speedtab arrays
 1.34 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 23-Oct-2002  jdolecek branches: 1.32.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.31 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.30 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.29 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.28 17-Mar-2002  atatat branches: 1.28.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.27 17-Feb-2002  veego Add a missing ) from an 6 year old cleanup commit (rev 1.10):
s/sizeof(struct mfcp_softc,/sizeof(struct mfcp_softc),/
Noticed by Nagilum on irc.
 1.26 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.25 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.24 30-May-2001  lukem branches: 1.24.2; 1.24.4; 1.24.8;
add missing #include "opt_kgdb.h"
 1.23 02-May-2001  scw Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.22 13-Jan-2001  aymeric branches: 1.22.2;
Make these compile again, plus minor aesthetic changes.
 1.21 02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.20 01-Sep-1998  mhitch branches: 1.20.12;
Quick fix for TS_WOPEN -> t_wopen change. Compiles and works.
 1.19 12-Jan-1998  thorpej Adjust for changes to config.
 1.18 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.17 13-Oct-1996  christos backout previous kprintf change
 1.16 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.15 02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.14 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.13 06-Jun-1996  mhitch Add tty_attach() calls for pstat -t. Closes PR #2519
 1.12 21-Apr-1996  veego branches: 1.12.4;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.11 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.10 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.9 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.8 09-Oct-1995  chopps branches: 1.8.2;
add prototypes for isr stuff fixes pr# 1284 and 1569
 1.7 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 04-Jul-1995  chopps misc cleanup, better tty alloc for mfc. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 23-Apr-1995  chopps bring up-to-date with recent conf.c and sunos changes.
 1.4 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 02-Mar-1995  chopps fix long standing bug with A2091 and dma.
Move the copy from bounce buffer after dmafree() in the case of
the A2091 this allows the dma fifo to be flushed.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.1 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8.2.1 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12.4.1 06-Jun-1996  mhitch Pull up from trunk:
> Add tty_attach() calls for pstat -t. Closes PR #2519
 1.20.12.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.20.12.1 22-Nov-2000  bouyer Sync with HEAD.
 1.22.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.24.8.6 11-Nov-2002  nathanw Catch up to -current
 1.24.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.24.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.24.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.24.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.24.8.1 30-May-2001  nathanw file mfc.c was added on branch nathanw_sa on 2002-02-28 04:06:52 +0000
 1.24.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.24.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.24.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.24.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.24.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.24.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.28.4.1 16-May-2002  gehenna Add the character device switch.
Replace the direct-access to devsw table with calling devsw API.
 1.32.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.32.6.4 21-Nov-2004  skrll Adapt to branch.
 1.32.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.6.1 03-Aug-2004  skrll Sync with HEAD
 1.36.2.6 07-Dec-2007  yamt sync with head
 1.36.2.5 15-Nov-2007  yamt sync with head.
 1.36.2.4 03-Sep-2007  yamt sync with head.
 1.36.2.3 26-Feb-2007  yamt sync with head.
 1.36.2.2 30-Dec-2006  yamt sync with head.
 1.36.2.1 21-Jun-2006  yamt sync with head.
 1.38.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.38.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.38.10.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.38.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.38.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.38.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.38.8.3 11-Aug-2006  yamt sync with head
 1.38.8.2 24-May-2006  yamt sync with head.
 1.38.8.1 01-Apr-2006  yamt sync with head.
 1.38.6.2 01-Jun-2006  kardel Sync with head.
 1.38.6.1 22-Apr-2006  simonb Sync with head.
 1.38.4.1 09-Sep-2006  rpaulo sync with head
 1.41.6.1 22-Oct-2006  yamt sync with head
 1.41.4.2 01-Feb-2007  ad Sync with head.
 1.41.4.1 18-Nov-2006  ad Sync with head.
 1.45.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.46.26.2 08-Dec-2007  mjf Sync with HEAD.
 1.46.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.46.24.2 21-Nov-2007  bouyer Sync with HEAD
 1.46.24.1 13-Nov-2007  bouyer Sync with HEAD
 1.46.20.2 09-Jan-2008  matt sync with HEAD
 1.46.20.1 08-Nov-2007  matt sync with -HEAD
 1.46.18.2 21-Nov-2007  joerg Sync with HEAD.
 1.46.18.1 11-Nov-2007  joerg Sync with HEAD.
 1.46.2.1 03-Dec-2007  ad Sync with HEAD.
 1.48.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.48.18.3 11-Mar-2010  yamt sync with head
 1.48.18.2 20-Jun-2009  yamt sync with head
 1.48.18.1 04-May-2009  yamt sync with head.
 1.48.16.2 17-Jun-2008  yamt sync with head.
 1.48.16.1 04-Jun-2008  yamt sync with head
 1.48.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.48.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.49.2.1 18-Jun-2008  simonb Sync with head.
 1.50.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.50.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.53.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.53.4.1 31-May-2011  rmind sync with head
 1.54.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.54.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.54.4.1 30-Oct-2012  yamt sync with head
 1.55.2.1 18-May-2014  rmind sync with head
 1.56.2.1 10-Aug-2014  tls Rebase.
 1.57.42.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.57.18.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.57.8.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.57.8.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.58.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.61.8.1 02-Aug-2025  perseant Sync with HEAD
 1.48 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.47 24-Apr-2021  thorpej branches: 1.47.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.46 27-Oct-2012  chs branches: 1.46.18; 1.46.28; 1.46.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.45 20-Dec-2010  matt branches: 1.45.8; 1.45.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.44 19-May-2009  phx branches: 1.44.4;
Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.43 13-Jun-2008  cegger use device_lookup_private to get softc
 1.42 05-Mar-2007  he branches: 1.42.40; 1.42.42; 1.42.44; 1.42.46; 1.42.48;
Use char* for pointer arithmetic.
 1.41 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.40 08-Mar-2006  lukem branches: 1.40.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.39 11-Dec-2005  christos branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10;
merge ktrace-lwp.
 1.38 28-Mar-2004  mhitch branches: 1.38.16;
Remove license clauses 3 and 4 in my licenses.
 1.37 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.36 09-Apr-2003  thorpej branches: 1.36.2;
Use PAGE_SIZE rather than NBPG.
 1.35 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.34 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.33 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.32 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.31 25-Apr-2001  bouyer branches: 1.31.2; 1.31.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.30 10-Jan-1999  tron branches: 1.30.8; 1.30.20;
Don't use void pointer for arithmetic.
 1.29 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.28 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.27 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.26 12-Jan-1998  thorpej Adjust for changes to config.
 1.25 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.24 23-Dec-1996  veego branches: 1.24.8; 1.24.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.23 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.22 13-Oct-1996  christos backout previous kprintf change
 1.21 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.20 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.19 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.18 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.17 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.16 15-Mar-1996  mhitch Correct 53c710 initialization for the A4000T. Remove the A4000T probe
debugging output.
 1.15 09-Oct-1995  chopps add prototypes for isr stuff fixes pr# 1284 and 1569
 1.14 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 05-Mar-1995  chopps add recognition of GVP 530 and change magnum scsi interrupt level to 6
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.9 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 27-Sep-1994  chopps branches: 1.5.2;
Fix serious typo.
 1.4 16-Jun-1994  chopps branches: 1.4.2;
fix boot diag output.
 1.3 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.2 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.4.2.1 29-Sep-1994  cgd from trunk, per chopps.
 1.5.2.2 27-Sep-1994  chopps Fix serious typo.
 1.5.2.1 27-Sep-1994  chopps file mgnsc.c was added on branch netbsd-1-0 on 1994-09-27 05:08:00 +0000
 1.24.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.24.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.30.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.30.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.31.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.31.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.31.8.1 25-Apr-2001  nathanw file mgnsc.c was added on branch nathanw_sa on 2002-02-28 04:06:53 +0000
 1.31.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.31.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.38.16.2 03-Sep-2007  yamt sync with head.
 1.38.16.1 21-Jun-2006  yamt sync with head.
 1.39.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.39.8.1 13-Mar-2006  yamt sync with head.
 1.39.6.1 22-Apr-2006  simonb Sync with head.
 1.39.4.1 09-Sep-2006  rpaulo sync with head
 1.40.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.42.48.1 18-Jun-2008  simonb Sync with head.
 1.42.46.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.42.44.2 20-Jun-2009  yamt sync with head
 1.42.44.1 04-May-2009  yamt sync with head.
 1.42.42.1 17-Jun-2008  yamt sync with head.
 1.42.40.1 29-Jun-2008  mjf Sync with HEAD.
 1.44.4.1 05-Mar-2011  rmind sync with head
 1.45.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.45.8.1 30-Oct-2012  yamt sync with head
 1.46.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.46.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.46.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.46.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.47.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 25-Mar-1994  chopps move HIST out of DEBUG conditional.
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.34 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33 24-Apr-2021  thorpej branches: 1.33.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.32 22-Jan-2014  christos branches: 1.32.44;
gcc-4.8.x unused variable fixes
 1.31 27-Oct-2012  chs branches: 1.31.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.30 11-Dec-2005  christos branches: 1.30.112; 1.30.122;
merge ktrace-lwp.
 1.29 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.28 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.27 02-Oct-2002  thorpej branches: 1.27.6;
Use CFATTACH_DECL().
 1.26 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.25 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.24 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.23 25-Apr-2001  bouyer branches: 1.23.2; 1.23.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.22 05-Dec-1998  mjacob branches: 1.22.10; 1.22.22;
Update HBAs to incorporate the new max_lun property.
 1.21 28-Nov-1998  is Fix typo.
 1.20 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.19 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.18 12-Jan-1998  thorpej Adjust for changes to config.
 1.17 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.16 23-Dec-1996  veego branches: 1.16.8; 1.16.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.15 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.14 13-Oct-1996  christos backout previous kprintf change
 1.13 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.11 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.10 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.9 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.16.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.16.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.22.22.1 21-Jun-2001  nathanw Catch up to -current.
 1.22.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.23.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.23.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.23.8.1 25-Apr-2001  nathanw file mlhsc.c was added on branch nathanw_sa on 2002-02-28 04:06:53 +0000
 1.23.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.23.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.27.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.27.6.1 03-Aug-2004  skrll Sync with HEAD
 1.30.122.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.30.112.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.112.1 30-Oct-2012  yamt sync with head
 1.31.2.1 18-May-2014  rmind sync with head
 1.32.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.33.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 04-Oct-2017  rkujawa branches: 1.3.2; 1.3.20;
Update driver to support firmware v1.5+.

From Lukas F. Hartmann. With hopeful style fixes from me.
 1.2 23-Oct-2016  phx branches: 1.2.2;
Fixed WSCONS kernels. The cnprobe function must only be called when
MNTVA_CONSOLE is defined.
 1.1 03-Oct-2016  rkujawa branches: 1.1.2;
Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 05-Oct-2016  skrll Sync with HEAD
 1.1.2.1 03-Oct-2016  skrll file mntva.c was added on branch nick-nhusb on 2016-10-05 20:55:24 +0000
 1.2.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.2.2.1 23-Oct-2016  pgoyette file mntva.c was added on branch pgoyette-localcount on 2016-11-04 14:48:57 +0000
 1.3.20.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 04-Oct-2017  jdolecek file mntva.c was added on branch tls-maxphys on 2017-12-03 11:35:48 +0000
 1.4.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.2 04-Oct-2017  rkujawa branches: 1.2.2;
Update driver to support firmware v1.5+.

From Lukas F. Hartmann. With hopeful style fixes from me.
 1.1 03-Oct-2016  rkujawa branches: 1.1.2; 1.1.4;
Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.1.4.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.4.1 03-Oct-2016  pgoyette file mntvareg.h was added on branch pgoyette-localcount on 2016-11-04 14:48:57 +0000
 1.1.2.2 05-Oct-2016  skrll Sync with HEAD
 1.1.2.1 03-Oct-2016  skrll file mntvareg.h was added on branch nick-nhusb on 2016-10-05 20:55:24 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 04-Oct-2017  jdolecek file mntvareg.h was added on branch tls-maxphys on 2017-12-03 11:35:48 +0000
 1.2 04-Oct-2017  rkujawa branches: 1.2.2;
Update driver to support firmware v1.5+.

From Lukas F. Hartmann. With hopeful style fixes from me.
 1.1 03-Oct-2016  rkujawa branches: 1.1.2; 1.1.4;
Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.1.4.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.4.1 03-Oct-2016  pgoyette file mntvavar.h was added on branch pgoyette-localcount on 2016-11-04 14:48:57 +0000
 1.1.2.2 05-Oct-2016  skrll Sync with HEAD
 1.1.2.1 03-Oct-2016  skrll file mntvavar.h was added on branch nick-nhusb on 2016-10-05 20:55:24 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 04-Oct-2017  jdolecek file mntvavar.h was added on branch tls-maxphys on 2017-12-03 11:35:48 +0000
 1.43 01-Aug-2022  rin ms_wscons_ioctl(): Return EPASSTHROUGH instead of -1, for unsupported
ioctl, as done for other backends of wsmouse(4).
 1.42 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.41 03-Jun-2021  rin branches: 1.41.2;
kbd(4) and ms(4) carry multiple interface attributes. They are configurable
both as standalone drivers for legacy framebuffer console, or parents of
wskbd(4) and wsmouse(4), respectively. For the latter, be explicit about
using "wskbddev" and "wsmousedev" interface attributes for children.
 1.40 24-Apr-2021  thorpej branches: 1.40.2; 1.40.6;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.39 25-Jul-2014  dholland branches: 1.39.8; 1.39.18; 1.39.42;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.38 16-Mar-2014  dholland branches: 1.38.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.37 27-Oct-2012  chs branches: 1.37.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.36 14-Mar-2009  dsl branches: 1.36.12; 1.36.22;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.35 12-Jan-2009  mhitch branches: 1.35.2;
Retain compatibility with old firm_event. Old Xamiga binary now works with
-current kernel.
 1.34 28-Dec-2007  joerg branches: 1.34.6; 1.34.10; 1.34.18;
Prepare for timecounter support on amiga.
 1.33 17-Oct-2007  garbled branches: 1.33.2; 1.33.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.32 09-Jul-2007  ad branches: 1.32.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.31 04-Mar-2007  christos branches: 1.31.2; 1.31.4; 1.31.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.30 12-Nov-2006  plunky branches: 1.30.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.29 11-Dec-2005  christos branches: 1.29.20; 1.29.22;
merge ktrace-lwp.
 1.28 22-Sep-2003  jandberg branches: 1.28.16;
add wscons support to amiga mouse
 1.27 21-Sep-2003  jdolecek cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
the owner of descriptor, according to appropriate sematics
of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
 1.26 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.25 05-Feb-2003  perry branches: 1.25.2;
"Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.24 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.23 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.22 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.21 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.20 28-Jan-2002  aymeric branches: 1.20.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.19 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.18 18-May-2000  is branches: 1.18.6; 1.18.8; 1.18.12;
Initialize hardware for mouse mode at open time.
This fixes MB2 and MB3 on the 2nd mouse port (the first is initialized by
the Amiga ROM at boot time).
 1.17 18-May-2000  kleink Restructure the ms(4) autoconfiguration code to attach as a single device
instance and select a mouse port via the least significant bit of its
device minor number. Fixes abuse of cf_unit in this driver.
 1.16 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.15 12-Jan-1998  thorpej branches: 1.15.14;
Adjust for changes to config.
 1.14 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.13 13-Oct-1996  christos backout previous kprintf change
 1.12 11-Oct-1996  mhitch Changes for poll(2).
 1.11 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.9 24-Apr-1996  is Make the Amiga mainboard mice, which used to be pseudo-devices, real devices.
(We want to support Amigoids without this interface in the near future.)
 1.8 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.7 10-Apr-1995  mycroft Nuke write routines.
 1.6 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.3 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.15.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.18.12.4 11-Nov-2002  nathanw Catch up to -current
 1.18.12.3 18-Oct-2002  nathanw Catch up to -current.
 1.18.12.2 17-Sep-2002  nathanw Catch up to -current.
 1.18.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.18.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.8.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.18.8.1 09-Sep-2001  thorpej Add kqueue support (not yet compiled).
 1.18.6.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.20.8.1 16-May-2002  gehenna Add the character device switch.
 1.25.2.4 21-Nov-2004  skrll Adapt to branch.
 1.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.28.16.4 21-Jan-2008  yamt sync with head
 1.28.16.3 03-Sep-2007  yamt sync with head.
 1.28.16.2 30-Dec-2006  yamt sync with head.
 1.28.16.1 21-Jun-2006  yamt sync with head.
 1.29.22.1 10-Dec-2006  yamt sync with head.
 1.29.20.1 18-Nov-2006  ad Sync with head.
 1.30.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.31.10.1 03-Oct-2007  garbled Sync with HEAD
 1.31.4.1 11-Jul-2007  mjf Sync with head.
 1.31.2.1 15-Jul-2007  ad Sync with head.
 1.32.10.2 09-Jan-2008  matt sync with HEAD
 1.32.10.1 06-Nov-2007  matt sync with HEAD
 1.33.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.33.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.34.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.34.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.34.10.1 04-May-2009  yamt sync with head.
 1.34.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.35.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.36.12.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.36.12.1 30-Oct-2012  yamt sync with head
 1.37.2.1 18-May-2014  rmind sync with head
 1.38.2.1 10-Aug-2014  tls Rebase.
 1.39.42.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.39.18.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.39.8.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.40.6.1 06-Jun-2021  cjep sync with head
 1.40.2.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.41.2.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.48 26-Oct-2022  riastradh amiga/msc(4): Convert to ttylock/ttyunlock.
 1.47 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.46 16-Mar-2014  dholland branches: 1.46.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.45 27-Oct-2012  chs branches: 1.45.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.44 03-Jun-2011  matt branches: 1.44.2; 1.44.12;
CFATTACH_DECL_NEW, device_t, cfdata_t
 1.43 24-Apr-2011  rmind branches: 1.43.2;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.42 25-May-2010  jklos branches: 1.42.2;
For some reason the 6502 clock detection routine takes 1553 iterations
of the delay loop to finish on a normally clocked A2232.
 1.41 25-May-2008  ad branches: 1.41.18; 1.41.20;
Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()
some time again.
 1.40 19-Nov-2007  ad branches: 1.40.14; 1.40.16; 1.40.18; 1.40.20;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.39 07-Nov-2007  ad Merge tty changes from the vmlocking branch.
 1.38 04-Mar-2007  christos branches: 1.38.2; 1.38.18; 1.38.20; 1.38.24; 1.38.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.36 01-Oct-2006  elad branches: 1.36.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.35 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.34 23-Jul-2006  ad branches: 1.34.4; 1.34.6;
Use the LWP cached credentials where sane.
 1.33 14-May-2006  elad integrate kauth.
 1.32 26-Mar-2006  thorpej Use device_unit().
 1.31 11-Dec-2005  christos branches: 1.31.4; 1.31.6; 1.31.8; 1.31.10; 1.31.12;
merge ktrace-lwp.
 1.30 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.29 13-Jun-2005  jmc branches: 1.29.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.28 25-Apr-2004  matt Constify the speedtab arrays
 1.27 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.26 23-Oct-2002  jdolecek branches: 1.26.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.25 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.24 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.23 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.22 17-Mar-2002  atatat branches: 1.22.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.21 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.20 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.19 19-Jun-2001  wiz branches: 1.19.2; 1.19.4; 1.19.8;
`existent', not `existant'
 1.18 02-May-2001  scw Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.17 13-Jan-2001  aymeric branches: 1.17.2;
Make these compile again, plus minor aesthetic changes.
 1.16 02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.15 01-Sep-1998  mhitch branches: 1.15.12;
Quick fix for TS_WOPEN -> t_wopen change. Compiles, but I can't verify
that it actually works again.
 1.14 12-Jan-1998  thorpej Adjust for changes to config.
 1.13 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.12 20-Dec-1996  veego Disable CD debug output.
 1.11 09-Dec-1996  is New version by Jukka Marin <jmarin@pyy.jmp.fi>, with rewritten (to fix
problems) carrier detect code. Slightly cleaned up by Bernd Ernesti
<veego@netbsd.org>
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.7 06-Jun-1996  mhitch Add tty_attach() calls for pstat -t. Closes PR #2519
 1.6 21-Apr-1996  veego branches: 1.6.4;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.5 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.4 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.3 02-Feb-1996  mycroft Fix #includes.
 1.2 07-Oct-1995  chopps update to 2232 from Jukka Marin <jmarin@teeri.jmp.fi> and
rhealey@kas.helios.mn.org (Rob Healey)
 1.1 30-Sep-1995  chopps new 2232 multiport serial device from:
Rob Healey <rhealey@kas.helios.mn.org>, Jukka Marin <jmarin@teeri.jmp.fi>,
Timo Rossi <trossi@jyu.fi> and Zik
 1.6.4.2 26-Jan-1997  rat Pullup new version of msc* driver per Ignatios Souvatzis. Fixes lockups
associated with this card.
 1.6.4.1 06-Jun-1996  mhitch Pull up from trunk:
> Add tty_attach() calls for pstat -t. Closes PR #2519
 1.15.12.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.12.1 22-Nov-2000  bouyer Sync with HEAD.
 1.17.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.8.6 11-Nov-2002  nathanw Catch up to -current
 1.19.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.19.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.19.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.19.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.19.8.1 19-Jun-2001  nathanw file msc.c was added on branch nathanw_sa on 2002-02-28 04:06:53 +0000
 1.19.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.19.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.19.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.19.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.19.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.22.4.1 16-May-2002  gehenna Add the character device switch.
 1.26.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.6.4 21-Nov-2004  skrll Adapt to branch.
 1.26.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.26.6.1 03-Aug-2004  skrll Sync with HEAD
 1.29.2.6 07-Dec-2007  yamt sync with head
 1.29.2.5 15-Nov-2007  yamt sync with head.
 1.29.2.4 03-Sep-2007  yamt sync with head.
 1.29.2.3 26-Feb-2007  yamt sync with head.
 1.29.2.2 30-Dec-2006  yamt sync with head.
 1.29.2.1 21-Jun-2006  yamt sync with head.
 1.31.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.31.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.31.10.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.31.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.31.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.31.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.31.8.3 11-Aug-2006  yamt sync with head
 1.31.8.2 24-May-2006  yamt sync with head.
 1.31.8.1 01-Apr-2006  yamt sync with head.
 1.31.6.2 01-Jun-2006  kardel Sync with head.
 1.31.6.1 22-Apr-2006  simonb Sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.34.6.1 22-Oct-2006  yamt sync with head
 1.34.4.1 18-Nov-2006  ad Sync with head.
 1.36.4.2 12-Mar-2007  rmind Sync with HEAD.
 1.36.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.38.26.2 08-Dec-2007  mjf Sync with HEAD.
 1.38.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.38.24.2 21-Nov-2007  bouyer Sync with HEAD
 1.38.24.1 13-Nov-2007  bouyer Sync with HEAD
 1.38.20.2 09-Jan-2008  matt sync with HEAD
 1.38.20.1 08-Nov-2007  matt sync with -HEAD
 1.38.18.2 21-Nov-2007  joerg Sync with HEAD.
 1.38.18.1 11-Nov-2007  joerg Sync with HEAD.
 1.38.2.1 03-Dec-2007  ad Sync with HEAD.
 1.40.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.40.18.2 11-Aug-2010  yamt sync with head.
 1.40.18.1 04-May-2009  yamt sync with head.
 1.40.16.1 04-Jun-2008  yamt sync with head
 1.40.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.41.20.3 12-Jun-2011  rmind sync with head
 1.41.20.2 31-May-2011  rmind sync with head
 1.41.20.1 30-May-2010  rmind sync with head
 1.41.18.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.42.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.43.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.44.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.44.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.44.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.44.2.1 30-Oct-2012  yamt sync with head
 1.45.2.1 18-May-2014  rmind sync with head
 1.46.2.1 10-Aug-2014  tls Rebase.
 1.5 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by Jukka Marin (copyright holder).
 1.4 26-Jan-2002  aymeric branches: 1.4.122;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 09-Dec-1996  is branches: 1.3.42; 1.3.46;
New version by Jukka Marin <jmarin@pyy.jmp.fi>, with rewritten (to fix
problems) carrier detect code. Slightly cleaned up by Bernd Ernesti
<veego@netbsd.org>
 1.2 07-Oct-1995  chopps branches: 1.2.6;
update to 2232 from Jukka Marin <jmarin@teeri.jmp.fi> and
rhealey@kas.helios.mn.org (Rob Healey)
 1.1 30-Sep-1995  chopps new 2232 multiport serial device from:
Rob Healey <rhealey@kas.helios.mn.org>, Jukka Marin <jmarin@teeri.jmp.fi>,
Timo Rossi <trossi@jyu.fi> and Zik
 1.2.6.1 26-Jan-1997  rat Pullup new version of msc* driver per Ignatios Souvatzis. Fixes lockups
associated with this card.
 1.3.46.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.42.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.122.1 11-Mar-2010  yamt sync with head
 1.9 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.8 11-Dec-2005  christos branches: 1.8.26;
merge ktrace-lwp.
 1.7 07-Aug-2003  agc branches: 1.7.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 26-Jan-2002  aymeric branches: 1.6.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.5 09-Dec-1996  is branches: 1.5.42; 1.5.46;
New version by Jukka Marin <jmarin@pyy.jmp.fi>, with rewritten (to fix
problems) carrier detect code. Slightly cleaned up by Bernd Ernesti
<veego@netbsd.org>
 1.4 07-Oct-1995  chopps branches: 1.4.6;
change break val from rhealey@kas.helios.mn.org (Rob Healey)
 1.3 07-Oct-1995  chopps update to 2232 from Jukka Marin <jmarin@teeri.jmp.fi> and
rhealey@kas.helios.mn.org (Rob Healey)
 1.2 30-Sep-1995  chopps some style cleanup
 1.1 30-Sep-1995  chopps new 2232 multiport serial device from:
Rob Healey <rhealey@kas.helios.mn.org>, Jukka Marin <jmarin@teeri.jmp.fi>,
Timo Rossi <trossi@jyu.fi> and Zik
 1.4.6.1 26-Jan-1997  rat Pullup new version of msc* driver per Ignatios Souvatzis. Fixes lockups
associated with this card.
 1.5.46.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.42.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.16.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 26-Feb-2007  yamt sync with head.
 1.8.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.33 22-Jan-2014  christos branches: 1.33.44;
gcc-4.8.x unused variable fixes
 1.32 27-Oct-2012  chs branches: 1.32.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.31 11-Dec-2005  christos branches: 1.31.112; 1.31.122;
merge ktrace-lwp.
 1.30 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.29 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.28 02-Oct-2002  thorpej branches: 1.28.6;
Use CFATTACH_DECL().
 1.27 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.26 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.25 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.24 25-Apr-2001  bouyer branches: 1.24.2; 1.24.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.23 10-Jan-1999  tron branches: 1.23.8; 1.23.20;
Don't use void pointer for arithmetic.
 1.22 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.21 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.20 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.19 12-Jan-1998  thorpej Adjust for changes to config.
 1.18 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.17 23-Dec-1996  veego branches: 1.17.8; 1.17.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.16 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.12 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.11 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.10 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.9 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.17.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.17.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.23.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.23.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.24.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.24.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.24.8.1 25-Apr-2001  nathanw file otgsc.c was added on branch nathanw_sa on 2002-02-28 04:06:55 +0000
 1.24.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.24.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.28.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.6.1 03-Aug-2004  skrll Sync with HEAD
 1.31.122.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.112.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.31.112.1 30-Oct-2012  yamt sync with head
 1.32.2.1 18-May-2014  rmind sync with head
 1.33.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.34.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.6 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.5 24-Apr-2021  thorpej branches: 1.5.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.4 27-Oct-2012  chs branches: 1.4.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 12-Feb-2012  matt branches: 1.3.4; 1.3.6; 1.3.10;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.2 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.1 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.3.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.6.3 30-Oct-2012  yamt sync with head
 1.3.6.2 17-Apr-2012  yamt sync with head
 1.3.6.1 12-Feb-2012  yamt file p5bus.c was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.3.4.2 18-Feb-2012  mrg merge to -current.
 1.3.4.1 12-Feb-2012  mrg file p5bus.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:18 +0000
 1.4.52.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.5.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 10-Jan-2012  rkujawa branches: 1.1.4; 1.1.6;
Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 10-Jan-2012  yamt file p5busvar.h was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 10-Jan-2012  mrg file p5busvar.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:18 +0000
 1.41 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.40 25-Jul-2014  dholland branches: 1.40.26; 1.40.28;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.39 16-Mar-2014  dholland branches: 1.39.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.38 27-Oct-2012  chs branches: 1.38.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.37 31-May-2009  phx branches: 1.37.12; 1.37.22;
Fixed format string from %x to %llx for dev_t.
 1.36 17-Oct-2007  garbled branches: 1.36.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.35 09-Jul-2007  ad branches: 1.35.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.34 04-Mar-2007  christos branches: 1.34.2; 1.34.4; 1.34.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.33 16-Feb-2007  ad branches: 1.33.2;
More spllowersoftclock() fallout.
 1.32 26-Mar-2006  thorpej Use device_unit().
 1.31 11-Dec-2005  christos branches: 1.31.4; 1.31.6; 1.31.8; 1.31.10; 1.31.12;
merge ktrace-lwp.
 1.30 07-Aug-2003  agc branches: 1.30.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.29 23-Oct-2002  jdolecek branches: 1.29.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.28 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.27 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.26 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.25 28-Jan-2002  aymeric branches: 1.25.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.24 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.23 27-Aug-2000  is branches: 1.23.2; 1.23.4; 1.23.8;
Replace one callout handler by using a timeout in tsleep().
1.4.x version of it submitted by Ingolf Koch; translated to 1.5-ish by
myself.
 1.22 23-Apr-2000  mhitch Long term bug finally reared its head: size of device softc was specified
as sizeof(struct device) when amiga switched to new config, and recent
additions of callout structures and a long missing struct device to the
soft structure resulted in kernel panics when attempting to open the builtin
serial port. The callout structure initialization was clearing the serial
port softc data! Fixed by using sizeof(struct par_softc).
 1.21 26-Mar-2000  frueauf Add "struct device sc_dev;" to struct par_softc.

Reviewed by Ignatios Souvatzis.
 1.20 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.19 16-Mar-2000  kleink Kill more broken cf_unit bogons.
 1.18 05-Aug-1999  thorpej branches: 1.18.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.17 12-Jan-1998  thorpej Adjust for changes to config.
 1.16 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.15 13-Oct-1996  christos backout previous kprintf change
 1.14 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.12 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.11 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 31-May-1994  chopps MIN/MAX->min/max
 1.7 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.5 11-Feb-1994  chopps ioctl's always pass proc.
 1.4 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.18.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.23.8.4 11-Nov-2002  nathanw Catch up to -current
 1.23.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.23.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.23.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.23.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.23.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.23.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.25.8.1 16-May-2002  gehenna Add the character device switch.
 1.29.6.4 21-Nov-2004  skrll Adapt to branch.
 1.29.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.29.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.29.6.1 03-Aug-2004  skrll Sync with HEAD
 1.30.16.3 03-Sep-2007  yamt sync with head.
 1.30.16.2 26-Feb-2007  yamt sync with head.
 1.30.16.1 21-Jun-2006  yamt sync with head.
 1.31.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.31.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.31.8.1 01-Apr-2006  yamt sync with head.
 1.31.6.1 22-Apr-2006  simonb Sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.33.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.34.10.1 03-Oct-2007  garbled Sync with HEAD
 1.34.4.1 11-Jul-2007  mjf Sync with head.
 1.34.2.1 15-Jul-2007  ad Sync with head.
 1.35.10.1 06-Nov-2007  matt sync with HEAD
 1.36.20.1 20-Jun-2009  yamt sync with head
 1.37.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.37.12.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.37.12.1 30-Oct-2012  yamt sync with head
 1.38.2.1 18-May-2014  rmind sync with head
 1.39.2.1 10-Aug-2014  tls Rebase.
 1.40.28.1 10-Jun-2019  christos Sync with HEAD
 1.40.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 26-Oct-1994  cgd branches: 1.5.66;
new RCS ID format.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.5.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.66.1 03-Aug-2004  skrll Sync with HEAD
 1.7 12-Feb-1995  mycroft Clean up deleted files.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.24 12-Feb-2022  andvar s/epxected/expected/
 1.23 08-Jun-2019  isaki Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.22 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.21 16-Mar-2019  isaki branches: 1.21.2;
Use C99 style struct initializer to audio_hw_if.
 1.20 22-Jan-2014  christos branches: 1.20.30;
gcc-4.8.x unused variable fixes
 1.19 27-Oct-2012  chs branches: 1.19.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 23-Nov-2011  jmcneill branches: 1.18.8;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.
 1.17 19-Jul-2011  dyoung branches: 1.17.2; 1.17.4;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.16 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.15 11-Dec-2005  christos branches: 1.15.28; 1.15.74; 1.15.76; 1.15.78;
merge ktrace-lwp.
 1.14 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.13 15-Jan-2005  kent ansify and KNF
 1.12 10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.11 09-Nov-2004  kent branches: 1.11.2;
remove mixer setting code in repulse_attach() because ac97_attach() does it
 1.10 29-Oct-2004  yamt constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.9 22-Sep-2004  kent ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case.

PR: kern/26973
 1.8 06-Apr-2003  wiz branches: 1.8.2; 1.8.4;
Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
 1.7 08-Oct-2002  kent Sync with the recent ac97 changes.
- AC97_CODEC_DOES_VRA -> AC97_EXT_AUDIO_VRA
- Use ac97_codec_if::get_extcaps()
- Remove VRA/VRM enabling code
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 03-Oct-2001  augustss branches: 1.2.4;
Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
 1.1 25-Aug-2001  is branches: 1.1.2; 1.1.4;
Driver for the ALiENDESiGN Repulse board.
- only 8/16 bit precision supported
- no support for the Repulse special S/P-DIF I/O yet
- I think ac97.c needs some work.
 1.1.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 25-Aug-2001  thorpej file repulse.c was added on branch kqueue on 2001-09-13 01:13:00 +0000
 1.1.2.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.2.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 03-Oct-2001  nathanw file repulse.c was added on branch nathanw_sa on 2002-02-28 04:06:56 +0000
 1.8.4.1 22-Sep-2004  jmc Pullup rev 1.9 (requested by kent in ticket #867)

ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case. PR#26973
 1.8.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.8.2.3 14-Nov-2004  skrll Sync with HEAD.
 1.8.2.2 02-Nov-2004  skrll Sync with HEAD.
 1.8.2.1 24-Sep-2004  skrll Sync with HEAD.
 1.11.2.2 09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.11.2.1 03-Jan-2005  kent * adopt the filter pipeline framework.
* repulse.c follows ac97_attach() change
 1.15.78.1 16-May-2008  yamt sync with head.
 1.15.76.1 18-May-2008  yamt sync with head.
 1.15.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.28.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.17.4.3 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.17.4.2 20-Nov-2011  mrg complete the port to audiomp: don't forget to take sc_intr_lock in the
hardware interrupt routines.
 1.17.4.1 20-Nov-2011  mrg port this to audiomp branch. no allocm/freem here, no detach, so just
add/initialise sc_lock and sc_intr_lock, and add get_locks() support.

XXX: untested, but amiga kernels compile now.
 1.17.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.2.2 30-Oct-2012  yamt sync with head
 1.17.2.1 17-Apr-2012  yamt sync with head
 1.18.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.2.1 18-May-2014  rmind sync with head
 1.20.30.1 10-Jun-2019  christos Sync with HEAD
 1.21.2.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.21.2.1 21-Apr-2019  isaki Adapt to audio2.
 1.2 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.1 25-Aug-2001  is branches: 1.1.4; 1.1.8;
Driver for the ALiENDESiGN Repulse board.
- only 8/16 bit precision supported
- no support for the Repulse special S/P-DIF I/O yet
- I think ac97.c needs some work.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 25-Aug-2001  nathanw file repulse_firmware.h was added on branch nathanw_sa on 2002-02-28 04:06:56 +0000
 1.1.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 25-Aug-2001  thorpej file repulse_firmware.h was added on branch kqueue on 2001-09-13 01:13:00 +0000
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 22-Apr-1994  chopps Changed fonts. Added 2 non (c) fonts kf_8x{8,11}.c retina now uses
kf_8x8. CC console users can now choose between the provided fonts
or provide there own.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.10 14-Nov-2012  rkujawa Nuke unused clock struct, was used by a2kbbc before conversion to MI msm6242b
driver.
 1.9 14-May-2002  matt branches: 1.9.150; 1.9.160;
Eliminate commons. (including a few unused or mismatched ones).
 1.8 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 03-Jan-2000  is branches: 1.7.8; 1.7.12;
The Ricoh chip has a seperate leapyear counter.
We must write this when we write the year register, keeping them in sync.
XXX the chosen algorithm only works for 1901 <= year <= 2099.
 1.6 14-Mar-1999  is branches: 1.6.2; 1.6.8;
Use the 1/256s-resolution when reading the DraCo battery backed clock
 1.5 17-Jul-1997  is Make the DraCo hardware clock an autoconfiguration device.
 1.4 25-May-1997  veego Remove some defines which are no longer needed.
clock.c uses now sys/dev/clock_subr.[ch].
 1.3 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.2.1 08-Jan-2000  he Pull up revision 1.7 (requested by is):
Write the Ricoh RP5C01 leapyear bits when writing the year.
 1.7.12.2 20-Jun-2002  nathanw Catch up to -current.
 1.7.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.8.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.160.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.150.1 16-Jan-2013  yamt sync with (a bit old) head
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 26-Oct-1994  cgd branches: 1.2.46; 1.2.50;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 26-Oct-1994  cgd branches: 1.2.46; 1.2.50;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2 07-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.75 09-Mar-2016  christos PR/50928: David Binderman: Clarify precedence with parentheses.
 1.74 19-Jan-2015  phx Make it compile with -DDEBUG again.
 1.73 07-Aug-2014  joerg branches: 1.73.2; 1.73.4; 1.73.8;
Drop extra ().
 1.72 22-Jan-2014  christos branches: 1.72.2;
gcc-4.8.x unused variable fixes
 1.71 27-Oct-2012  chs branches: 1.71.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.70 07-Jul-2011  mrg branches: 1.70.2; 1.70.12;
apply some parens around an expression to get the desired behaviour,
as suggested by gcc 4.5
 1.69 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.68 18-Oct-2010  phx opt_m68k_arch.h can only be included when compiling for amiga/68k.
 1.67 06-Jun-2010  mrg fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.66 05-Feb-2010  phx branches: 1.66.2; 1.66.4;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.65 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.64 18-Mar-2009  cegger bcopy -> memcpy
 1.63 18-Mar-2009  cegger bzero -> memset
 1.62 17-Oct-2007  garbled branches: 1.62.20; 1.62.28; 1.62.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.61 20-Aug-2007  is branches: 1.61.2;
First part of amigappc support patches by Frank Wille.
 1.60 09-Jul-2007  ad branches: 1.60.4; 1.60.8;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.59 04-Mar-2007  christos branches: 1.59.2; 1.59.4; 1.59.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.58 13-Sep-2006  spz branches: 1.58.6;
change the variable name in the CSR_TRACE macro so it doesn't collide with
a previous definition of 's' (which makes gcc4 warn)
Reviewed by <is>.
 1.57 08-Mar-2006  lukem branches: 1.57.10;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.56 11-Dec-2005  christos branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10;
merge ktrace-lwp.
 1.55 13-Jun-2005  jmc branches: 1.55.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.54 22-May-2005  christos No 0x in front of %p...
 1.53 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.52 18-Jun-2003  drochner branches: 1.52.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.51 03-May-2003  wiz DMA, not dma nor Dma.
 1.50 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.49 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.48 30-May-2002  thorpej Remove unnecessary assignments (for which the operation may be
undefined).
 1.47 30-May-2002  thorpej Nuke a trigraph.
 1.46 28-Jan-2002  aymeric branches: 1.46.8; 1.46.10;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.45 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.44 22-Jul-2001  wiz branches: 1.44.6;
seperate -> separate
 1.43 25-Apr-2001  bouyer branches: 1.43.2;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.42 29-Jun-2000  mrg branches: 1.42.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.41 27-Jun-2000  mrg remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h>
 1.40 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.39 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.38 18-Jan-2000  thorpej Remove one line of junk.
 1.37 01-Nov-1999  is Don't call the sc->sbic_dmago() function if the data length is zero.
This avoids a zero pointer dereference, which fixes PR 8571.
Make sbic_dmago() report selection timeouts to the upper layer.
This makes sbic really work again with 1.4L.
 1.36 04-Oct-1999  is branches: 1.36.2; 1.36.4; 1.36.6;
Make this compile with -DDEBUG again.
 1.35 30-Sep-1999  thorpej Update for SCSIPI changes.
 1.34 05-Nov-1998  frueauf branches: 1.34.6;
Add braces to make egcs happy.
 1.33 21-Aug-1998  is Prepare for support of Apollo-cpuboard-reworked A3000 mainboard SCSI.
 1.32 04-Jul-1998  jonathan defopt DDB.
 1.31 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.30 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.29 27-Aug-1997  bouyer branches: 1.29.4;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.28 13-Oct-1996  christos branches: 1.28.8; 1.28.10;
backout previous kprintf change
 1.27 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.26 10-Jun-1996  is Activate M68040 cache flushing code also in 68060 only kernels.
 1.25 12-May-1996  mhitch branches: 1.25.4;
Remove old-style disk instrumentation now that iostat, systat, and
vmstat are fixed.
 1.24 01-May-1996  mhitch More cleanup for -Wall with DEBUG.
 1.23 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.22 23-Mar-1996  is It looks like the sense_data structure lost the extended_ prefix in the
name of some of its members. Adapt sbic.c to this. (Fixes PR 2245)
 1.21 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.20 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.19 05-Oct-1995  chopps branches: 1.19.2;
Only enable timeouts (debugging) when actually transfering data.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.18 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.17 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.16 04-Sep-1995  chopps sbic and board changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 24-Aug-1995  chopps couple fixes from Eduardo E. Horvath eeh@btr.com
 1.14 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 12-Aug-1995  mycroft minphys() functions really should return void.
 1.12 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.11 02-Mar-1995  chopps fix long standing bug with A2091 and dma.
Move the copy from bounce buffer after dmafree() in the case of
the A2091 this allows the dma fifo to be flushed.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.9 26-Jan-1995  chopps apply patch to fix some renagade drives. from Eduardo E. Horvath (eeh@btr.com)
also enable sync by default.
 1.8 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 20-Jun-1994  chopps don't set 040 specific flush flag if not 040 system.
 1.4 15-Jun-1994  chopps clock now uses passed in frequency if present protect dma cache
flush calls from non 040. don't compile ite_xx if not used.
 1.3 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.2 12-May-1994  chopps ifdef out use of scsi_xfer->req_sense_length for now..
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.19.2.1 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.25.4.1 10-Jun-1996  is Pull up bug fix from main branch:
activate M68040 style dma flush also on M68060 only kernels.
 1.28.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.28.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.29.4.1 19-Jan-1999  cgd pull up rev 1.33 from trunk (is)
 1.34.6.1 05-Oct-1999  he Pull up revision 1.36 (requested by is):
Make this compile with -DDEBUG.
 1.36.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.36.4.1 15-Nov-1999  fvdl Sync with -current
 1.36.2.3 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.36.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.36.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.42.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.43.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.43.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.43.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.43.2.1 03-Aug-2001  lukem update to -current
 1.44.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.44.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.44.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.44.6.1 22-Jul-2001  nathanw file sbic.c was added on branch nathanw_sa on 2002-02-28 04:06:58 +0000
 1.46.10.1 30-May-2002  tv Pull up revision 1.47 (requested by thorpej in ticket #96):
Nuke a trigraph.
 1.46.8.1 09-Jul-2002  gehenna catch up with -current.
 1.52.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.52.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.52.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.52.2.1 03-Aug-2004  skrll Sync with HEAD
 1.55.2.3 03-Sep-2007  yamt sync with head.
 1.55.2.2 30-Dec-2006  yamt sync with head.
 1.55.2.1 21-Jun-2006  yamt sync with head.
 1.56.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.56.8.2 14-Sep-2006  yamt sync with head.
 1.56.8.1 13-Mar-2006  yamt sync with head.
 1.56.6.1 22-Apr-2006  simonb Sync with head.
 1.56.4.1 09-Sep-2006  rpaulo sync with head
 1.57.10.1 18-Nov-2006  ad Sync with head.
 1.58.6.1 12-Mar-2007  rmind Sync with HEAD.
 1.59.10.1 03-Oct-2007  garbled Sync with HEAD
 1.59.4.1 11-Jul-2007  mjf Sync with head.
 1.59.2.2 09-Oct-2007  ad Sync with head.
 1.59.2.1 15-Jul-2007  ad Sync with head.
 1.60.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.60.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.61.2.1 06-Nov-2007  matt sync with HEAD
 1.62.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.62.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.62.20.3 11-Aug-2010  yamt sync with head.
 1.62.20.2 11-Mar-2010  yamt sync with head
 1.62.20.1 04-May-2009  yamt sync with head.
 1.66.4.2 05-Mar-2011  rmind sync with head
 1.66.4.1 03-Jul-2010  rmind sync with head
 1.66.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.66.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.70.12.3 03-Dec-2017  jdolecek update from HEAD
 1.70.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.70.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.70.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.70.2.1 30-Oct-2012  yamt sync with head
 1.71.2.1 18-May-2014  rmind sync with head
 1.72.2.1 10-Aug-2014  tls Rebase.
 1.73.8.1 18-Jan-2017  skrll Sync with netbsd-5
 1.73.4.2 19-Mar-2016  skrll Sync with HEAD
 1.73.4.1 06-Apr-2015  skrll Sync with HEAD
 1.73.2.1 03-Jan-2017  snj Pull up following revision(s) (requested by mlelstv in ticket #1345):
sys/arch/amiga/dev/sbic.c: revision 1.74
Make it compile with -DDEBUG again.
 1.9 16-Sep-2021  andvar fix various typos, mainly in comments.
 1.8 05-Feb-2010  phx Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.7 14-May-2006  elad branches: 1.7.66;
integrate kauth.
 1.6 08-Mar-2006  lukem Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.6; 1.5.8; 1.5.10;
merge ktrace-lwp.
 1.4 07-Aug-2003  agc branches: 1.4.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 21-Aug-1998  is branches: 1.3.46;
Prepare for support of Apollo-cpuboard-reworked A3000 mainboard SCSI.
 1.2 26-Oct-1994  cgd branches: 1.2.18;
new RCS ID format.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2.18.1 19-Jan-1999  cgd pull up rev 1.3 from trunk (is)
 1.3.46.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.46.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.46.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 21-Jun-2006  yamt sync with head.
 1.5.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.5.8.1 13-Mar-2006  yamt sync with head.
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.7.66.1 11-Mar-2010  yamt sync with head
 1.27 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.26 01-Jan-2022  andvar fix typos in comments, mainly basicly -> basically.
 1.25 27-Dec-2019  msaitoh s/transfered/transferred/
 1.24 27-Oct-2012  chs branches: 1.24.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.23 11-Dec-2005  christos branches: 1.23.112; 1.23.122;
merge ktrace-lwp.
 1.22 07-Dec-2004  thorpej Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.20 03-May-2003  wiz branches: 1.20.2;
DMA, not dma nor Dma.
 1.19 09-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.18 14-May-2002  matt Eliminate commons. (including a few unused or mismatched ones).
 1.17 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.16 25-Apr-2001  bouyer branches: 1.16.2; 1.16.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.15 23-Mar-2000  thorpej branches: 1.15.6;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.14 19-Nov-1998  thorpej branches: 1.14.10;
Adapt to the new scsipi_adapter interface.
 1.13 21-Aug-1998  is Prepare for support of Apollo-cpuboard-reworked A3000 mainboard SCSI.
 1.12 27-Aug-1997  bouyer branches: 1.12.4;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.11 21-Apr-1996  veego branches: 1.11.10; 1.11.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.10 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.9 04-Sep-1995  chopps branches: 1.9.2;
sbic and board changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 12-Aug-1995  mycroft minphys() functions really should return void.
 1.6 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.5 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.4 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.9.2.1 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.11.12.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.10.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.12.4.1 19-Jan-1999  cgd pull up rev 1.13 from trunk (is)
 1.14.10.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.14.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.15.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.16.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.16.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.16.8.1 25-Apr-2001  nathanw file sbicvar.h was added on branch nathanw_sa on 2002-02-28 04:06:58 +0000
 1.16.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.20.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.23.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.112.1 30-Oct-2012  yamt sync with head
 1.24.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.37 10-Feb-2024  andvar s/psuedo/pseudo/ in comments.
 1.36 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.35 27-Oct-2012  chs branches: 1.35.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.34 20-Dec-2010  matt branches: 1.34.8; 1.34.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.33 26-Nov-2005  tsutsui branches: 1.33.100;
Fix typo (FALLTHOUGH -> FALLTHROUGH). From Jeff Ito.
 1.32 13-Jun-2005  jmc branches: 1.32.2; 1.32.8;
Fix a ton of const/volatile issues shown with new warning flags
 1.31 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.30 31-Oct-2003  bouyer In sci_scsipi_request, add a splbio() which was erroneously missed when
thorpej_scsipi was integrated. Pointed out by Havard Eidnes.
 1.29 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.28 18-Jun-2003  drochner branches: 1.28.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.27 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.26 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.25 25-Apr-2001  bouyer branches: 1.25.2; 1.25.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.24 29-Jun-2000  mrg branches: 1.24.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.23 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.22 18-Jan-2000  thorpej Remove one line of junk.
 1.21 30-Sep-1999  thorpej branches: 1.21.2;
Update for SCSIPI changes.
 1.20 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.19 13-Oct-1996  christos branches: 1.19.8; 1.19.10;
backout previous kprintf change
 1.18 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.17 12-May-1996  mhitch Remove old-style disk instrumentation now that iostat, systat, and
vmstat are fixed.
 1.16 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.15 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.14 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 12-Aug-1995  mycroft minphys() functions really should return void.
 1.12 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.11 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.10 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 22-Jun-1994  chopps cleanup from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.3 18-Apr-1994  chopps make current with recent vm changes.
 1.2 08-Mar-1994  chopps fix typo.
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.19.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.19.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.21.2.3 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.21.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.21.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.24.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.25.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.25.8.1 25-Apr-2001  nathanw file sci.c was added on branch nathanw_sa on 2002-02-28 04:06:59 +0000
 1.25.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.28.2.5 11-Dec-2005  christos Sync with head.
 1.28.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.32.8.1 29-Nov-2005  yamt sync with head.
 1.32.2.1 21-Jun-2006  yamt sync with head.
 1.33.100.1 05-Mar-2011  rmind sync with head
 1.34.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.34.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.34.8.1 30-Oct-2012  yamt sync with head
 1.35.2.1 18-May-2014  rmind sync with head
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 03-May-2003  wiz branches: 1.4.2;
DMA, not dma nor Dma.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19 07-Apr-2022  andvar s/psuedo/pseudo/
 1.18 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.17 11-Dec-2005  christos branches: 1.17.112; 1.17.122;
merge ktrace-lwp.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.15 03-May-2003  wiz branches: 1.15.2;
DMA, not dma nor Dma.
 1.14 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.13 25-Apr-2001  bouyer branches: 1.13.2; 1.13.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.12 19-Nov-1998  thorpej branches: 1.12.10; 1.12.22;
Adapt to the new scsipi_adapter interface.
 1.11 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.10 28-Apr-1996  mhitch branches: 1.10.10; 1.10.12;
Prototype the pseudo-dma function declarations.
 1.9 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.8 12-Aug-1995  mycroft minphys() functions really should return void.
 1.7 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.6 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.5 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.10.12.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.10.10.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.12.22.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.10.2 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.12.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.13.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.13.8.1 25-Apr-2001  nathanw file scivar.h was added on branch nathanw_sa on 2002-02-28 04:06:59 +0000
 1.13.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.112.1 30-Oct-2012  yamt sync with head
 1.12 01-Mar-1995  mycroft Clean up deleted files.
 1.11 18-Apr-1994  chopps make current with recent vm changes.
 1.10 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.9 21-Feb-1994  chopps fixed a couple minor bugs in con code for ite. added floptical support in
sd.c (based on patch from Andreas E. Heitman).
 1.8 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 30-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.5 19-May-1996  veego - grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.8 01-Mar-1995  mycroft Clean up deleted files.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.9 01-Mar-1995  mycroft Clean up deleted files.
 1.8 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.15 25-May-1994  mycroft Clean up deleted files.
 1.14 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.13 18-Apr-1994  chopps make current with recent vm changes.
 1.12 06-Apr-1994  chopps fix to floptical code from
Andreas Heitmann (heitmann@crunch.ikp.physik.th-darmstadt.de)
 1.11 21-Feb-1994  chopps fixed a couple minor bugs in con code for ite. added floptical support in
sd.c (based on patch from Andreas E. Heitman).
 1.10 19-Feb-1994  chopps fix typo.
 1.9 14-Feb-1994  chopps don't ignore users request for specific boot device, reported by Ty Sarna
 1.8 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 30-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.86 26-Oct-2022  riastradh ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
 1.85 04-Oct-2022  rin Remove unused extern declaration of constty.
 1.84 21-Oct-2021  andvar fix various typos, mainly in comments, but also in man pages and log messages.
 1.83 25-Jul-2014  dholland branches: 1.83.8; 1.83.18;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.82 16-Mar-2014  dholland branches: 1.82.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.81 22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.80 27-Oct-2012  chs branches: 1.80.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.79 24-Apr-2011  rmind branches: 1.79.4; 1.79.14;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.78 11-Jun-2008  tsutsui branches: 1.78.18; 1.78.24;
Use device_private() and device_lookup_private() to get softc.
 1.77 19-Nov-2007  ad branches: 1.77.14; 1.77.16; 1.77.18; 1.77.20; 1.77.22;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.76 04-Mar-2007  christos branches: 1.76.2; 1.76.18; 1.76.20; 1.76.24; 1.76.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.75 01-Oct-2006  elad branches: 1.75.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.74 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.73 23-Jul-2006  ad branches: 1.73.4; 1.73.6;
Use the LWP cached credentials where sane.
 1.72 14-May-2006  elad integrate kauth.
 1.71 11-Dec-2005  christos branches: 1.71.4; 1.71.6; 1.71.8; 1.71.10; 1.71.12;
merge ktrace-lwp.
 1.70 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.69 07-Aug-2003  agc branches: 1.69.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.68 23-Oct-2002  jdolecek branches: 1.68.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.67 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.66 01-Oct-2002  aymeric . treat a stream of framing errors as a single break
. trigger ddb upon receiving a break if we are the console
 1.65 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.64 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.63 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.62 17-Mar-2002  atatat branches: 1.62.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.61 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.60 27-Jan-2002  aymeric make sure we have CLOCAL set and HUPCL unset when the serial port is used as
a console.
 1.59 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.58 05-Nov-2001  aymeric branches: 1.58.2;
defopt SERCONSOLE
 1.57 30-May-2001  lukem branches: 1.57.2; 1.57.4; 1.57.6;
add missing #include "opt_kgdb.h"
 1.56 02-May-2001  scw Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.55 13-Jan-2001  aymeric branches: 1.55.2;
Make these compile again, plus minor aesthetic changes.
 1.54 02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.53 27-Apr-2000  is Fix thinko in fix for fix for cf_unit abuse.
 1.52 14-Apr-2000  is Make this work again after the last changes...
remember, folks, potential Amiga console devices run autoconfiguration
_twice_.
 1.51 07-Apr-2000  aymeric Prevent serial port from hanging when used as both console and terminal.
 1.50 16-Mar-2000  kleink Kill more broken cf_unit bogons.
 1.49 22-Jul-1998  is branches: 1.49.14;
Back out previous change. It breaks Seyon in a non-obvious way.
 1.48 18-Jul-1998  is Precompute lots of bitmasks etc. in serparam(). Results in slightly better
(but I suspect, insignificant) performance, and also prepares for 8bit +
parity support.
 1.47 07-Jul-1998  is The INTF_RBF bit of INTREQ is mirrored in SERDAT. As we would read this
register anyway when the bit is set, we can safe one of the (slow) custom
chip accesses by using this bit.
Sounds ridiculous, but at a hardware FIFO depth of 1 and ~1 usec per
access (at IPL 5) it might help the highspeed addicts.
 1.46 29-Jun-1998  is Synchronize shadow ciab.pra variable on first open.
 1.45 26-Jun-1998  is Fix a problem with bogus hangups that Thorsten Frueauf has reported.
 1.44 11-Apr-1998  is Make ser.c compile again (preliminary release). It needs still a lot of
cleanup, but at least mainstream usage should be possible again (worked
for me 5 minutes ago).
 1.43 12-Jan-1998  thorpej Adjust for changes to config.
 1.42 04-Oct-1997  mhitch Use a global variable to hold the current speed of the internal serial port.
This will be used by certain SCSI drivers to limit the length of DMA transfers
when the serial port is running at higher speeds. GVP and Phase5 DMA
interfers significantly with CPU execution, and significantly increases
receive buffer overruns (silo overflow). Reducing the DMA transfer length
can reduce the overruns.
 1.41 21-Sep-1997  is Deal with HUPCL, closing (but in a different way than proposed) PR 1010.
 1.40 18-Sep-1997  mhitch Read the received data register before clearing the RBF interrupt. Clearing
RBF appears to also clear the OVRUN bit in the receive data, resulting in
the loss of of overflow status.
 1.39 23-Dec-1996  veego branches: 1.39.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.38 13-Oct-1996  christos backout previous kprintf change
 1.37 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.36 02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.35 06-Jun-1996  mhitch Add tty_attach() calls for pstat -t. Closes PR #2519
 1.34 27-Apr-1996  veego branches: 1.34.4;
Make the compiler happy if you make a kernel with -Wall
 1.33 23-Apr-1996  is Protect two critical lines of ser.c with splser(). Without this, a
race condition exists which makes the internal serial drop incoming
characters under heavy load.
 1.32 23-Apr-1996  is Changed the speed calculations of the Amiga-builtin-serial driver to
allow any baudrate the hardware allows, and to forbid two baudrates
(50 and 75) which the hardware does NOT support but which the old
speed conversion table pretended to support.
 1.31 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.30 17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.29 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.28 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.27 23-Apr-1995  chopps branches: 1.27.2;
bring up-to-date with recent conf.c and sunos changes.
 1.26 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.25 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.23 26-Oct-1994  cgd new RCS ID format.
 1.22 06-Oct-1994  chopps branches: 1.22.2;
fix flow control and a couple bugs. from:
niklas@appli.se (Niklas Hallqvist) and
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.21 31-Aug-1994  chopps cleanup diagnostic messages
 1.20 16-Jun-1994  chopps fix boot diag output.
 1.19 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.18 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.17 16-May-1994  chopps remove uneeded function from ser.c and fix common bad arg to sbicintr() in ahsc
and atzsc
 1.16 11-May-1994  chopps general cleanup including boot diag messages.
 1.15 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.14 22-Apr-1994  chopps update to deal with ttyflags from tsarna@endicor.com (Ty Sarna),
major design changes by me which include shrinking of ring buffer
size from 16k to 256 bytes and removing code that realloced the
clists for the tty from default to 8192 (was using 24k) suggested
as suggested by theo.
 1.13 30-Mar-1994  chopps remove dlists.h oops.
 1.12 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.11 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.10 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.9 11-Feb-1994  chopps Add missing Id's
 1.8 11-Feb-1994  chopps ioctl's always pass proc.
 1.7 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.6 30-Jan-1994  chopps Re-enabled views, fixed warning in serial driver.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.22.2.2 06-Oct-1994  chopps fix flow control and a couple bugs. from:
niklas@appli.se (Niklas Hallqvist) and
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.22.2.1 06-Oct-1994  chopps file ser.c was added on branch netbsd-1-0 on 1994-10-06 19:20:56 +0000
 1.27.2.2 23-Apr-1996  is Two fixes:
- add a missing splser()/splx() pair in ser.c. Without it, we used to
drop incoming characters under heavy load.
- delete the entries for 50 and 75 bps from the serspeedtab, as our
hardware doesn't support these speeds.
 1.27.2.1 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.34.4.1 06-Jun-1996  mhitch Pull up from trunk:
> Add tty_attach() calls for pstat -t. Closes PR #2519
 1.39.10.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.39.10.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.49.14.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.49.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.49.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.55.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.57.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.57.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.57.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.57.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.57.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.57.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.57.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.58.2.6 11-Nov-2002  nathanw Catch up to -current
 1.58.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.58.2.4 17-Sep-2002  nathanw Catch up to -current.
 1.58.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.58.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.58.2.1 05-Nov-2001  nathanw file ser.c was added on branch nathanw_sa on 2002-02-28 04:06:59 +0000
 1.62.4.1 16-May-2002  gehenna Add the character device switch.
Replace the direct-access to devsw table with calling devsw API.
 1.68.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.68.6.4 21-Nov-2004  skrll Adapt to branch.
 1.68.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.68.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.68.6.1 03-Aug-2004  skrll Sync with HEAD
 1.69.16.4 07-Dec-2007  yamt sync with head
 1.69.16.3 03-Sep-2007  yamt sync with head.
 1.69.16.2 30-Dec-2006  yamt sync with head.
 1.69.16.1 21-Jun-2006  yamt sync with head.
 1.71.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.71.10.3 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.71.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.71.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.71.8.2 11-Aug-2006  yamt sync with head
 1.71.8.1 24-May-2006  yamt sync with head.
 1.71.6.1 01-Jun-2006  kardel Sync with head.
 1.71.4.1 09-Sep-2006  rpaulo sync with head
 1.73.6.1 22-Oct-2006  yamt sync with head
 1.73.4.1 18-Nov-2006  ad Sync with head.
 1.75.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.76.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.76.24.1 21-Nov-2007  bouyer Sync with HEAD
 1.76.20.1 09-Jan-2008  matt sync with HEAD
 1.76.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.76.2.1 03-Dec-2007  ad Sync with HEAD.
 1.77.22.1 18-Jun-2008  simonb Sync with head.
 1.77.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.77.18.1 04-May-2009  yamt sync with head.
 1.77.16.1 17-Jun-2008  yamt sync with head.
 1.77.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.78.24.1 06-Jun-2011  jruoho Sync with HEAD.
 1.78.18.1 31-May-2011  rmind sync with head
 1.79.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.79.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.79.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.79.4.1 30-Oct-2012  yamt sync with head
 1.80.2.1 18-May-2014  rmind sync with head
 1.82.2.1 10-Aug-2014  tls Rebase.
 1.83.18.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.83.8.2 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.83.8.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 31-Jan-1999  is branches: 1.8.42;
Wrong sign of dialout.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.42.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.42.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.42.1 03-Aug-2004  skrll Sync with HEAD
 1.14 05-Oct-1997  veego Unused files after the sfas driver is replaced by the MI ncr53c9x driver.
 1.13 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.12 13-Oct-1996  christos branches: 1.12.8; 1.12.10;
backout previous kprintf change
 1.11 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10 10-Jun-1996  is Activate M68040 cache flushing code also in 68060 only kernels.
 1.9 23-Apr-1996  veego branches: 1.9.4;
Added some ifdef's for RETINA_SPEED_HACK
Argh, why is a fuction from the RetinaZ2 console driver in the console
driver for the RetinaZ3 ? Fixed.
Fixed some warnings from -Wall if you don't use -DDEBUG
 1.8 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.7 24-Feb-1996  chopps remove floating point expressions. gen_cvtab.c generates a conversion
table to replace a specific floating point expression in grf_cv.c
 1.6 28-Jan-1996  chopps fix loading of 0 to intended value of 256. closes 1871
 1.5 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.4 18-Aug-1995  chopps branches: 1.4.2;
SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.3 12-Aug-1995  mycroft minphys() functions really should return void.
 1.2 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.4.2.2 04-Mar-1996  is Correct attempted word write to byte register (from -current).
 1.4.2.1 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.9.4.1 10-Jun-1996  is Pull up bug fix from main branch:
activate M68040 style dma flush also on M68060 only kernels.
 1.12.10.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.3 05-Oct-1997  veego Unused files after the sfas driver is replaced by the MI ncr53c9x driver.
 1.2 21-Apr-1996  veego branches: 1.2.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.2.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6 05-Oct-1997  veego Unused files after the sfas driver is replaced by the MI ncr53c9x driver.
 1.5 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.4 21-Apr-1996  veego branches: 1.4.10; 1.4.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.3 12-Aug-1995  mycroft minphys() functions really should return void.
 1.2 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.1 12-May-1995  chopps scsi drivers for fastlane and blizzard controllers that use the
Emulex FAS216 chip. from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.4.12.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.12.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.10.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.71 07-Apr-2022  andvar fix various typos in comments.
 1.70 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.69 21-Sep-2014  christos branches: 1.69.20;
remove dead code
 1.68 22-Jan-2014  christos branches: 1.68.4;
gcc-4.8.x unused variable fixes
 1.67 27-Oct-2012  chs branches: 1.67.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.66 20-Dec-2010  matt branches: 1.66.8; 1.66.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.65 29-Jan-2010  phx branches: 1.65.4;
Define DCIAS() for amigappc.
 1.64 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.63 18-Mar-2009  cegger bcopy -> memcpy
 1.62 18-Mar-2009  cegger bzero -> memset
 1.61 10-Jan-2009  mhitch branches: 1.61.2;
For some reason lost in obscurity and time, I did not ever implement a
timeout capability to these drivers. Apparently no one has ever had
scsi devices that failed to complete a scsi operation in some fashion,
or at least no one has reported it as best I can remember. I've just
run into this situation and figured out that one disk would fail to
complete an I/O transaction and never timed out. Add the appropriate
timeout function to reset the controller and restart things.
 1.60 17-Dec-2008  cegger kill MALLOC and FREE macros.
 1.59 08-Dec-2008  mhitch Deal with unrecognized SCSI message byte - restart script to clear the
ACK. No longer hangs the driver when an unhandled message byte is seen.
 1.58 17-Oct-2007  garbled branches: 1.58.16; 1.58.20; 1.58.26; 1.58.28; 1.58.30;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.57 20-Aug-2007  is branches: 1.57.2;
First part of amigappc support patches by Frank Wille.
 1.56 13-May-2007  mhitch branches: 1.56.4; 1.56.8;
Fix warnings with DEBUG enabled.
 1.55 04-Mar-2007  christos branches: 1.55.2; 1.55.4; 1.55.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.54 08-Mar-2006  lukem branches: 1.54.14; 1.54.16; 1.54.20;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.53 11-Dec-2005  christos branches: 1.53.4; 1.53.6; 1.53.8; 1.53.10;
merge ktrace-lwp.
 1.52 13-Jun-2005  jmc branches: 1.52.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.51 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.50 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.49 18-Jun-2003  drochner branches: 1.49.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.48 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.47 24-Feb-2002  is remove unused prototype (a duplicate with a typing error)
 1.46 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.45 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.44 25-Apr-2001  bouyer branches: 1.44.2; 1.44.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.43 30-Sep-1999  thorpej branches: 1.43.2; 1.43.14;
Update for SCSIPI changes.
 1.42 06-Sep-1999  is Switch to cacheops. This closes PR 1960.
 1.41 28-Mar-1999  is The "Phase mismatch, REQ not asserted" error happens on one of my disks
a few times a day. As the driver and system always recovers, when typing
a few c-ontinues, I think not entering the Debugger() won't hurt.
 1.40 26-Mar-1999  mhitch More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.39 04-Jul-1998  jonathan defopt DDB.
 1.38 27-Nov-1997  mhitch delay() is using calculated timing, so correct the delay during polled
SCSI wait to get a more accurate timeout.
 1.37 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.36 26-Jul-1997  is branches: 1.36.2;
Lowering spl when doing disk I/O below splbio() isnt recommended.
 1.35 13-Oct-1996  christos branches: 1.35.8;
backout previous kprintf change
 1.34 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.33 12-May-1996  mhitch Remove old-style disk instrumentation now that iostat, systat, and
vmstat are fixed.
 1.32 28-Apr-1996  mhitch Correct check for NULL pointer references in siop_scsidone().
Only call Debugger() if DDB is defined.
If the wait for reselect is interrupted and sc_nexus was NULL, only
print the debug message if DEBUG is defined.
 1.31 23-Apr-1996  veego Added some ifdef's for RETINA_SPEED_HACK
Argh, why is a fuction from the RetinaZ2 console driver in the console
driver for the RetinaZ3 ? Fixed.
Fixed some warnings from -Wall if you don't use -DDEBUG
 1.30 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.29 15-Mar-1996  mhitch Correct 53c710 initialization for the A4000T. Remove the A4000T probe
debugging output.
 1.28 03-Feb-1996  chuck Ensure siop_acb alignment via malloc rather than let alignment depend
on the size of MI data structures that come before it in the softc.
Chip will not function properly if alignment is wrong. (as per OpenBSD)
Detected and fixed by: Chuck Cranor <chuck@ccrc.wustl.edu>
and Michael L Hitch <osymh@gemini.oscs.montana.edu>
 1.27 07-Jan-1996  thorpej New generic disk framework. Highlights:

- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.

- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.

- Several new functions for attaching and detaching disks, and
handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.26 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.25 29-Sep-1995  chopps branches: 1.25.2;
move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.23 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.22 12-Aug-1995  mycroft minphys() functions really should return void.
 1.21 26-Jul-1995  chopps fix minphys routine to match others
 1.20 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.19 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.18 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.17 26-Oct-1994  cgd new RCS ID format.
 1.16 18-Jul-1994  chopps branches: 1.16.2;
fix so it compiles without DEBUG.
 1.15 27-Jun-1994  chopps branches: 1.15.2;
some fixes from Michael
 1.14 22-Jun-1994  chopps cleanup from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 14-Jun-1994  chopps remove dumb comment of mine.
 1.12 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.11 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 12-May-1994  chopps ifdef out use of scsi_xfer->req_sense_length for now..
 1.8 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.7 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.5 21-Feb-1994  chopps fixed a couple minor bugs in con code for ite. added floptical support in
sd.c (based on patch from Andreas E. Heitman).
 1.4 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.15.2.1 18-Jul-1994  cgd update from trunk, per chopps
 1.16.2.2 18-Jul-1994  chopps fix so it compiles without DEBUG.
 1.16.2.1 18-Jul-1994  chopps file siop.c was added on branch netbsd-1-0 on 1994-07-18 08:06:41 +0000
 1.25.2.1 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.35.8.2 30-Jul-1997  bouyer Sync with trunk.
 1.35.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.36.2.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.43.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.43.2.4 23-Apr-2001  is Shouldn't the compiler warn about uninitialized variables?
 1.43.2.3 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.43.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.43.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.44.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.44.8.1 25-Apr-2001  nathanw file siop.c was added on branch nathanw_sa on 2002-02-28 04:07:00 +0000
 1.44.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.44.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.49.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.49.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.49.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.49.2.1 03-Aug-2004  skrll Sync with HEAD
 1.52.2.2 03-Sep-2007  yamt sync with head.
 1.52.2.1 21-Jun-2006  yamt sync with head.
 1.53.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.53.8.1 13-Mar-2006  yamt sync with head.
 1.53.6.1 22-Apr-2006  simonb Sync with head.
 1.53.4.1 09-Sep-2006  rpaulo sync with head
 1.54.20.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.54.16.2 17-May-2007  yamt sync with head.
 1.54.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.54.14.2 13-Dec-2008  bouyer Pull up following revision(s) (requested by mhitch in ticket #1247):
sys/arch/amiga/dev/siop.c: revision 1.59
sys/arch/amiga/dev/siop2.c: revision 1.31
Deal with unrecognized SCSI message byte - restart script to clear the
ACK. No longer hangs the driver when an unhandled message byte is seen.
 1.54.14.1 23-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #658):
sys/arch/amiga/dev/siop2.c: revision 1.28
sys/arch/amiga/dev/siop.c: revision 1.56
Fix warnings with DEBUG enabled.
 1.55.10.2 03-Oct-2007  garbled Sync with HEAD
 1.55.10.1 22-May-2007  matt Update to HEAD.
 1.55.4.1 11-Jul-2007  mjf Sync with head.
 1.55.2.2 09-Oct-2007  ad Sync with head.
 1.55.2.1 27-May-2007  ad Sync with head.
 1.56.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.56.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.57.2.1 06-Nov-2007  matt sync with HEAD
 1.58.30.2 16-Jan-2009  bouyer Pull up following revision(s) (requested by mhitch in ticket #256):
sys/arch/amiga/dev/siop2.c: revision 1.33
sys/arch/amiga/dev/siop.c: revision 1.61
For some reason lost in obscurity and time, I did not ever implement a
timeout capability to these drivers. Apparently no one has ever had
scsi devices that failed to complete a scsi operation in some fashion,
or at least no one has reported it as best I can remember. I've just
run into this situation and figured out that one disk would fail to
complete an I/O transaction and never timed out. Add the appropriate
timeout function to reset the controller and restart things.
 1.58.30.1 13-Dec-2008  bouyer Pull up following revision(s) (requested by mhitch in ticket #175):
sys/arch/amiga/dev/siop.c: revision 1.59
sys/arch/amiga/dev/siop2.c: revision 1.31
Deal with unrecognized SCSI message byte - restart script to clear the
ACK. No longer hangs the driver when an unhandled message byte is seen.
 1.58.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.58.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.58.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.58.20.2 11-Mar-2010  yamt sync with head
 1.58.20.1 04-May-2009  yamt sync with head.
 1.58.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.61.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.65.4.1 05-Mar-2011  rmind sync with head
 1.66.18.3 03-Dec-2017  jdolecek update from HEAD
 1.66.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.66.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.66.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.66.8.1 30-Oct-2012  yamt sync with head
 1.67.2.1 18-May-2014  rmind sync with head
 1.68.4.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #165):
sys/arch/newsmips/stand/boot/netif_news.c: revision 1.9
sys/arch/mvme68k/stand/installboot/installboot.c: revision 1.19
sys/arch/arm/arm32/pmap.c: revision 1.300
sys/arch/amiga/dev/siop2.c: revision 1.43
sys/arch/amiga/amiga/disksubr.c: revision 1.62
sys/arch/news68k/news68k/bus_space.c: revision 1.13
sys/arch/amiga/dev/siop.c: revision 1.69
sys/arch/x86/x86/x86_autoconf.c: revision 1.72
Remove dead code in various places under arch/.
 1.69.20.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.44 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.43 21-Sep-2014  christos branches: 1.43.20;
remove dead code
 1.42 22-Jan-2014  christos branches: 1.42.4;
gcc-4.8.x unused variable fixes
 1.41 27-Oct-2012  chs branches: 1.41.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.40 20-Dec-2010  matt branches: 1.40.8; 1.40.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.39 22-May-2010  phx Disabled DEBUG_SYNC. Reenable when needed.
 1.38 05-Feb-2010  phx branches: 1.38.2; 1.38.4;
Added two new macros to device.h:
amiga_membarrier() enforces a reorder protection on memory read/writes.
amiga_cpu_sync() makes sure the instruction pipelines are flushed.
Both macros may be used in all amiga device drivers for compatibility with
amigappc. For the start I fixed some SCSI drivers.
cbiiisc and ahsc were tested and seem to work really fast with DMA now.
Some stability problems with amigappc remain nevertheless (spontaneous
kernel DSI traps with high CPU/SCSI load).
 1.37 29-Jan-2010  phx Define DCIAS() for amigappc.
 1.36 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.35 18-Mar-2009  cegger bcopy -> memcpy
 1.34 18-Mar-2009  cegger bzero -> memset
 1.33 10-Jan-2009  mhitch branches: 1.33.2;
For some reason lost in obscurity and time, I did not ever implement a
timeout capability to these drivers. Apparently no one has ever had
scsi devices that failed to complete a scsi operation in some fashion,
or at least no one has reported it as best I can remember. I've just
run into this situation and figured out that one disk would fail to
complete an I/O transaction and never timed out. Add the appropriate
timeout function to reset the controller and restart things.
 1.32 17-Dec-2008  cegger kill MALLOC and FREE macros.
 1.31 08-Dec-2008  mhitch Deal with unrecognized SCSI message byte - restart script to clear the
ACK. No longer hangs the driver when an unhandled message byte is seen.
 1.30 17-Oct-2007  garbled branches: 1.30.16; 1.30.20; 1.30.26; 1.30.28; 1.30.30;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.29 20-Aug-2007  is branches: 1.29.2;
First part of amigappc support patches by Frank Wille.
 1.28 13-May-2007  mhitch branches: 1.28.4; 1.28.8;
Fix warnings with DEBUG enabled.
 1.27 04-Mar-2007  christos branches: 1.27.2; 1.27.4; 1.27.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.26 08-Mar-2006  lukem branches: 1.26.14; 1.26.16; 1.26.20;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.25 11-Dec-2005  christos branches: 1.25.4; 1.25.6; 1.25.8; 1.25.10;
merge ktrace-lwp.
 1.24 13-Jun-2005  jmc branches: 1.24.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.23 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.22 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.21 18-Jun-2003  drochner branches: 1.21.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.20 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.19 24-Feb-2002  is remove unused prototype (a duplicate with a typing error)
 1.18 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.17 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.16 08-Oct-2001  is branches: 1.16.4;
Make the Cyberstorm PPC/ Cyberstorm Mk. 3 driver drive the LED.
Actually, this is added to the siop2_script; should we ever support another
siopng board that does connect something else to GPREG bit 4, we'll have
to move this to C code and make it optional.
OTOH, by then we'll have switched to the MI driver by then.
 1.15 25-Apr-2001  bouyer branches: 1.15.2; 1.15.4;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.14 30-Sep-1999  thorpej branches: 1.14.2; 1.14.14;
Update for SCSIPI changes.
 1.13 07-Sep-1999  is Oops. I forgot to add cachops here earlier.
 1.12 07-Jun-1999  is Check for an unterminated bus; if yes: complain and don't try to use this
bus. Without this, cbiiisc used to hang if nothing was connected.
Reported by Matthias Scheler. A similar method to avoid this was suggested
by Ralph Schmidt.
 1.11 01-Apr-1999  mhitch branches: 1.11.2; 1.11.4; 1.11.6;
Show 50ns period instead of 48ns for Ultra.
 1.10 28-Mar-1999  is Remove 20 lines of register dump from normal operation.
 1.9 28-Mar-1999  mhitch I had to have been asleep when I changed Ignatios's constants to register symbols.
Use the correct symbols for ODR full bits.
 1.8 28-Mar-1999  is Add back the "810" id string.
 1.7 28-Mar-1999  is Initialize all 16 elements. We're wide.
 1.6 26-Mar-1999  mhitch More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.5 22-Mar-1999  is 53c810A identification
 1.4 13-Mar-1999  is Identify the chip type when attaching.
 1.3 13-Mar-1999  is The 53c720 and up are really different. For example, the method to determine,
when disconnecting etc., how much data were transferred, has changed.
Symptom: SIOP invalid instructions when doing data transfers to disks that
disconnect.
XXX The bits etc. need to be defined correctly in the siopreg.h file, and
symbolic values used.
 1.2 12-Mar-1999  is fix some typos introduced when integrating the driver
 1.1 07-Mar-1999  is Added very preliminary version of Symbios 53c7[27]0c driver and Cyberstorm
Mk. III SCSI backend, by Michael Hitch.
XXX No wide transfers supported at the moment.
 1.11.6.1 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.11.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.1 22-Jun-1999  perry pullup 1.11->1.12 (is): disable adapter if completely unterminated
 1.14.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.2.4 22-Apr-2001  is it's siopng, not sea.
 1.14.2.3 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.14.2.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.14.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.15.4.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.15.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.15.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.15.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.16.4.1 08-Oct-2001  nathanw file siop2.c was added on branch nathanw_sa on 2002-02-28 04:07:00 +0000
 1.21.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.24.2.2 03-Sep-2007  yamt sync with head.
 1.24.2.1 21-Jun-2006  yamt sync with head.
 1.25.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.25.8.1 13-Mar-2006  yamt sync with head.
 1.25.6.1 22-Apr-2006  simonb Sync with head.
 1.25.4.1 09-Sep-2006  rpaulo sync with head
 1.26.20.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.26.16.2 17-May-2007  yamt sync with head.
 1.26.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.14.2 13-Dec-2008  bouyer Pull up following revision(s) (requested by mhitch in ticket #1247):
sys/arch/amiga/dev/siop.c: revision 1.59
sys/arch/amiga/dev/siop2.c: revision 1.31
Deal with unrecognized SCSI message byte - restart script to clear the
ACK. No longer hangs the driver when an unhandled message byte is seen.
 1.26.14.1 23-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #658):
sys/arch/amiga/dev/siop2.c: revision 1.28
sys/arch/amiga/dev/siop.c: revision 1.56
Fix warnings with DEBUG enabled.
 1.27.10.2 03-Oct-2007  garbled Sync with HEAD
 1.27.10.1 22-May-2007  matt Update to HEAD.
 1.27.4.1 11-Jul-2007  mjf Sync with head.
 1.27.2.2 09-Oct-2007  ad Sync with head.
 1.27.2.1 27-May-2007  ad Sync with head.
 1.28.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.28.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.29.2.1 06-Nov-2007  matt sync with HEAD
 1.30.30.2 16-Jan-2009  bouyer Pull up following revision(s) (requested by mhitch in ticket #256):
sys/arch/amiga/dev/siop2.c: revision 1.33
sys/arch/amiga/dev/siop.c: revision 1.61
For some reason lost in obscurity and time, I did not ever implement a
timeout capability to these drivers. Apparently no one has ever had
scsi devices that failed to complete a scsi operation in some fashion,
or at least no one has reported it as best I can remember. I've just
run into this situation and figured out that one disk would fail to
complete an I/O transaction and never timed out. Add the appropriate
timeout function to reset the controller and restart things.
 1.30.30.1 13-Dec-2008  bouyer Pull up following revision(s) (requested by mhitch in ticket #175):
sys/arch/amiga/dev/siop.c: revision 1.59
sys/arch/amiga/dev/siop2.c: revision 1.31
Deal with unrecognized SCSI message byte - restart script to clear the
ACK. No longer hangs the driver when an unhandled message byte is seen.
 1.30.28.2 28-Apr-2009  skrll Sync with HEAD.
 1.30.28.1 19-Jan-2009  skrll Sync with HEAD.
 1.30.26.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.30.20.3 11-Aug-2010  yamt sync with head.
 1.30.20.2 11-Mar-2010  yamt sync with head
 1.30.20.1 04-May-2009  yamt sync with head.
 1.30.16.1 17-Jan-2009  mjf Sync with HEAD.
 1.33.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.38.4.2 05-Mar-2011  rmind sync with head
 1.38.4.1 30-May-2010  rmind sync with head
 1.38.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.40.18.3 03-Dec-2017  jdolecek update from HEAD
 1.40.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.40.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.40.8.1 30-Oct-2012  yamt sync with head
 1.41.2.1 18-May-2014  rmind sync with head
 1.42.4.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #165):
sys/arch/newsmips/stand/boot/netif_news.c: revision 1.9
sys/arch/mvme68k/stand/installboot/installboot.c: revision 1.19
sys/arch/arm/arm32/pmap.c: revision 1.300
sys/arch/amiga/dev/siop2.c: revision 1.43
sys/arch/amiga/amiga/disksubr.c: revision 1.62
sys/arch/news68k/news68k/bus_space.c: revision 1.13
sys/arch/amiga/dev/siop.c: revision 1.69
sys/arch/x86/x86/x86_autoconf.c: revision 1.72
Remove dead code in various places under arch/.
 1.43.20.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 08-Oct-2001  is branches: 1.3.4;
Make the Cyberstorm PPC/ Cyberstorm Mk. 3 driver drive the LED.
Actually, this is added to the siop2_script; should we ever support another
siopng board that does connect something else to GPREG bit 4, we'll have
to move this to C code and make it optional.
OTOH, by then we'll have switched to the MI driver by then.
 1.2 26-Mar-1999  mhitch branches: 1.2.20; 1.2.22;
More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.1 07-Mar-1999  is Added very preliminary version of Symbios 53c7[27]0c driver and Cyberstorm
Mk. III SCSI backend, by Michael Hitch.
XXX No wide transfers supported at the moment.
 1.2.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.20.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.3.4.2 08-Oct-2001  is Make the Cyberstorm PPC/ Cyberstorm Mk. 3 driver drive the LED.
Actually, this is added to the siop2_script; should we ever support another
siopng board that does connect something else to GPREG bit 4, we'll have
to move this to C code and make it optional.
OTOH, by then we'll have switched to the MI driver by then.
 1.3.4.1 08-Oct-2001  is file siop2_script.out was added on branch nathanw_sa on 2001-10-08 21:18:59 +0000
 1.8 12-Dec-2016  maya acknowleg -> acknowledg, proceedure -> procedure.
only comments were changed.

from miod
 1.7 21-Oct-2009  snj branches: 1.7.22; 1.7.40; 1.7.44;
Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.6 11-Dec-2005  christos branches: 1.6.78;
merge ktrace-lwp.
 1.5 25-Jul-2005  is normalize capitalization. No functional change.
 1.4 08-Oct-2001  is branches: 1.4.4; 1.4.20; 1.4.36;
Make the Cyberstorm PPC/ Cyberstorm Mk. 3 driver drive the LED.
Actually, this is added to the siop2_script; should we ever support another
siopng board that does connect something else to GPREG bit 4, we'll have
to move this to C code and make it optional.
OTOH, by then we'll have switched to the MI driver by then.
 1.3 26-Mar-1999  mhitch branches: 1.3.20; 1.3.22;
More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.2 13-Mar-1999  is Adjust to match the assembled code
 1.1 07-Mar-1999  is Added very preliminary version of Symbios 53c7[27]0c driver and Cyberstorm
Mk. III SCSI backend, by Michael Hitch.
XXX No wide transfers supported at the moment.
 1.3.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.20.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.4.36.1 21-Jun-2006  yamt sync with head.
 1.4.20.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.4.2 08-Oct-2001  is Make the Cyberstorm PPC/ Cyberstorm Mk. 3 driver drive the LED.
Actually, this is added to the siop2_script; should we ever support another
siopng board that does connect something else to GPREG bit 4, we'll have
to move this to C code and make it optional.
OTOH, by then we'll have switched to the MI driver by then.
 1.4.4.1 08-Oct-2001  is file siop2_script.ss was added on branch nathanw_sa on 2001-10-08 21:18:59 +0000
 1.6.78.1 11-Mar-2010  yamt sync with head
 1.7.44.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.7.40.1 05-Feb-2017  skrll Sync with HEAD
 1.7.22.1 03-Dec-2017  jdolecek update from HEAD
 1.4 26-Mar-1999  mhitch More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 12-Dec-2016  maya acknowleg -> acknowledg, proceedure -> procedure.
only comments were changed.

from miod
 1.5 21-Oct-2009  snj branches: 1.5.22; 1.5.40; 1.5.44;
Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.4 26-Mar-1999  mhitch branches: 1.4.148;
More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.3 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 04-Jul-1995  chopps misc cleanup, better tty alloc for mfc. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4.148.1 11-Mar-2010  yamt sync with head
 1.5.44.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5.40.1 05-Feb-2017  skrll Sync with HEAD
 1.5.22.1 03-Dec-2017  jdolecek update from HEAD
 1.16 27-Jun-2022  andvar s/loobpack/loopback/ in comment.
 1.15 24-Aug-2012  msaitoh Fix typos
 1.14 08-Mar-2006  lukem branches: 1.14.102;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10;
merge ktrace-lwp.
 1.12 07-Aug-2003  agc branches: 1.12.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 28-Mar-2001  tsutsui branches: 1.11.8; 1.11.24;
Fix an obvious typo.
 1.10 26-Mar-1999  mhitch branches: 1.10.8; 1.10.20;
More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.9 09-Mar-1999  is Missing part of CS Mk. III changes
 1.8 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.7 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.10.20.1 09-Apr-2001  nathanw Catch up with -current.
 1.10.8.1 21-Apr-2001  bouyer Sync with HEAD
 1.11.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.24.1 03-Aug-2004  skrll Sync with HEAD
 1.11.8.2 28-Mar-2001  tsutsui Fix an obvious typo.
 1.11.8.1 28-Mar-2001  tsutsui file siopreg.h was added on branch nathanw_sa on 2001-03-28 17:33:08 +0000
 1.12.16.1 21-Jun-2006  yamt sync with head.
 1.13.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.13.8.1 13-Mar-2006  yamt sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.14.102.1 30-Oct-2012  yamt sync with head
 1.29 07-Apr-2022  andvar fix various typos in comments.
 1.28 01-Jan-2022  andvar fix typos in comments, mainly basicly -> basically.
 1.27 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.26 19-May-2009  phx branches: 1.26.12; 1.26.22;
Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.25 11-Dec-2005  christos branches: 1.25.78;
merge ktrace-lwp.
 1.24 07-Dec-2004  thorpej Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.22 09-Apr-2003  thorpej branches: 1.22.2;
Use PAGE_SIZE rather than NBPG.
 1.21 14-May-2002  matt Eliminate commons. (including a few unused or mismatched ones).
 1.20 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.19 25-Apr-2001  bouyer branches: 1.19.2; 1.19.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.18 26-Mar-1999  mhitch branches: 1.18.8; 1.18.20;
More 53c770 stuff: update 53c720/770 register defines and use them in
siop2.c. Add wide negotiation and Ultra support. Modify siop.c to match
the siop2.c sync negotiation changes. The CyberStorm MKIII driver now
supports 15 targets. Remove some old table-driven sync rate stuff from
the original Zeus driver.
 1.17 09-Mar-1999  is Missing part of CS Mk. III changes
 1.16 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.15 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.14 21-Apr-1996  veego branches: 1.14.10; 1.14.12;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.13 03-Feb-1996  chuck Ensure siop_acb alignment via malloc rather than let alignment depend
on the size of MI data structures that come before it in the softc.
Chip will not function properly if alignment is wrong. (as per OpenBSD)
Detected and fixed by: Chuck Cranor <chuck@ccrc.wustl.edu>
and Michael L Hitch <osymh@gemini.oscs.montana.edu>
 1.12 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 12-Aug-1995  mycroft minphys() functions really should return void.
 1.9 26-Jul-1995  chopps fix minphys routine to match others
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.3 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.14.12.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.10.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.18.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.18.8.2 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.18.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.19.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.19.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.19.8.1 25-Apr-2001  nathanw file siopvar.h was added on branch nathanw_sa on 2002-02-28 04:07:01 +0000
 1.19.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.19.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.22.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.22.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.78.1 20-Jun-2009  yamt sync with head
 1.26.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.12.1 30-Oct-2012  yamt sync with head
 1.3 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.2 23-Apr-2016  skrll Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
 1.1 27-Apr-2013  rkujawa branches: 1.1.4; 1.1.12; 1.1.14; 1.1.16; 1.1.20;
Add Thylacine USB Host Controller driver (just a zbus frontend to slhci).

Barely works due to combination of SL811HS brain damagae and our unforgiving
driver. At least most keyboards and mices are good. Of course on amiga WSCONS
kernel is needed to make any use of them.
 1.1.20.1 23-Jan-2017  skrll Adapt to branch
 1.1.16.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.1.14.1 05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.1.12.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 27-Apr-2013  yamt file slhci_zbus.c was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.1.4.3 03-Dec-2017  jdolecek update from HEAD
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 27-Apr-2013  tls file slhci_zbus.c was added on branch tls-maxphys on 2013-06-23 06:19:59 +0000
 1.2 09-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 09-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 09-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.15 25-May-1994  mycroft Clean up deleted files.
 1.14 10-Apr-1994  chopps fix pretend_tobe hack. from Robert Leland (leland@wacky.acet.org)
 1.13 20-Feb-1994  chopps changes to support Python tape drive.
 1.12 14-Feb-1994  chopps moved n "}" outside of conditional DEBUG
 1.11 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.10 11-Feb-1994  chopps Add missing Id's
 1.9 11-Feb-1994  chopps ioctl's always pass proc.
 1.8 09-Feb-1994  chopps added support for TEAC 60M, quite possibly the worst scsi interface on the planet earth.
 1.7 07-Feb-1994  chopps removed old drivers. updated st.c for buf struct changes (used diff from hp300)
 1.6 01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 30-Oct-1993  mycroft Clean up deleted files.
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.5 25-May-1994  mycroft Clean up deleted files.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.5 16-Feb-1999  is branches: 1.5.42;
Fix Copyright dates
 1.4 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.3 22-Mar-1998  is This is no longer DraCo-specific (and hasn't been for a long time).
 1.2 16-Sep-1997  is Support for the upcoming NetBSD/Amiga Hypercom driver family:
* support chip clocks != COM_FREQ, by introducing sc_frequency (for the
mainline code) and adding a frequency parameter right after the rate
parameter to comcnattach() and com_kgdb_attach().
- Make com_isa and com_multi initialize sc_frequency to COM_FREQ.
- Make i386/machdep.c and alpha/dec_xxx.c call com*attach() with the freq.
parameter.
* supio_attach_args get two more fields: a sc_ipl and a sc_arg, both ints.
- com_supio uses the first for interupt establishment (all childs will, as
soon as they exist) and the 2nd for sc_frequency.
- drsupio passes sc_ipl alway as 5, and for the "com"s, sc_arg as 16*115200
- hyper will pass sc_ipl as 6, and sc_arg as 16 * 460800
 1.1 27-Aug-1997  is branches: 1.1.2;
Define supio, a direct bus with a single locator, the port number. This
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
 1.1.2.3 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Aug-1997  thorpej file supio.h was added on branch marc-pcmcia on 1997-09-01 20:06:42 +0000
 1.5.42.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.2 25-Mar-1994  chopps move HIST out of DEBUG conditional.
 1.1 28-Feb-1994  chopps Michael Hitches patch applied for misc things, limited 5380 support.
 1.22 27-Aug-2023  andvar amiga/toccata(4): define ad1848debug to fix AUDIO_DEBUG enabled amiga build.

The code is taken from sys/dev/isa/ad1848_isa.c for consistency.
Unsure, if new debug level variable wouldn't be better or it is needed at all.
 1.21 29-Feb-2020  isaki Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.
 1.20 08-Jun-2019  isaki branches: 1.20.4;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.19 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.18 16-Mar-2019  isaki branches: 1.18.2;
Use C99 style struct initializer to audio_hw_if.
 1.17 22-Jan-2014  christos branches: 1.17.30;
gcc-4.8.x unused variable fixes
 1.16 09-Dec-2013  wiz Fix typo ("then" instead of "than")
 1.15 23-Nov-2011  jmcneill branches: 1.15.8; 1.15.12;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.
 1.14 19-Jul-2011  dyoung branches: 1.14.2; 1.14.4;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.13 02-Jun-2011  tsutsui Split device_t/softc of all ad1848 variants properly. Compile test only.

Please check all attribute users in all files.* on device_t/softc split.

XXX: not sure if gus(4) needs device_t in ad1848_isa_softc
 1.12 28-Apr-2008  martin branches: 1.12.22; 1.12.28; 1.12.32;
Remove clause 3 and 4 from TNF licenses
 1.11 11-Dec-2005  christos branches: 1.11.28; 1.11.74; 1.11.76; 1.11.78;
merge ktrace-lwp.
 1.10 15-Jan-2005  kent ansify and KNF
 1.9 10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.8 29-Oct-2004  yamt branches: 1.8.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.7 10-Jan-2004  is remove forgotten debug printf from development.
 1.6 06-Jan-2003  wiz branches: 1.6.2;
interrupt with two rs.
 1.5 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Mar-2002  christos branches: 1.3.4;
fix compilo in debugging code. Reported by: Klaus Heinz
 1.2 28-Jan-2002  aymeric branches: 1.2.2; 1.2.4;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.1 21-Jan-2002  is First draft of a Toccata driver.
 1.2.4.5 07-Jan-2003  thorpej Sync with HEAD.
 1.2.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 28-Jan-2002  nathanw file toccata.c was added on branch nathanw_sa on 2002-02-28 04:07:01 +0000
 1.2.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 28-Jan-2002  jdolecek file toccata.c was added on branch kqueue on 2002-02-11 20:07:08 +0000
 1.3.4.1 15-Mar-2004  jmc Pullup rev 1.7 (requested by is in ticket #1593)

Remove forgotten debug printf from development.
 1.6.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.6.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.2.1 09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.11.78.1 16-May-2008  yamt sync with head.
 1.11.76.1 18-May-2008  yamt sync with head.
 1.11.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.28.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.12.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.12.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.12.22.1 12-Jun-2011  rmind sync with head
 1.14.4.2 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.14.4.1 20-Nov-2011  mrg port these to audiomp: support get_locks, and take the intr_lock
in the interrupt handler.
 1.14.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.2.1 17-Apr-2012  yamt sync with head
 1.15.12.1 18-May-2014  rmind sync with head
 1.15.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.17.30.1 10-Jun-2019  christos Sync with HEAD
 1.18.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.18.2.2 04-May-2019  isaki Remove obsoleted methods in audio_hw_if.
- drain: is handled in audio upper layer now.
- mappage: is handled in audio upper layer now.
- setfd: no one uses and it's meaningless now.
 1.18.2.1 21-Apr-2019  isaki Adapt ad1848/cs4231 families to audio2.
 1.20.4.1 29-Feb-2020  ad Sync with head.
 1.2 26-Jan-1994  mycroft Clean up deleted files.
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 07-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2 09-Feb-1994  mycroft Clean up deleted files.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.36 27-Jan-2025  andvar s/probeing/probing/ in comments.
 1.35 26-Mar-2023  andvar branches: 1.35.6;
s/dipslay/display/ in comments.
 1.34 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.33 12-Nov-2015  phx Use the MD_BTOP() macro as replacement for m68k_btop() in all device
drivers which are shared with amigappc.
 1.32 20-Aug-2015  christos include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.
 1.31 25-Jul-2014  dholland branches: 1.31.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.30 16-Mar-2014  dholland branches: 1.30.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.29 26-Oct-2009  cegger branches: 1.29.12; 1.29.22; 1.29.26;
kill extra whitespaces
reviewed by tsutsui@
 1.28 18-Mar-2009  cegger bcopy -> memcpy
 1.27 23-Mar-2008  cube branches: 1.27.4; 1.27.12; 1.27.18;
Use M_TEMP for allocations instead of the now deceased M_IOCTLOPS.
 1.26 04-Mar-2007  christos branches: 1.26.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.25 11-Dec-2005  christos branches: 1.25.26;
merge ktrace-lwp.
 1.24 23-Oct-2002  jdolecek branches: 1.24.6; 1.24.22;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.23 10-Oct-2002  jdolecek replace the somewhat strange poll routine with standard nopoll() (a.k.a
seltrue())
 1.22 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.21 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.20 17-Mar-2002  atatat branches: 1.20.4; 1.20.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.19 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.18 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.17 26-Jun-2000  simonb branches: 1.17.2; 1.17.4; 1.17.8;
Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.16 13-Oct-1996  christos branches: 1.16.28; 1.16.38;
backout previous kprintf change
 1.15 11-Oct-1996  mhitch Changes for poll(2).
 1.14 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.13 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.12 10-Apr-1995  mycroft map --> mmap
 1.11 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.7 10-Apr-1994  chopps little bit of KNiFeing, view and ite ioctl names cleaned. ite bell
values made sensical for users. (that is pitch,msec not period,count)
 1.6 30-Mar-1994  chopps remove dlists.h oops.
 1.5 17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.4 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.3 30-Jan-1994  chopps Re-enabled views, fixed warning in serial driver.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.16.38.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.16.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.17.8.6 11-Nov-2002  nathanw Catch up to -current
 1.17.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.17.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.17.8.3 13-Aug-2002  nathanw Catch up to -current.
 1.17.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.17.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.17.4.6 10-Oct-2002  jdolecek use nokqfilter (or seltrue_kqfilter()) for drivers which provide poll
routine very similar to seltrue(); the poll routines would be cleaned
up on trunk
 1.17.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.17.4.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.17.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.17.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.17.4.1 12-Sep-2001  thorpej Add noop kqueue entry points.
 1.17.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.20.6.1 07-Aug-2002  lukem Pull up revision 1.21 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.20.4.2 30-Aug-2002  gehenna catch up with -current.
 1.20.4.1 16-May-2002  gehenna Add the character device switch.
 1.24.22.3 24-Mar-2008  yamt sync with head.
 1.24.22.2 03-Sep-2007  yamt sync with head.
 1.24.22.1 21-Jun-2006  yamt sync with head.
 1.24.6.1 21-Nov-2004  skrll Adapt to branch.
 1.25.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.40.1 03-Apr-2008  mjf Sync with HEAD.
 1.27.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.27.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.27.4.2 11-Mar-2010  yamt sync with head
 1.27.4.1 04-May-2009  yamt sync with head.
 1.29.26.1 18-May-2014  rmind sync with head
 1.29.22.2 03-Dec-2017  jdolecek update from HEAD
 1.29.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.2.1 10-Aug-2014  tls Rebase.
 1.31.4.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.31.4.1 22-Sep-2015  skrll Sync with HEAD
 1.35.6.1 02-Aug-2025  perseant Sync with HEAD
 1.12 26-Mar-2023  andvar s/dipslay/display/ in comments.
 1.11 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.10 07-Sep-2015  dholland Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.9 06-Sep-2002  gehenna branches: 1.9.156; 1.9.176;
Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.8 25-Apr-2002  aymeric branches: 1.8.2;
o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 21-Apr-1996  veego branches: 1.6.42; 1.6.44; 1.6.48;
- Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 10-Apr-1994  chopps little bit of KNiFeing, view and ite ioctl names cleaned. ite bell
values made sensical for users. (that is pitch,msec not period,count)
 1.3 13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.6.48.3 17-Sep-2002  nathanw Catch up to -current.
 1.6.48.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.48.1 28-Feb-2002  nathanw Catch up to -current.
 1.6.44.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.44.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.44.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.42.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.8.2.1 16-May-2002  gehenna Remove unnecessary prototypes.
 1.9.176.1 22-Sep-2015  skrll Sync with HEAD
 1.9.156.1 03-Dec-2017  jdolecek update from HEAD
 1.6 26-Mar-2023  andvar s/dipslay/display/ in comments.
 1.5 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 26-Oct-1994  cgd branches: 1.3.46; 1.3.50;
new RCS ID format.
 1.2 29-Jan-1994  chopps Fixed my incorrect copyright.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5 09-Feb-1994  mycroft Clean up deleted files.
 1.4 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.4 09-Feb-1994  mycroft Clean up deleted files.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.5 28-Aug-2006  he Collapse two more separate instances of MD vuid_event.h header
files to instead use the common <dev/sun/vuid_event.h> header.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8;
merge ktrace-lwp.
 1.3 07-Aug-2003  agc branches: 1.3.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 26-Oct-1994  cgd branches: 1.2.66;
new RCS ID format.
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.2.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.66.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.8.1 03-Sep-2006  yamt sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.7 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.6 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.5 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.4 04-Sep-2017  phx Remove double device pointers. The pointer is already part of sc_wdcdev.
 1.3 03-Jan-2014  rkujawa branches: 1.3.4; 1.3.6; 1.3.10; 1.3.24;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.2 22-Dec-2013  rkujawa Changes to ACA500 support:
- Add support for second (aux) CF slot.
- Rework wdc attachment to be more sane.
- Add support for clockport on ACA500.
- Fix style where appropriate.
 1.1 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.3.24.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.3.24.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.3.10.3 03-Dec-2017  jdolecek update from HEAD
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 03-Jan-2014  tls file wdc_acafh.c was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 03-Jan-2014  yamt file wdc_acafh.c was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 03-Jan-2014  rmind file wdc_acafh.c was added on branch rmind-smpnet on 2014-05-18 17:44:55 +0000
 1.41 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.40 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.39 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.38 18-Apr-2015  mlelstv branches: 1.38.6;
detect a4000 hardware only once, then use the result.
 1.37 03-Jan-2014  rkujawa branches: 1.37.6;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.36 31-Jul-2012  bouyer branches: 1.36.2; 1.36.4;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.35 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.34 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.33 19-Jul-2011  dyoung branches: 1.33.2;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.32 13-Jan-2011  phx Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.31 28-Apr-2008  martin branches: 1.31.22;
Remove clause 3 and 4 from TNF licenses
 1.30 18-Mar-2008  cube branches: 1.30.2; 1.30.4;
Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.29 27-Mar-2006  aymeric branches: 1.29.38; 1.29.58; 1.29.62;
as far as control registers are concerned, the A1200 behaves the same as the
A4000. This allows the use of ATAPI drives on the A1200.
Idesc can really rest in peace now.
 1.28 29-Jan-2006  dsl branches: 1.28.2; 1.28.4; 1.28.6; 1.28.8; 1.28.10;
Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
 1.27 16-Jan-2006  bouyer properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
 1.26 11-Dec-2005  christos branches: 1.26.2;
merge ktrace-lwp.
 1.25 13-Jun-2005  jmc branches: 1.25.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.24 23-Aug-2004  jandberg Call wdc_init_shadow_regs() after data structures are filled in.
Idea monkeyed from a commit by <mycroft>; reviewed by <aymeric>.
 1.23 20-Aug-2004  thorpej Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.22 14-Aug-2004  thorpej - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
ata_channel. Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
maximum number of drives that can be present on the channel. For now,
this is always 2. Add an ATA_MAXDRIVES constant that places an upper
limit on this value, also currently 2.
 1.21 25-May-2004  thorpej Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers. Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
 1.20 06-Jan-2004  he Make these compile again after the latest adjustments.
 1.19 03-Jan-2004  thorpej More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.18 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.17 01-Jan-2004  thorpej Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers. Clean up the member names of these structures while at it.
 1.16 31-Dec-2003  thorpej Simplify allocation of the channel queue.
 1.15 07-Dec-2003  is 2nd half of new wdc register mapping
 1.14 07-Dec-2003  is adapt to the new world of wdc register mappings
 1.13 08-Oct-2003  bouyer Adapt for wdcattach() prototype change.
 1.12 25-Sep-2003  mycroft Hide the use of config_interrupts() in one place.
 1.11 19-Sep-2003  mycroft 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
(it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
*_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
drives more quickly.
 1.10 02-Oct-2002  thorpej branches: 1.10.6;
Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.7 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.6 07-Apr-2001  tron branches: 1.6.2; 1.6.8;
Don't call "is_a1200()" again after its result was stored in the "softc"
structure.
 1.5 21-Feb-2000  aymeric branches: 1.5.6; 1.5.8;
fix a couple of things to handle interrupts more cleanly on the A1200
 1.4 19-Feb-2000  aymeric acknowledge the interrupt to gayle before entering wdc_intr.
This fixes the lost interrupts problem.
fix some glitches on the A1200 too.
 1.3 10-Feb-2000  aymeric fix interrupt handling
I still get lost interrupts on the A1200, but the problem is certainly
elsewhere (not in wdc_amiga).
 1.2 09-Feb-2000  aymeric fix a couple of things to (hopefully) make this work on the A1200
 1.1 05-Feb-2000  mhitch At long last, the MI wdc glue for the Amiga. Tested on my A4000, but not
on an A1200 yet. Configuration of wdc/atapi in GENERIC is currently
commented out to prevent the suprise of an IDE drive changing from sd0
to wd0 (and the first real SCSI drive changing from sd1/sd1 to sd0).
 1.5.8.1 09-Apr-2001  nathanw Catch up with -current.
 1.5.6.3 21-Apr-2001  bouyer Sync with HEAD
 1.5.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.5.6.1 21-Feb-2000  bouyer file wdc_amiga.c was added on branch thorpej_scsipi on 2000-11-20 19:58:44 +0000
 1.6.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.1 07-Apr-2001  nathanw file wdc_amiga.c was added on branch nathanw_sa on 2002-02-28 04:07:02 +0000
 1.6.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.2 25-Aug-2004  skrll Sync with HEAD.
 1.10.6.1 03-Aug-2004  skrll Sync with HEAD
 1.25.2.2 24-Mar-2008  yamt sync with head.
 1.25.2.1 21-Jun-2006  yamt sync with head.
 1.26.2.1 01-Feb-2006  yamt sync with head.
 1.28.10.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.28.8.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.28.6.1 01-Apr-2006  yamt sync with head.
 1.28.4.1 22-Apr-2006  simonb Sync with head.
 1.28.2.1 09-Sep-2006  rpaulo sync with head
 1.29.62.2 02-Jun-2008  mjf Sync with HEAD.
 1.29.62.1 03-Apr-2008  mjf Sync with HEAD.
 1.29.58.1 24-Mar-2008  keiichi sync with head.
 1.29.38.1 23-Mar-2008  matt sync with HEAD
 1.30.4.1 16-May-2008  yamt sync with head.
 1.30.2.1 18-May-2008  yamt sync with head.
 1.31.22.1 05-Mar-2011  rmind sync with head
 1.33.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.33.2.1 30-Oct-2012  yamt sync with head
 1.36.4.1 18-May-2014  rmind sync with head
 1.36.2.2 03-Dec-2017  jdolecek update from HEAD
 1.36.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.6.1 06-Jun-2015  skrll Sync with HEAD
 1.38.6.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.38.6.1 26-Sep-2017  jdolecek switch to ata_queue_alloc() so that this at least compiles
 1.11 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.10 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.9 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.8 31-Jul-2012  bouyer branches: 1.8.2; 1.8.28;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.7 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.6 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.5 19-Jul-2011  dyoung branches: 1.5.2;
Change <machine/bus.h> to <sys/bus.h> throughout.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 18-Mar-2008  cube branches: 1.3.2; 1.3.4;
Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.2 21-Aug-2007  is branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.12; 1.2.26; 1.2.30;
whitespace cleanup
 1.1 20-Aug-2007  is wdc frontent for the buddha and catweazle Z2 hardware. From an old prototype
by me which was never committed due to lack of testers, adopted to 4.99 and
fixed by Frank Wille.
 1.2.30.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.30.1 03-Apr-2008  mjf Sync with HEAD.
 1.2.26.1 24-Mar-2008  keiichi sync with head.
 1.2.12.2 09-Oct-2007  ad Sync with head.
 1.2.12.1 21-Aug-2007  ad file wdc_buddha.c was added on branch vmlocking on 2007-10-09 16:37:14 +0000
 1.2.8.2 03-Sep-2007  jmcneill Sync with HEAD.
 1.2.8.1 21-Aug-2007  jmcneill file wdc_buddha.c was added on branch jmcneill-pm on 2007-09-03 16:47:13 +0000
 1.2.6.3 24-Mar-2008  yamt sync with head.
 1.2.6.2 03-Sep-2007  yamt sync with head.
 1.2.6.1 21-Aug-2007  yamt file wdc_buddha.c was added on branch yamt-lazymbuf on 2007-09-03 14:22:58 +0000
 1.2.4.2 03-Sep-2007  skrll Sync with HEAD.
 1.2.4.1 21-Aug-2007  skrll file wdc_buddha.c was added on branch nick-csl-alignment on 2007-09-03 10:18:23 +0000
 1.2.2.1 23-Mar-2008  matt sync with HEAD
 1.3.4.1 16-May-2008  yamt sync with head.
 1.3.2.1 18-May-2008  yamt sync with head.
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.8.28.2 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.8.28.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.8.2.1 03-Dec-2017  jdolecek update from HEAD
 1.6 20-Oct-2017  jdolecek move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.5 07-Oct-2017  jdolecek Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.4 04-Sep-2017  phx Remove double device pointers. The pointer is already part of sc_wdcdev.
 1.3 04-Sep-2017  phx Set the correct device data size wdc_xsurf_softc instead of wdc_softc.
 1.2 21-Nov-2012  rkujawa branches: 1.2.2; 1.2.6; 1.2.30; 1.2.34;
Remove confusing comment, misc style.
 1.1 19-Nov-2012  rkujawa Add X-Surf IDE driver.
 1.2.34.1 11-Sep-2017  snj Pull up following revision(s) (requested by phx in ticket #265):
sys/arch/amiga/dev/wdc_xsurf.c: revision 1.3
Set the correct device data size wdc_xsurf_softc instead of wdc_softc.
 1.2.30.4 29-Sep-2017  jdolecek remove <sys/param.h> include again, atavar.h no longer needs it
 1.2.30.3 27-Sep-2017  jdolecek change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()
 1.2.30.2 26-Sep-2017  jdolecek need <sys/param.h> for DEV_BSIZE needed by atavar.h
 1.2.30.1 24-Apr-2017  jdolecek use ata_queue_alloc() to dynamically allocate ata_queue for ata channel
 1.2.6.3 03-Dec-2017  jdolecek update from HEAD
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 21-Nov-2012  tls file wdc_xsurf.c was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 21-Nov-2012  yamt file wdc_xsurf.c was added on branch yamt-pagecache on 2013-01-16 05:32:42 +0000
 1.42 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.41 24-Apr-2021  thorpej branches: 1.41.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.40 27-Oct-2012  chs branches: 1.40.18; 1.40.28; 1.40.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.39 20-Dec-2010  matt branches: 1.39.8; 1.39.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.38 13-Jun-2008  cegger branches: 1.38.18;
use device_lookup_private to get softc
 1.37 05-Mar-2007  he branches: 1.37.40; 1.37.42; 1.37.44; 1.37.46; 1.37.48;
Cast to char* before doing pointer arithmetic.
 1.36 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.35 08-Mar-2006  lukem branches: 1.35.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10;
merge ktrace-lwp.
 1.33 28-Mar-2004  mhitch branches: 1.33.16;
Remove license clauses 3 and 4 in my licenses.
 1.32 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.31 09-Apr-2003  thorpej branches: 1.31.2;
Use PAGE_SIZE rather than NBPG.
 1.30 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.29 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.28 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.27 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.26 25-Apr-2001  bouyer branches: 1.26.2; 1.26.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.25 10-Jan-1999  tron branches: 1.25.8; 1.25.20;
Don't use void pointer for arithmetic.
 1.24 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.23 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.22 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.21 12-Jan-1998  thorpej Adjust for changes to config.
 1.20 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.19 23-Dec-1996  veego branches: 1.19.8; 1.19.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.18 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.17 13-Oct-1996  christos backout previous kprintf change
 1.16 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.15 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.14 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.13 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.12 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.11 15-Mar-1996  mhitch Correct 53c710 initialization for the A4000T. Remove the A4000T probe
debugging output.
 1.10 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.9 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 16-Jun-1994  chopps fix boot diag output.
 1.2 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.1 12-May-1994  chopps new scsi siop drivers and zthreebus support from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.19.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.25.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.25.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.26.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.26.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.26.8.1 25-Apr-2001  nathanw file wesc.c was added on branch nathanw_sa on 2002-02-28 04:07:02 +0000
 1.26.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.26.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.31.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1 03-Aug-2004  skrll Sync with HEAD
 1.33.16.2 03-Sep-2007  yamt sync with head.
 1.33.16.1 21-Jun-2006  yamt sync with head.
 1.34.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.34.8.1 13-Mar-2006  yamt sync with head.
 1.34.6.1 22-Apr-2006  simonb Sync with head.
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.35.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.37.48.1 18-Jun-2008  simonb Sync with head.
 1.37.46.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.37.44.1 04-May-2009  yamt sync with head.
 1.37.42.1 17-Jun-2008  yamt sync with head.
 1.37.40.1 29-Jun-2008  mjf Sync with HEAD.
 1.38.18.1 05-Mar-2011  rmind sync with head
 1.39.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.39.8.1 30-Oct-2012  yamt sync with head
 1.40.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.40.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.40.18.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.40.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.41.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 11-Dec-2005  christos branches: 1.8.74; 1.8.76; 1.8.78;
merge ktrace-lwp.
 1.7 04-Jan-2004  jandberg Keymap updates.
- us/de keymaps based on ite keymaps, converted by Gunther Nikl
(with slight adjustments by me)
- es/fr/sv keymaps similarly based on ite keymaps
- removed the commented out keymaps
- some small fixes to the rest of the existing keymaps
 1.6 25-Oct-2003  jandberg Add polish wscons keymaps for amiga.

From Pawel Chwalowski in port-amiga/22961.
 1.5 30-May-2002  thorpej branches: 1.5.6;
Put the __unused__ attribute one some unused kbd maps.
 1.4 28-Jan-2002  aymeric branches: 1.4.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 13-Jan-2002  jandberg wskbd updates.
kbd.c: Now identifies itself as WSKBD_TYPE_AMIGA.
wskbdmap_amiga.c: Updated de/dk/sv/no keymaps.
 1.1 02-Feb-2001  is branches: 1.1.2; 1.1.6; 1.1.10;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.1.10.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file wskbdmap_amiga.c was added on branch thorpej_scsipi on 2001-02-11 19:08:48 +0000
 1.4.8.1 09-Jul-2002  gehenna catch up with -current.
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.78.1 16-May-2008  yamt sync with head.
 1.8.76.1 18-May-2008  yamt sync with head.
 1.8.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 02-Feb-2001  is branches: 1.1.2; 1.1.128; 1.1.130; 1.1.132;
Initial, still incomplete wscons support by Jukka Andberg, PR 11068
 1.1.132.1 16-May-2008  yamt sync with head.
 1.1.130.1 18-May-2008  yamt sync with head.
 1.1.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 02-Feb-2001  bouyer file wskbdmap_amiga.h was added on branch thorpej_scsipi on 2001-02-11 19:08:49 +0000
 1.37 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.36 24-Apr-2021  thorpej branches: 1.36.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.35 06-Feb-2019  mrg branches: 1.35.14;
properly check SCI_CSR_DREQ in one place.
 1.34 22-Jan-2014  christos branches: 1.34.30;
gcc-4.8.x unused variable fixes
 1.33 27-Oct-2012  chs branches: 1.33.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32 11-Dec-2005  christos branches: 1.32.112; 1.32.122;
merge ktrace-lwp.
 1.31 13-Jun-2005  jmc Fix a ton of const/volatile issues shown with new warning flags
 1.30 28-Mar-2004  mhitch Remove license clauses 3 and 4 in my licenses.
 1.29 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.28 02-Oct-2002  thorpej branches: 1.28.6;
Use CFATTACH_DECL().
 1.27 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.26 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.25 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.24 25-Apr-2001  bouyer branches: 1.24.2; 1.24.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.23 05-Dec-1998  mjacob branches: 1.23.10; 1.23.22;
Update HBAs to incorporate the new max_lun property.
 1.22 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.21 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.20 12-Jan-1998  thorpej Adjust for changes to config.
 1.19 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.18 23-Dec-1996  veego branches: 1.18.8; 1.18.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.17 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.16 13-Oct-1996  christos backout previous kprintf change
 1.15 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.14 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.13 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.12 28-Apr-1996  mhitch Fix warning from word transfer pseudo-dma function.
 1.11 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.10 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.9 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 29-May-1994  chopps 5380 driver update from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.18.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.23.22.1 21-Jun-2001  nathanw Catch up to -current.
 1.23.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.24.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.24.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.24.8.1 25-Apr-2001  nathanw file wstsc.c was added on branch nathanw_sa on 2002-02-28 04:07:03 +0000
 1.24.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.24.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.28.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.28.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.6.1 03-Aug-2004  skrll Sync with HEAD
 1.32.122.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.112.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32.112.1 30-Oct-2012  yamt sync with head
 1.33.2.1 18-May-2014  rmind sync with head
 1.34.30.1 10-Jun-2019  christos Sync with HEAD
 1.35.14.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.36.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.5 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.2 09-Aug-2013  rkujawa branches: 1.2.2; 1.2.6; 1.2.10; 1.2.50;
Fix style.
 1.1 08-Aug-2013  rkujawa Add preliminary support for Individual Computers new X-Surf 100 network card.
 1.2.50.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 09-Aug-2013  tls file xsh.c was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 09-Aug-2013  yamt file xsh.c was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.2.2.2 28-Aug-2013  rmind sync with head
 1.2.2.1 09-Aug-2013  rmind file xsh.c was added on branch rmind-smpnet on 2013-08-28 23:59:10 +0000
 1.3.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 08-Aug-2013  rkujawa branches: 1.1.2; 1.1.6; 1.1.10;
Add preliminary support for Individual Computers new X-Surf 100 network card.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 08-Aug-2013  tls file xshvar.h was added on branch tls-maxphys on 2014-08-20 00:02:43 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 08-Aug-2013  yamt file xshvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.1.2.2 28-Aug-2013  rmind sync with head
 1.1.2.1 08-Aug-2013  rmind file xshvar.h was added on branch rmind-smpnet on 2013-08-28 23:59:10 +0000
 1.6 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 19-Nov-2012  rkujawa branches: 1.3.52;
Add X-Surf IDE driver.
 1.2 29-Oct-2012  rkujawa Apparently, clockport present at offset 0xC00 is the first clockport.
 1.1 15-May-2012  rkujawa branches: 1.1.2; 1.1.4; 1.1.6;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.4.2 02-Jun-2012  mrg sync to latest -current.
 1.1.4.1 15-May-2012  mrg file xsurf.c was added on branch jmcneill-usbmp on 2012-06-02 11:08:50 +0000
 1.1.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 15-May-2012  yamt file xsurf.c was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.3.52.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.4.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 15-May-2012  rkujawa branches: 1.1.2; 1.1.4;
- Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
 1.1.4.2 02-Jun-2012  mrg sync to latest -current.
 1.1.4.1 15-May-2012  mrg file xsurfvar.h was added on branch jmcneill-usbmp on 2012-06-02 11:08:51 +0000
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 15-May-2012  yamt file xsurfvar.h was added on branch yamt-pagecache on 2012-05-23 10:07:40 +0000
 1.6 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 01-Jun-2015  phx branches: 1.3.32;
Removed unused variable to make it compile again.
 1.2 26-Nov-2012  rkujawa branches: 1.2.2; 1.2.6; 1.2.18;
Try to make z3rambd less crude. Also support BigRamPlus, FastLane Z3 RAM and
DKB3128.
 1.1 25-Nov-2012  rkujawa Add z3rambd driver, it allows using Zorro III RAM boards as block devices.
This makes sense in machines equipped with RAM on accelerator boards, where
difference between accelerator RAM and Zorro III RAM is significant. Hacks
were needed in amiga_init.c and zbus.c, but they are only enabled if this
driver is present in kernel. Otherwise user will get the usual behaviour.
 1.2.18.1 06-Jun-2015  skrll Sync with HEAD
 1.2.6.3 03-Dec-2017  jdolecek update from HEAD
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 26-Nov-2012  tls file z3rambd.c was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 26-Nov-2012  yamt file z3rambd.c was added on branch yamt-pagecache on 2013-01-16 05:32:42 +0000
 1.3.32.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.4.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 26-Nov-2012  rkujawa branches: 1.1.2; 1.1.6;
Try to make z3rambd less crude. Also support BigRamPlus, FastLane Z3 RAM and
DKB3128.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 26-Nov-2012  tls file z3rambdvar.h was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 26-Nov-2012  yamt file z3rambdvar.h was added on branch yamt-pagecache on 2013-01-16 05:32:42 +0000
 1.78 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.77 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.76 27-Apr-2021  thorpej branches: 1.76.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.75 04-Oct-2017  rkujawa branches: 1.75.20;
Update driver to support firmware v1.5+.

From Lukas F. Hartmann. With hopeful style fixes from me.
 1.74 03-Oct-2016  rkujawa Add a driver for MNTMN VA2000.

Supports accelerated wsdisplay console and running X via wsfb driver.
 1.73 26-Nov-2012  rkujawa branches: 1.73.14; 1.73.18;
Try to make z3rambd less crude. Also support BigRamPlus, FastLane Z3 RAM and
DKB3128.
 1.72 25-Nov-2012  rkujawa Add z3rambd driver, it allows using Zorro III RAM boards as block devices.
This makes sense in machines equipped with RAM on accelerator boards, where
difference between accelerator RAM and Zorro III RAM is significant. Hacks
were needed in amiga_init.c and zbus.c, but they are only enabled if this
driver is present in kernel. Otherwise user will get the usual behaviour.
 1.71 25-Nov-2012  christos readability fix.
 1.70 25-Nov-2012  rkujawa Use constants, not magic values.
 1.69 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.68 19-Jan-2012  rkujawa branches: 1.68.6;
Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.67 21-Sep-2011  rkujawa branches: 1.67.2; 1.67.6;
Fix build for both amiga and amigappc (discussed with christos).
 1.66 20-Sep-2011  christos try to make this compile again.
 1.65 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.64 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.63 03-Jun-2011  matt CFATTACH_DECL_NEW, device_t, cfdata_t
 1.62 20-Dec-2010  matt branches: 1.62.2; 1.62.6;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.61 17-Oct-2007  garbled branches: 1.61.42;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.60 20-Aug-2007  is branches: 1.60.2;
First part of amigappc support patches by Frank Wille.
 1.59 20-Aug-2007  is fix capitalization error
 1.58 20-Aug-2007  is Fix spelling error.
 1.57 04-Mar-2007  christos branches: 1.57.2; 1.57.10; 1.57.14; 1.57.18;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.56 11-Dec-2005  christos branches: 1.56.26;
merge ktrace-lwp.
 1.55 13-Jun-2005  jmc branches: 1.55.2;
Fix a ton of const/volatile issues shown with new warning flags
 1.54 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.53 04-Jan-2004  wiz Spell controller with two ls. Inspired by miod@openbsd.
 1.52 19-Dec-2003  is man/prod id submitted by Pavel Chwalowski in PR 23789.
 1.51 01-Apr-2003  thorpej branches: 1.51.2;
Use PAGE_SIZE rather than NBPG.
 1.50 01-Jan-2003  thorpej Use aprint_normal() in cfprint routines.
 1.49 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.48 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.47 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.46 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.45 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.44 13-Sep-2000  is branches: 1.44.4; 1.44.8;
Missing piece of PowerPC support.
 1.43 25-Nov-1999  is Jens, not Joerg
 1.42 25-Nov-1999  is Add a few boards we know about.
This should really be table-driven and optional.
 1.41 25-Sep-1999  is branches: 1.41.2; 1.41.8;
vm_offset_t -> vaddr_t/paddr_t
 1.40 22-Jun-1999  is Align adresses better
 1.39 31-Mar-1999  mhitch branches: 1.39.4;
Add CyberStorm MK III.
 1.38 11-Nov-1998  veego Add the Ariadne II.
 1.37 12-Jan-1998  thorpej Adjust for changes to config.
 1.36 19-Oct-1997  is zbus.c
 1.35 19-Oct-1997  veego Add an entry for the CyberVison 64/3D to the aconftab and to the
preconftab list.
 1.34 15-Sep-1997  is A few more boards. This really should be split into a seperate file, only
active if the kernel has ZBUS_VERBOSE similar to PCI, EISA, (podulebus?),
but I don't have that stuff ready yet.
 1.33 27-Mar-1997  veego branches: 1.33.4;
s/ae/le/ for the recent Ariadne changes.
 1.32 05-Mar-1997  veego branches: 1.32.2;
PicassoIV and Domino proto 16M product id's.
 1.31 06-Jan-1997  is Add manufacturer/product id for Apollo-68060 accellerator board.
 1.30 31-Dec-1996  is Add names for some more Phase5 boards.
 1.29 23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.28 09-Dec-1996  is It turned out that my orginal docs were wrong wrt. Blizzard IV
scsi... it is NOT nearly identical to the Blizzard 2060 scsi option.
Make the name reflect this. Driver cleanup will follow.
 1.27 17-Oct-1996  is Change Blizzard IV/1260/2060 to the name used by the driver.
While we're here, clean up a few other entries.
 1.26 13-Oct-1996  christos backout previous kprintf change
 1.25 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.24 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.23 09-Aug-1996  is Add manu/prod id for the DMI resolver board here. (No, no driver yet)
 1.22 22-Jul-1996  is Note Blizzard IV and Blizzard 2060 (scsi?) options. While we're here,
correct a typo in a comment.
 1.21 17-Jul-1996  is Being bored, decided to scan the existing drivers for further additions
to the "not configured" list:
Added some devices, replaced an obvious placeholder.
 1.20 17-Jul-1996  is Add two manufacturer/product id combinations which I stumbled over analyzing
an unrelated bug report. This will make kernel startups a bit more readable
in the presence of unsupported hardware.
Information contributed by Andreas Bussjaeger.
 1.19 19-May-1996  veego - grf_cl.c, grf_clreg.h: added support for Piccolo SD64
- grf_cv.c, grf_cvreg.h, ite_cv.c: some cleanups
- grf_rh.c, grf_rhreg.h, grf_rt.c: new blank ioctl and some KNF
- grf_et.c, grf_etreg.h, ite_et.c: new graphics driver for et4000 based board
(oMniBus, Domino and Merlin)
- grfabs_cc: fix PR#2034
- grfvar.h: new grfunit for GRF_ET4000_UNIT
- scsidefs.h: no longer useful
- zbus.c: new entries for: Piccolo SD64, oMniBus, Domino and Merlin
 1.18 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.17 28-Mar-1996  is Emplant SCSI driver backend by Sean Riddle and Bo Najdrovsky.
 1.16 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.15 06-Mar-1996  is Altais graphics board support, and some nicer formatting of preconftab.
Closes PR #1812 by myself.
 1.14 02-Mar-1996  veego Updated for the new CyberVision64 console
gen_cvtab.c is no longer needed
 1.13 27-Dec-1995  chopps fixup the table (pr#980) from Ignatios Souvatzis
 1.12 09-Oct-1995  chopps new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.11 07-Oct-1995  chopps new quicknet ethernet driver from Kortelainen Mika <k125374@cs.tut.fi>
 1.10 07-Oct-1995  chopps fixes for fastlane from Daniel Widenfalk <t94dwi@student.tdb.uu.se>
 1.9 30-Sep-1995  chopps fix typo (pr#1224)
 1.8 18-Aug-1995  chopps change for a2410 from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.7 18-Aug-1995  chopps new Ariadne ether from Bernd Ernesti <bernd@arresum.inka.de>
 1.6 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 04-Jul-1995  chopps misc cleanup, better tty alloc for mfc. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.3 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.2 05-Jan-1995  chopps fix a couple small bugs pointed out by Michael
 1.1 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.32.2.2 05-Mar-1997  veego PicassoIV and Domino proto 16M product id's.
 1.32.2.1 05-Mar-1997  veego file zbus.c was added on branch is-newarp on 1997-03-05 22:41:04 +0000
 1.33.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.39.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.41.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.41.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.44.8.4 03-Jan-2003  thorpej Sync with HEAD.
 1.44.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.44.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.44.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.44.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.44.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.44.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.51.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.51.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.51.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.51.2.1 03-Aug-2004  skrll Sync with HEAD
 1.55.2.1 03-Sep-2007  yamt sync with head.
 1.56.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.57.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.57.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.57.10.1 03-Oct-2007  garbled Sync with HEAD
 1.57.2.1 09-Oct-2007  ad Sync with head.
 1.60.2.1 06-Nov-2007  matt sync with HEAD
 1.61.42.2 12-Jun-2011  rmind sync with head
 1.61.42.1 05-Mar-2011  rmind sync with head
 1.62.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.62.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.67.6.1 18-Feb-2012  mrg merge to -current.
 1.67.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.67.2.2 30-Oct-2012  yamt sync with head
 1.67.2.1 17-Apr-2012  yamt sync with head
 1.68.6.3 03-Dec-2017  jdolecek update from HEAD
 1.68.6.2 25-Feb-2013  tls resync with head
 1.68.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.73.18.1 04-Nov-2016  pgoyette Sync with HEAD
 1.73.14.1 05-Oct-2016  skrll Sync with HEAD
 1.75.20.1 13-May-2021  thorpej Sync with HEAD.
 1.76.6.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.10 21-Sep-2011  christos no parameter names.
 1.9 21-Sep-2011  rkujawa Fix build for both amiga and amigappc (discussed with christos).
 1.8 02-Feb-2010  phx Fix compilation warnings and errors with amigappc.
 1.7 04-Mar-2007  christos branches: 1.7.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 09-Apr-2003  thorpej branches: 1.6.18; 1.6.56;
Use PAGE_SIZE rather than NBPG.
 1.5 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 20-Sep-2000  is branches: 1.3.4; 1.3.8;
On AmigaPPC, the kernel directly maps the i/o range.
 1.2 25-Sep-1999  is branches: 1.2.2;
vm_offset_t -> vaddr_t/paddr_t
 1.1 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.3.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.3.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.56.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.18.1 03-Sep-2007  yamt sync with head.
 1.7.44.1 11-Mar-2010  yamt sync with head
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.48 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.47 24-Apr-2021  thorpej branches: 1.47.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.46 12-Nov-2019  msaitoh branches: 1.46.10;
Add missing initialization of sc_dev.
 1.45 27-Oct-2012  chs branches: 1.45.18; 1.45.28; 1.45.30; 1.45.38; 1.45.42;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.44 20-Dec-2010  matt branches: 1.44.8; 1.44.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.43 16-Oct-2009  phx branches: 1.43.4;
Fixed typos in zssc_dump() (DEBUG).
 1.42 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.41 13-Jun-2008  cegger use device_lookup_private to get softc
 1.40 05-Mar-2007  he branches: 1.40.40; 1.40.42; 1.40.44; 1.40.46; 1.40.48;
Cast to char* before doing pointer arithmetic.
 1.39 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.38 08-Mar-2006  lukem branches: 1.38.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.37 11-Dec-2005  christos branches: 1.37.4; 1.37.6; 1.37.8; 1.37.10;
merge ktrace-lwp.
 1.36 28-Mar-2004  mhitch branches: 1.36.16;
Remove license clauses 3 and 4 in my licenses.
 1.35 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.34 09-Apr-2003  thorpej branches: 1.34.2;
Use PAGE_SIZE rather than NBPG.
 1.33 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31 28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.30 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.29 25-Apr-2001  bouyer branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.28 10-Jan-1999  tron branches: 1.28.8; 1.28.20;
Don't use void pointer for arithmetic.
 1.27 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.26 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.25 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.24 12-Jan-1998  thorpej Adjust for changes to config.
 1.23 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.22 23-Dec-1996  veego branches: 1.22.8; 1.22.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.21 10-Dec-1996  thorpej Fill in sc_link.max_target
 1.20 13-Oct-1996  christos backout previous kprintf change
 1.19 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.18 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.17 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.16 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.15 17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.14 15-Mar-1996  mhitch Correct 53c710 initialization for the A4000T. Remove the A4000T probe
debugging output.
 1.13 09-Oct-1995  chopps add prototypes for isr stuff fixes pr# 1284 and 1569
 1.12 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.9 05-Jan-1995  chopps catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 16-Jun-1994  chopps fix boot diag output.
 1.4 14-Jun-1994  chopps don't flush cache on context switches for 040's, reduce flushing
on dma operations. code from me and Michael Hitch
 1.3 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.2 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.22.10.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.22.8.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.28.20.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.8.2 29-Mar-2001  bouyer Make these pass a compile test on i386.
 1.28.8.1 29-Mar-2001  bouyer Port to thorpej_scsipi.
 1.29.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.29.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.29.8.1 25-Apr-2001  nathanw file zssc.c was added on branch nathanw_sa on 2002-02-28 04:07:04 +0000
 1.29.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.29.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.34.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1 03-Aug-2004  skrll Sync with HEAD
 1.36.16.2 03-Sep-2007  yamt sync with head.
 1.36.16.1 21-Jun-2006  yamt sync with head.
 1.37.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.37.8.1 13-Mar-2006  yamt sync with head.
 1.37.6.1 22-Apr-2006  simonb Sync with head.
 1.37.4.1 09-Sep-2006  rpaulo sync with head
 1.38.16.1 12-Mar-2007  rmind Sync with HEAD.
 1.40.48.1 18-Jun-2008  simonb Sync with head.
 1.40.46.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.40.44.3 11-Mar-2010  yamt sync with head
 1.40.44.2 20-Jun-2009  yamt sync with head
 1.40.44.1 04-May-2009  yamt sync with head.
 1.40.42.1 17-Jun-2008  yamt sync with head.
 1.40.40.1 29-Jun-2008  mjf Sync with HEAD.
 1.43.4.1 05-Mar-2011  rmind sync with head
 1.44.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.44.8.1 30-Oct-2012  yamt sync with head
 1.45.42.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #425):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.

Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.

Add missing initialization of sc_dev.
 1.45.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.45.30.1 14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1439):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.


Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


Add missing initialization of sc_dev.
 1.45.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.45.18.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.46.10.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.47.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.10 28-Dec-1994  mycroft Clean up deleted files.
 1.9 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 06-Oct-1994  chopps branches: 1.7.2;
fix a thinko in gvp diag. Add 4091 driver from Michael Hitch
(osymh@gemini.oscs.montana.edu)
 1.6 16-Jun-1994  chopps fix boot diag output.
 1.5 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.3 03-Jun-1994  chopps z buses early config support, needs testing.
 1.2 22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.1 12-May-1994  chopps new scsi siop drivers and zthreebus support from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.7.2.2 06-Oct-1994  chopps fix a thinko in gvp diag. Add 4091 driver from Michael Hitch
(osymh@gemini.oscs.montana.edu)
 1.7.2.1 06-Oct-1994  chopps file zthreebus.c was added on branch netbsd-1-0 on 1994-10-06 19:06:44 +0000
 1.4 28-Dec-1994  mycroft Clean up deleted files.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.1 12-May-1994  chopps new scsi siop drivers and zthreebus support from
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 28-Dec-1994  mycroft Clean up deleted files.
 1.11 01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 16-Jul-1994  chopps branches: 1.9.2;
ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.8 16-Jun-1994  chopps branches: 1.8.2;
fix boot diag output.
 1.7 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.6 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.5 03-Jun-1994  chopps z buses early config support, needs testing.
 1.4 26-May-1994  chopps fix typo
 1.3 25-May-1994  chopps add beginning of support for series I controllers doesn't work yet.
 1.2 11-May-1994  chopps general cleanup including boot diag messages.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.8.2.1 16-Jul-1994  cgd update from trunk, per chopps
 1.9.2.2 16-Jul-1994  chopps ed driver for 8390 based ethernet boards (currently only hydra supported)
original code from Timo Rossi <trossi@bedivere.cc.jyu.fi>, some major
style changes (KNF, pull i386 comments in, et al.) plus converting to
config.new by me.
 1.9.2.1 16-Jul-1994  chopps file ztwobus.c was added on branch netbsd-1-0 on 1994-07-16 02:26:31 +0000
 1.4 28-Dec-1994  mycroft Clean up deleted files.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.2 05-Feb-2024  andvar fix various typos in comments.
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.2 31-Aug-2025  rillig sys/arch: fix typos in comments
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.1 03-May-2023  phx Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.
 1.28 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.27 12-Jul-2018  maxv branches: 1.27.36;
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.26 24-Dec-2015  christos branches: 1.26.16; 1.26.18;
fenv for m68k
 1.25 17-Jul-2011  joerg branches: 1.25.12; 1.25.30;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.23 09-Feb-2007  ad branches: 1.23.48;
Merge newlock2 to head.
 1.22 26-Jul-2006  drochner branches: 1.22.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.21 11-Dec-2005  christos branches: 1.21.4; 1.21.8;
merge ktrace-lwp.
 1.20 08-May-2004  kleink branches: 1.20.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.19 17-Jan-2003  thorpej branches: 1.19.2;
Merge the nathanw_sa branch.
 1.18 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.17 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.16 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.15 28-Nov-2001  kleink branches: 1.15.8;
No point in installing svr4_machdep.h.
 1.14 19-Sep-2001  thorpej branches: 1.14.4;
Amiga don't need its own fbio.h anymore; screenblank(8) uses <dev/sun/fbio.h>,
and the ioctl that this file defines is compatible.
 1.13 15-Apr-2001  kleink branches: 1.13.2; 1.13.4;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.12 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.11 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.10 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.9 26-Jun-2000  kleink branches: 1.9.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.8 29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.7 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.6 23-Dec-1999  kleink C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.5 19-Apr-1999  kleink branches: 1.5.2;
Add COMPAT_SVR4 for m68k.
 1.4 15-Mar-1999  minoura branches: 1.4.4;
Pullin m68k/ieee.h.
 1.3 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2 12-Jul-1998  veego Add elf_machdep.h to the INCS list.
 1.1 12-Jun-1998  cgd Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.4.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.5.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.13.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.4.6 11-Dec-2002  thorpej Sync with HEAD.
 1.14.4.5 17-Sep-2002  nathanw Catch up to -current.
 1.14.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.14.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.14.4.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.14.4.1 19-Sep-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:48 +0000
 1.15.8.2 30-Aug-2002  gehenna catch up with -current.
 1.15.8.1 16-May-2002  gehenna Remove unnecessary file.
 1.19.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.12.2 26-Feb-2007  yamt sync with head.
 1.20.12.1 30-Dec-2006  yamt sync with head.
 1.21.8.1 11-Aug-2006  yamt sync with head
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.22.4.1 01-Feb-2007  ad Header file cleanup.
 1.23.48.1 20-Jun-2009  yamt sync with head
 1.25.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.12.1 03-Dec-2017  jdolecek update from HEAD
 1.26.18.1 10-Jun-2019  christos Sync with HEAD
 1.26.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.36.1 02-Aug-2025  perseant Sync with HEAD
 1.9 07-May-2019  kamil Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h

Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
 1.8 26-Oct-1994  cgd branches: 1.8.256;
new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 07-Feb-1994  chopps remove redef of SIZE_T, logically same, lexically different.
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.256.1 10-Jun-2019  christos Sync with HEAD
 1.10 08-Oct-1996  cgd repoint at shared aout_machdep.h, not exec.h
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 01-Feb-1994  chopps fetch m68k asm macros.
 1.2 21-Aug-1999  simonb Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.30 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.29 03-Jan-2014  rkujawa branches: 1.29.30;
Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.28 22-Dec-2013  rkujawa Add preliminary support for the Individual Computers ACA500 in the form of acahf
driver. If ACA500 is equipped with supported accelerator with MMU, it allows
running NetBSD on an Amiga 500.

Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the
driver is activated with the ACA500_SUPPORT kernel option. The acahf driver
is commented out in the GENERIC kernel for now (at least until it stops being
very experimental and hackish).

When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming...
 1.27 01-Jun-2012  rkujawa branches: 1.27.2; 1.27.4;
More work on PCI memory accesses on empb(4).
 1.26 07-May-2012  tsutsui Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

For amiga, move <m68k/bus_dma.h> inclusion from <machine/pci_machdep.h>
to <machine/bus.h> since amiga will want actual bus_dma(9) in future
for PCI devices.

Fixes builds on sys/modules/if_axe etc on ancient ports.

"Sounds good" from martin@ on port-m68k@.
 1.25 21-Sep-2011  rkujawa branches: 1.25.2; 1.25.6;
Remove zbusmap prototype from bus.h (now in zbusvar.h)
 1.24 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.23 03-Feb-2010  phx Ensure reorder protection for amigappc in all bus space functions.
The ne(4) driver (XSurf2), which is the only bus_space device I got,
works now.
 1.22 20-Oct-2009  snj Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.21 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.20 11-Dec-2005  christos branches: 1.20.78; 1.20.86; 1.20.92;
merge ktrace-lwp.
 1.19 16-Aug-2004  aymeric add fake bus_space_read_region_stream_4() and bus_space_write_region_stream_4()
macros to cope with the recent wdc_pcmcia changes
 1.18 27-Sep-2002  jdolecek branches: 1.18.6;
add stubs for bus_space_read_stream_4()/bus_space_write_stream_4(),
defined similarily to other bus_space_*_4() as panic()
 1.17 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.16 23-Mar-2000  is branches: 1.16.8; 1.16.12;
Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).
 1.15 04-Mar-2000  aymeric do as if bus_space_read_4() returned an int, although it just calls panic.
 1.14 31-Jan-2000  mhitch Semicolons in the 32-bit macros aren't nice.
Add a stride-4 with swapping bus_space_method for use by MI wdc.
 1.13 23-Jan-2000  aymeric code factorisation and added stride 1 functions
 1.12 30-Dec-1999  is Rewrite of the Amiga bus_space machinery to prepare for the support of
the generic IDE driver and the PCMCIA slots.
 1.11 20-Apr-1999  is branches: 1.11.2;
Add dummy bus_space_barrier method, like mac68k
 1.10 23-Mar-1999  drochner branches: 1.10.2;
Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
 1.9 08-Nov-1998  is - declare method arrays in bus.h
- add interleaved_wordaccess method array
 1.8 07-Nov-1998  is Fix typo.
 1.7 07-Nov-1998  is We didn't really implement bus_space_{read,write}_stream_N, but
bus_space_{read,write}_region_stream_N. Correct the names.
 1.6 12-Oct-1998  is Make the data pointer of the write_multi, write_region and write_stream
methods const *.
 1.5 12-Oct-1998  is - add bus_space_{copy,set}_region_{1,2} support and implementation for
_1 and for _2 in the contiguous and interleaved case.

- while we're here, reorganize bus.h into sections, and use the defined
convenience functions everywhere.
 1.4 08-Oct-1998  is - define framework for >8bit transfers
- implement 16 bit contiguous and 16 bit interleaved, both big-endian
 1.3 02-Sep-1998  is Add bus_space_read_region_1/bus_space_write_region_1 to the Amiga bus.h.
 1.2 22-Mar-1998  is Add bus_space_subregion().
 1.1 27-Aug-1997  is branches: 1.1.2;
Amiga port bus.h. Currenlty, only the _1 functions are implemented.
 1.1.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Aug-1997  thorpej file bus.h was added on branch marc-pcmcia on 1997-09-01 20:06:44 +0000
 1.10.2.1 20-Apr-1999  perry branches: 1.10.2.1.2;
pullup 1.10->1.11 (is)
 1.10.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.16.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.16.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.18.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.6.1 25-Aug-2004  skrll Sync with HEAD.
 1.20.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.78.2 11-Mar-2010  yamt sync with head
 1.20.78.1 04-May-2009  yamt sync with head.
 1.25.6.1 02-Jun-2012  mrg sync to latest -current.
 1.25.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.2.2 30-Oct-2012  yamt sync with head
 1.25.2.1 23-May-2012  yamt sync with head.
 1.27.4.1 18-May-2014  rmind sync with head
 1.27.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 19-Jan-1995  jtc This file, which will be included by <sys/cdefs.h>, will contain macros
such as __warn_references() and __weak_reference() which are actually
machine dependant. This will make it easier for ports that are being
bootstraped with ELF and ECOFF based toolchains.

This change also introduces a new macro, _C_LABEL(x). _C_LABEL expands
its argument, an identifier, to a character string of the identifier
name as it is represented in an object file.

For most ports, _C_LABEL(x) will expand to "_x", for ELF based ports
_C_LABEL(x) will expand to "x".
 1.12 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.11 28-Feb-2002  simonb branches: 1.11.8;
Use "#define<tab>".
 1.10 27-Feb-2002  christos - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.9 26-Mar-2001  lukem branches: 1.9.2; 1.9.8;
- add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately

- create more helper macros:
. cdev__xyz_init(c,n), such as cdev__ocri_init() for
/* open, close, read, ioctl */, etc.
. cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
method `R' and the comments now read /* xxx (read) yyy */ instead
. cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
as well

- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
always DTRT WRT returning a valid result. (a few devices previously
incorrectly returned ENODEV)

- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
== 0, because it doesn't matter if dev_type_stop isn't implemented in that
case, and it allows the use of the cdev__xyz_init macros. certain ports
(sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
drivers, whereas everything else uses enodev

- ensure that the comments are accurate WRT the behaviour of a given entry
 1.8 21-Mar-2001  lukem now that duplicated stuff has been moved to sys/conf.h, remove unnecessary
defs for: lpt, joy, pc
 1.7 10-Oct-1998  thorpej branches: 1.7.12; 1.7.24;
Add scsibus entry points to the cdevsw[].
 1.6 27-Sep-1997  is First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
 1.5 27-Sep-1997  is conf.h: declare com instead of drcom.
conf.c: remove com declarations.
 1.4 30-Nov-1996  is branches: 1.4.10;
Forgotten changes needed for the drcom driver.
 1.3 07-Sep-1996  mycroft Implement poll(2).
 1.2 05-May-1996  veego removed the define for cdev_ss_init
 1.1 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.4.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.24.1 09-Apr-2001  nathanw Catch up with -current.
 1.7.12.1 27-Mar-2001  bouyer Sync with HEAD.
 1.9.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.9.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.9.8.1 26-Mar-2001  nathanw file conf.h was added on branch nathanw_sa on 2002-02-28 04:07:04 +0000
 1.9.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.11.8.1 16-May-2002  gehenna Remove unnecessary file.
 1.88 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.87 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.86 19-Jan-2024  thorpej Switch the amiga port to use the same clockframe layout as the other
m68k ports.
 1.85 18-Jan-2024  thorpej Make the M68K_MMU_* defines real kernel options, available in opt_m68k_arch.h.
For 68030, 68040, and 68060, infer M68K_MMU_MOTOROLA. For 68010 and 68020, it
must be an explicit option (set in std.${MACHINE} or, in the case of hp300,
inferred from the specific model option).
 1.84 09-Jan-2024  thorpej Remove duplicated / slightly-tweaked loadustp() (load user segment table)
routines from all of the m68k ports using the shared pmap. Instead, in
pmap_init(), set up a function pointer to the appropriate mmu_load_urp*()
function in mmu_subr.s.
 1.83 23-Nov-2019  ad cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
 1.82 22-Aug-2018  msaitoh - Cleanup for dynamic sysctl:
- Remove unused *_NAMES macros for sysctl.
- Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
use them on all m68k machines.
 1.81 17-Dec-2016  flxd branches: 1.81.14; 1.81.16;
Fix typo "one the" and architecture where appropriate.
 1.80 19-Oct-2013  christos branches: 1.80.6; 1.80.10;
make cpu_need_resched() macros consistent; __USE flags
 1.79 16-May-2011  tsutsui branches: 1.79.4; 1.79.14; 1.79.18;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
 1.78 08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.77 13-Jan-2011  phx branches: 1.77.2; 1.77.4;
Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.76 22-Dec-2010  matt Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
 1.75 09-Feb-2010  phx branches: 1.75.2;
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
 1.74 23-Nov-2009  rmind branches: 1.74.2;
Use lwp_getpcb() on m68k ports, clean from struct user usage.
 1.73 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.72 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.71 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.70 27-Feb-2008  xtraeme branches: 1.70.4; 1.70.12; 1.70.18;
Remove CTL_MACHDEP_NAMES, it's not used anywhere.

Ok by martin@.
 1.69 06-Jan-2008  mhitch branches: 1.69.2; 1.69.6;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.68 17-Oct-2007  garbled branches: 1.68.2; 1.68.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.67 04-Aug-2007  ad branches: 1.67.2;
Add ci_cpuid where it's missing.
 1.66 21-May-2007  tsutsui branches: 1.66.2; 1.66.4; 1.66.8;
Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
 1.65 20-May-2007  mhitch Forgot cpu.h for amiga - rename proc_trampoline()->lwp_trampoline().
 1.64 18-May-2007  mhitch Amiga changes for idlelwp.
 1.63 04-Mar-2007  christos branches: 1.63.2; 1.63.4; 1.63.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.62 16-Feb-2007  ad branches: 1.62.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.61 09-Feb-2007  ad Merge newlock2 to head.
 1.60 11-Dec-2005  christos branches: 1.60.20;
merge ktrace-lwp.
 1.59 26-Sep-2004  yamt branches: 1.59.12;
don't expose cpu_info to userland.
 1.58 22-Sep-2004  yamt move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.57 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
as FPU state), and is the last potentially blocking operation;
all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
 1.56 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.55 17-Jan-2003  thorpej branches: 1.55.2;
Merge the nathanw_sa branch.
 1.54 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.53 07-Nov-2001  aymeric branches: 1.53.2;
introduce an interrupt_depth variable which counts how nested we are into
interrupts.
This allows hardclock() to account for the time spent in interrrupts, and
as a side-effect, top(1), systat(1) and others will no more report 0% of
interrupt activity.

mvme68k does that already.
 1.52 30-May-2001  mrg branches: 1.52.2; 1.52.6;
use _KERNEL_OPT
 1.51 19-Dec-2000  scw branches: 1.51.2;
Unification of the m68k syscall() function.
 1.50 25-Aug-2000  thorpej Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
 1.49 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.48 14-Oct-1999  is branches: 1.48.2;
Remove now superfluous prototype definitions (of the m68k cache operations).
 1.47 10-Aug-1999  thorpej branches: 1.47.2;
Define cpu_number() as discussed on tech-smp.
 1.46 26-Feb-1999  is synchronize types, and s/curproc/p/ in one forgotten place
 1.45 25-Feb-1999  is mac68k part of pr 6152 fix, and missing bits for the others
 1.44 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.43 07-Oct-1998  thorpej Oops, back out a buglet I didn't intend to commit in the last change.
 1.42 06-Oct-1998  thorpej configure() prototype is in <sys/device.h>
 1.41 05-Sep-1998  is Define is_draco() inlined.
Corresponds to removal of this function in autoconf.c 1.61.
 1.40 13-Feb-1998  scottr Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
 1.39 26-Oct-1997  is Make these compile after m68k/m68k.h 1.4->1.5.
 1.38 09-Apr-1997  thorpej regdump() is prototyped in <m68k/cpu.h> now.
 1.37 31-Jan-1997  mhitch "options GENERIC" is obsolete, don't need the prototype for setconf() anymore.
 1.36 11-Sep-1996  thorpej Use <m68k/cpu.h>.
 1.35 19-May-1996  is Some more Prototypes needed for DraCo support.
 1.34 16-May-1996  is Only declare setconf() #ifdef GENERIC.
 1.33 16-May-1996  is add DCIA prototype.
 1.32 09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.31 27-Apr-1996  veego Add a __noreturn__ attribute for doboot
 1.30 23-Apr-1996  veego The prototyp for cpu_set_kpc is now in sys/systm.h
 1.29 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.28 30-Mar-1996  is Typo squished.
 1.27 26-Mar-1996  is Yet more MC68060 bits.
 1.26 15-Mar-1996  is AMIGA_68060 flag in cpu.h and genassym.c.
 1.25 21-Dec-1995  mycroft Remove deprecated cpu_setstack().
 1.24 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.23 28-Jun-1995  cgd remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
 1.22 16-May-1995  chopps PS_STRINGS in A2. Add fputype, remove cpuspeed. switch to new coredump
 1.21 12-May-1995  chopps enable swapping of process
 1.20 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.19 05-May-1995  cgd define BROKEN_SWAP and/or cpu_swapout as appropriate.
 1.18 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.17 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.16 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.13 25-May-1994  chopps update to work with new m68k frame and recent vm changes.
 1.12 09-May-1994  chopps update for recent sig changes and fix clock.c and ite.c
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 04-May-1994  chopps update to match current proc flags.
 1.9 10-Apr-1994  chopps also conform to standard style
 1.8 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 03-Feb-1994  chopps swap ps and pc to match m68k:struct frame.
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.47.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.48.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.48.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.51.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.52.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.52.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.52.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.53.2.6 03-Dec-2002  gmcgarry Use cpu_proc_fork().
 1.53.2.5 20-Jun-2002  nathanw Catch up to -current.
 1.53.2.4 08-Jan-2002  nathanw Catch up to -current.
 1.53.2.3 08-Dec-2001  thorpej Add a cpu_proc_fork(), called from uvm_proc_fork(), which takes care
of machine-dependent handling a fork() time (this is different from
forking the actual context in an LWP world). #define it away on
platforms which do not need it.

Problem noted by Gregory McGarry.
 1.53.2.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.53.2.1 07-Nov-2001  scw file cpu.h was added on branch nathanw_sa on 2001-11-17 21:59:09 +0000
 1.55.2.5 19-Oct-2004  skrll Sync with HEAD
 1.55.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.55.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.55.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.55.2.1 03-Aug-2004  skrll Sync with HEAD
 1.59.12.4 17-Mar-2008  yamt sync with head.
 1.59.12.3 21-Jan-2008  yamt sync with head
 1.59.12.2 03-Sep-2007  yamt sync with head.
 1.59.12.1 26-Feb-2007  yamt sync with head.
 1.60.20.1 06-Feb-2007  ad Make amiga & mac68k compile.
 1.62.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.63.10.2 03-Oct-2007  garbled Sync with HEAD
 1.63.10.1 22-May-2007  matt Update to HEAD.
 1.63.4.1 11-Jul-2007  mjf Sync with head.
 1.63.2.2 20-Aug-2007  ad Sync with HEAD.
 1.63.2.1 27-May-2007  ad Sync with head.
 1.66.8.1 04-Aug-2007  jmcneill Sync with HEAD.
 1.66.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.66.2.1 07-Aug-2007  matt Sync with HEAD.
 1.67.2.3 23-Mar-2008  matt sync with HEAD
 1.67.2.2 09-Jan-2008  matt sync with HEAD
 1.67.2.1 06-Nov-2007  matt sync with HEAD
 1.68.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.68.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.69.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.69.2.1 24-Mar-2008  keiichi sync with head.
 1.70.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.70.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.70.4.3 11-Mar-2010  yamt sync with head
 1.70.4.2 20-Jun-2009  yamt sync with head
 1.70.4.1 04-May-2009  yamt sync with head.
 1.74.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.75.2.2 31-May-2011  rmind sync with head
 1.75.2.1 05-Mar-2011  rmind sync with head
 1.77.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.77.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.79.18.1 18-May-2014  rmind sync with head
 1.79.14.2 03-Dec-2017  jdolecek update from HEAD
 1.79.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.79.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.80.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.80.6.1 05-Feb-2017  skrll Sync with HEAD
 1.81.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.81.16.1 10-Jun-2019  christos Sync with HEAD
 1.81.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.6 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.5 15-Aug-2001  mhitch branches: 1.5.6; 1.5.172;
ELF symbol support for DDB.
 1.4 26-Oct-1994  cgd branches: 1.4.46;
new RCS ID format.
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4.46.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.5.172.1 03-Dec-2017  jdolecek update from HEAD
 1.5.6.2 15-Aug-2001  mhitch ELF symbol support for DDB.
 1.5.6.1 15-Aug-2001  mhitch file db_machdep.h was added on branch nathanw_sa on 2001-08-15 01:29:30 +0000
 1.8 30-Aug-2011  bouyer Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.7 12-Sep-2009  phx Make disklabel.h from amiga and amigappc include the MI sys/disklabel_rdb.h.
amiga/amiga/adosglue.h was deleted and moved into sys_disklabel_rdb.h, as both
are always needed together (disksubr.c and ofppc/stand/ofwboot/rdb.c).
 1.6 21-Apr-1996  veego branches: 1.6.170;
- Cleanup for -Wall and -Wstrict-prototypes
 1.5 04-Jul-1995  chopps misc cleanup, better tty alloc for mfc. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 14-Oct-1994  cgd move arch dependence to archs. clean up a bit. deal with weird MAXPARTITONS.
 1.2 04-Jul-1994  chopps move to new disk minor encoding (parts have lowest 4 bits instead of 3)
remove multiple inclusions protection from varargs.h
 1.1 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.6.170.1 16-Sep-2009  yamt sync with head
 1.1 12-Jul-1998  thorpej Basic elf_machdep.h for m68k; doesn't include relocations, yet.
 1.9 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.8 24-Jan-1999  mycroft branches: 1.8.8;
Format consistency.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1 17-Mar-2000  mycroft branches: 1.1.6;
In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 17-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 19:58:47 +0000
 1.10 08-Oct-1996  cgd moved to aout_machdep.h (via repository copy)
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.4 19-Sep-2001  thorpej Amiga don't need its own fbio.h anymore; screenblank(8) uses <dev/sun/fbio.h>,
and the ioctl that this file defines is compatible.
 1.3 16-Feb-1999  is branches: 1.3.20; 1.3.22;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 19-May-1996  is Screenblank support:
- new fbio.h in arch/amiga/include, defining only FBIOSVIDEO
- add an IOCTL translation to arch/amiga/dev/grf.c
- add screenblank to the list of specials to build on amiga.
 1.3.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.20.1 01-Oct-2001  fvdl Catch up with -current.
 1.1 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.1 24-Dec-2015  christos branches: 1.1.2; 1.1.18;
fenv for m68k
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 24-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:35:48 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 24-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:29 +0000
 1.9 03-Feb-1998  mycroft Prototype __flt_rounds() consistently.
 1.8 26-Oct-1994  cgd branches: 1.8.18;
new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.18.1 08-May-1998  mycroft Sync with trunk, per request of mycroft.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.2 30-Aug-1999  mycroft A foolish consistency.
 1.1 15-Mar-1999  minoura Pullin m68k/ieee.h.
 1.2 16-Apr-1995  jtc Fix typo: ieefp.h -> ieeefp.h.
 1.1 09-Apr-1995  mycroft Move fp_except and fp_rnd definitions to machine/include.
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:35 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:53:06 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:06 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:53:06 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:04 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:53:06 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:19:51 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:53:07 +0000
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 19:58:48 +0000
 1.23 11-Jul-2023  riastradh amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
 1.22 10-Aug-2020  rin branches: 1.22.20;
Clean up _LKM --> _MODULE leftovers.

Note that _KERNEL is always defined for modules.
 1.21 19-May-2009  phx Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
 1.20 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.19 03-Dec-2007  ad branches: 1.19.14; 1.19.16; 1.19.18;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.18 11-Mar-2007  thorpej branches: 1.18.16; 1.18.18; 1.18.24;
- Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2). See
sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2. In any case, at least
Sun2 compiles now.
 1.17 16-Feb-2007  ad branches: 1.17.2; 1.17.6;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.16 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.15 06-Oct-2006  tsutsui Use #ifdef _AMIGA_INTR_H_ rather than _MACHINE_INTR_H_
to protect multiple inclusion.
 1.14 11-Dec-2005  christos branches: 1.14.20; 1.14.22;
merge ktrace-lwp.
 1.13 23-Jan-2005  chs branches: 1.13.8;
move spl*() and IPL_* definitions from psl.h to intr.h.
 1.12 17-Jan-2001  is branches: 1.12.24; 1.12.32;
Add IPL_SOFTCLOCK, which was missing.
 1.11 14-Jan-2001  thorpej Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
 1.10 23-Jan-2000  aymeric add IPL_SERIAL to enable PCMCIA com* compilation
 1.9 15-Jan-2000  aymeric defined IPL_BIO, IPL_NET and IPL_TTY for soon to be integrated PCMCIA code
 1.8 16-Feb-1999  is branches: 1.8.8;
Fix Copyright dates
 1.7 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.6 02-Sep-1998  is Split SMC chipset ARCnet driver into
- machine independent chip driver, in dev/ic/smc90cx6.c/...reg.h,...var.h,
using bus_space methods
- ZBUS frontend in arch/amiga/dev/if_bah_zbus.c
- added IPL_SOFTNET to arch/amiga/include/intr.h, for this
Implementing the ISA bus frontend is left as an exercise to the reader.
 1.5 18-Jul-1998  is Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).
 1.4 16-Apr-1998  is Dont define splserial here... its now different from spltty.
 1.3 27-Oct-1997  is Make splserial == spltty, for now. This should be revisited after the
release.
 1.2 17-Oct-1997  is branches: 1.2.2;
Stopgap for splaudio(), needed by the Melody driver.
This will be replaced soon by something similar to the spltty stuff.
 1.1 27-Aug-1997  is branches: 1.1.2;
machine/intr.h for the Amiga port. Mostly a wrapper around other includes.
 1.1.2.2 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1 27-Aug-1997  thorpej file intr.h was added on branch marc-pcmcia on 1997-09-01 20:06:45 +0000
 1.2.2.1 28-Oct-1997  mellon Pull rev 1.3 up from trunk
 1.8.8.3 11-Feb-2001  bouyer Sync with HEAD.
 1.8.8.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.12.32.1 29-Apr-2005  kent sync with -current
 1.12.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.13.8.4 07-Dec-2007  yamt sync with head
 1.13.8.3 03-Sep-2007  yamt sync with head.
 1.13.8.2 26-Feb-2007  yamt sync with head.
 1.13.8.1 30-Dec-2006  yamt sync with head.
 1.14.22.3 23-Oct-2006  yamt add splsoftserial.
 1.14.22.2 06-Oct-2006  tsutsui Make GENERIC compile:
- protect whole definitions from multiple inclusion
- define splaudio even if it isn't defined
- move declarations before reference
- fix splserial macro to use _splraise() directly
(makeiplcookie is not an array anyway)

(yamt-san: do_func.s errors could be caused by bad toolchain or lack of nbsed)
 1.14.22.1 29-Sep-2006  yamt implement splraiseipl/makeiplcookie for amiga.
 1.14.20.2 12-Jan-2007  ad Sync with head.
 1.14.20.1 18-Nov-2006  ad Sync with head.
 1.17.6.2 03-Dec-2007  ad Sync with HEAD.
 1.17.6.1 13-Mar-2007  ad Sync with head.
 1.17.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.18.24.1 08-Dec-2007  mjf Sync with HEAD.
 1.18.18.1 09-Jan-2008  matt sync with HEAD
 1.18.16.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.19.18.2 20-Jun-2009  yamt sync with head
 1.19.18.1 16-May-2008  yamt sync with head.
 1.19.16.1 18-May-2008  yamt sync with head.
 1.19.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.20.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.1 12-May-1996  mhitch Used by the new libkvm and kernel coredump.
 1.9 28-Mar-2012  christos - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
 1.8 26-Oct-1994  cgd branches: 1.8.206; 1.8.210;
new RCS ID format.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 18-Aug-1993  jtc Removed CLK_TCK, it's value is not machine dependant.
It's supposed to be defined in <time.h>, not <limits.h> anyway.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.8.210.1 05-Apr-2012  mrg sync to latest -current.
 1.8.206.1 17-Apr-2012  yamt sync with head
 1.6 06-Aug-2014  joerg Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
 1.5 14-Mar-2009  dsl branches: 1.5.22; 1.5.36;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 28-Apr-2008  martin branches: 1.4.8; 1.4.14;
Remove clause 3 and 4 from TNF licenses
 1.3 25-Jan-2006  christos branches: 1.3.72; 1.3.74; 1.3.76;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 31-Oct-2001  thorpej branches: 1.2.2; 1.2.34; 1.2.46;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.1 15-Aug-2001  mhitch branches: 1.1.2; 1.1.6;
loadfile() support for new amiga boot loader.
 1.1.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 15-Aug-2001  thorpej file loadfile_machdep.h was added on branch kqueue on 2001-08-25 06:15:06 +0000
 1.2.46.1 01-Feb-2006  yamt sync with head.
 1.2.34.1 21-Jun-2006  yamt sync with head.
 1.2.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:46 +0000
 1.3.76.2 04-May-2009  yamt sync with head.
 1.3.76.1 16-May-2008  yamt sync with head.
 1.3.74.1 18-May-2008  yamt sync with head.
 1.3.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.36.1 10-Aug-2014  tls Rebase.
 1.5.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 29-Apr-2000  thorpej branches: 1.1.6;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 19:58:48 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:25 +0000
 1.1 23-Dec-1999  kleink branches: 1.1.6;
C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.6.1 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 19:58:48 +0000
 1.2 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 10-Nov-2001  scw branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.20 30-May-2009  phx No longer used since migrating from sicallback-softints to MI-softints.
 1.19 03-Dec-2007  ad branches: 1.19.18; 1.19.32;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.18 07-Oct-2006  mhitch branches: 1.18.8; 1.18.26; 1.18.28; 1.18.34;
Use atomic operations for setting ssir. Fixes problem when compiled without
optimization of losing a scheduled software interrupt and stalling the
softclock processing.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 07-Aug-2003  agc branches: 1.16.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.15 15-Jan-2001  thorpej branches: 1.15.24;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.14 28-Nov-1998  is branches: 1.14.10;
Implement softintr_disestablish().
 1.13 25-Jul-1998  is Use atomic operations for DraCo interupt registers
 1.12 25-Jul-1998  is This has been in amiga/amiga/mtpr.h for a long, long time.
 1.11 27-Aug-1997  is Add __GENERIC_SOFT_INTERRUPTS implementation.
Currently, this is only kind of a wrapper around the *_sicallback() function
family. This way, we'll only break the new driver if it doesn't work.
After more drivers are converted, we'll change it to be the other way round.
 1.10 09-May-1996  is branches: 1.10.12;
First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.9 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.12.1 01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.10.1 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.24.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.2 07-Dec-2007  yamt sync with head
 1.16.16.1 30-Dec-2006  yamt sync with head.
 1.17.22.1 22-Oct-2006  yamt sync with head
 1.17.20.1 18-Nov-2006  ad Sync with head.
 1.18.34.1 08-Dec-2007  mjf Sync with HEAD.
 1.18.28.1 09-Jan-2008  matt sync with HEAD
 1.18.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.18.8.1 03-Dec-2007  ad Sync with HEAD.
 1.19.32.1 24-Oct-2010  jym Sync with HEAD
 1.19.18.1 20-Jun-2009  yamt sync with head
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:05:48 +0000
 1.50 12-Nov-2015  phx Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.49 10-Feb-2012  para branches: 1.49.6; 1.49.24;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.48 08-Feb-2011  rmind branches: 1.48.4; 1.48.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.47 11-Dec-2009  tsutsui branches: 1.47.4; 1.47.6; 1.47.8;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
(that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.
 1.46 09-Dec-2009  tsutsui Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
 1.45 06-Jan-2008  mhitch branches: 1.45.10;
Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.44 11-Dec-2005  christos branches: 1.44.50; 1.44.56; 1.44.64;
merge ktrace-lwp.
 1.43 28-Jan-2005  is branches: 1.43.6;
Don't expose spl functions to non-kernel.
 1.42 23-Jan-2005  chs branches: 1.42.2;
move spl*() and IPL_* definitions from psl.h to intr.h.
 1.41 07-Aug-2003  agc branches: 1.41.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.40 18-May-2002  jklos branches: 1.40.8;
Updated NKMEMPAGES_MAX_DEFAULT so that large memory systems won't crash
when allocating/deallocating lots of memory at once.
 1.39 11-Feb-2000  thorpej branches: 1.39.8; 1.39.12; 1.39.20;
Update for the NKMEMPAGES changes.
 1.38 04-Dec-1999  ragge CL* discarding.
 1.37 20-Sep-1997  leo branches: 1.37.16; 1.37.22;
Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
 1.36 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.35 10-Jul-1997  veego branches: 1.35.2;
Restore the defines of UPAGES and NPTEPG.
 1.34 10-Jun-1997  veego The 'Mach derived conversion macros' are now in <m68k/param.h>
 1.33 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.32 27-Feb-1997  veego Protect MCLSHIFT definition so users can customize MCLBYTES.
patch from jonathan.
 1.31 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.30 28-Sep-1996  mhitch branches: 1.30.6;
The declarations for the interrupt enable address should only be done if
_KERNEL is defined. The bash install process was including the extern
statements into its generated Makefile.
 1.29 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.28 04-Mar-1996  cgd add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
 1.27 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.26 28-Jan-1996  chopps remove MAXPARTITIONS, closes #1923
 1.25 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24 13-Aug-1995  mycroft Replace splnet() with splsoftnet(). Add splnet().
 1.23 28-Jun-1995  cgd kill user-land DELAY macro, as suggested by gwr.
 1.22 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.21 16-May-1995  chopps PS_STRINGS in A2. Add fputype, remove cpuspeed. switch to new coredump
 1.20 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.18 18-Mar-1995  cgd don't be so quick to cast macro arguments to unsigned; if the
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
 1.17 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.16 28-Dec-1994  chopps support for recent changes (non-contig mem..)
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 16-Sep-1994  jtc branches: 1.14.2;
asm -> __asm (PR #463).
 1.13 24-Aug-1994  chopps add USPACE
 1.12 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.11 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.10 10-Apr-1994  chopps also conform to standard style
 1.9 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.8 23-Feb-1994  chopps add some very usefull debug stuff to spl inline macros.
 1.7 23-Feb-1994  hpeyerl Move some arch dependant stuff in here.
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.14.2.2 16-Sep-1994  jtc asm -> __asm (PR #463).
 1.14.2.1 16-Sep-1994  jtc file param.h was added on branch netbsd-1-0 on 1994-09-16 02:39:37 +0000
 1.30.6.1 11-Mar-1997  is merge in changes from Trunk.
 1.35.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.37.22.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.37.16.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.39.20.1 30-May-2002  gehenna Catch up with -current.
 1.39.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.39.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.40.8.5 04-Feb-2005  skrll Sync with HEAD.
 1.40.8.4 24-Jan-2005  skrll Sync with HEAD.
 1.40.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.40.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.40.8.1 03-Aug-2004  skrll Sync with HEAD
 1.41.8.1 29-Apr-2005  kent sync with -current
 1.42.2.1 12-Feb-2005  yamt sync with head.
 1.43.6.1 21-Jan-2008  yamt sync with head
 1.44.64.1 08-Jan-2008  bouyer Sync with HEAD
 1.44.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.44.50.1 09-Jan-2008  matt sync with HEAD
 1.45.10.1 11-Mar-2010  yamt sync with head
 1.47.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.47.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.47.4.1 05-Mar-2011  rmind sync with head
 1.48.8.1 18-Feb-2012  mrg merge to -current.
 1.48.4.1 17-Apr-2012  yamt sync with head
 1.49.24.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.49.6.1 03-Dec-2017  jdolecek update from HEAD
 1.17 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.16 05-Jun-2007  mhitch branches: 1.16.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.15 22-May-2007  mhitch Get rid of pcb_cmap2 - it hasn't been used for a long, long time.
 1.14 04-Mar-2007  christos branches: 1.14.2; 1.14.4; 1.14.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 11-Dec-2005  christos branches: 1.13.24; 1.13.26; 1.13.30;
merge ktrace-lwp.
 1.12 07-Aug-2003  agc branches: 1.12.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 27-Sep-2000  aymeric branches: 1.11.24;
define PCB_REGS_* so that kdb compiles again
 1.10 06-Jan-1998  thorpej branches: 1.10.14;
The user segment table pointer is no longer kept here. Change it to
a spare field.

XXX Should be changed to use generic m68k PCB!
 1.9 11-May-1995  chopps remove double mapping of kernel stack. created cpu_set_kpc()
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 21-May-1994  chopps add md_coredump
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.10.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.11.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.24.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.1 03-Sep-2007  yamt sync with head.
 1.13.30.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.24.1 30-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #683):
sys/arch/m68k/m68k/switch_subr.s: revision 1.19
sys/arch/amiga/include/pcb.h: revision 1.15
sys/arch/amiga/amiga/genassym.cf: revision 1.24
Get rid of pcb_cmap2 - it hasn't been used for a long, long time.
 1.14.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.14.4.1 11-Jul-2007  mjf Sync with head.
 1.14.2.2 09-Jun-2007  ad Sync with head.
 1.14.2.1 27-May-2007  ad Sync with head.
 1.16.10.1 06-Nov-2007  matt sync with HEAD
 1.8 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.7 11-Jul-2012  rkujawa branches: 1.7.2; 1.7.4;
Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.
 1.6 01-Jun-2012  rkujawa More work on PCI memory accesses on empb(4).
 1.5 07-May-2012  tsutsui Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

For amiga, move <m68k/bus_dma.h> inclusion from <machine/pci_machdep.h>
to <machine/bus.h> since amiga will want actual bus_dma(9) in future
for PCI devices.

Fixes builds on sys/modules/if_axe etc on ancient ports.

"Sounds good" from martin@ on port-m68k@.
 1.4 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.3 19-Sep-2011  rkujawa branches: 1.3.2; 1.3.6;
Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.2 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.1 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.3.6.2 02-Jun-2012  mrg sync to latest -current.
 1.3.6.1 18-Feb-2012  mrg merge to -current.
 1.3.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.2.3 30-Oct-2012  yamt sync with head
 1.3.2.2 23-May-2012  yamt sync with head.
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.7.4.1 18-May-2014  rmind sync with head
 1.7.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.44 05-Jun-2007  mhitch branches: 1.44.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.43 04-Mar-2007  christos branches: 1.43.2; 1.43.4; 1.43.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.42 16-Feb-2006  perry branches: 1.42.20;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.41 24-Dec-2005  perry branches: 1.41.2; 1.41.4; 1.41.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40 11-Dec-2005  christos merge ktrace-lwp.
 1.39 07-Aug-2003  agc branches: 1.39.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.38 02-Apr-2003  thorpej branches: 1.38.2;
Use PAGE_SIZE rather than NBPG.
 1.37 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.36 22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.35 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.34 25-Apr-2002  aymeric o replace definitions by declarations in header files
o put definitions where due
o cleanup some types (u_int -> vaddr_t's for example)
o minor other cleanup
 1.33 10-Sep-2001  chris branches: 1.33.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.32 26-May-2001  chs branches: 1.32.2; 1.32.4;
replace vm_page_t with struct vm_page *.
 1.31 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.30 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.29 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.28 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.27 19-Jun-1999  is branches: 1.27.2; 1.27.14;
Sync with Atari pmap: support for the UVM changes
 1.26 25-Feb-1999  is branches: 1.26.4;
Machine independent part of fix for PR 6152 (gdb doesn't work on machines
with UVM and seperate I&D-Cache). Mostly by Michael Hitch, but pass struct
proc * instead of the pmap. Reason: said machine will need a method to do
the syncing operation for "curproc", too; this way more code can be shared.
 1.25 25-Feb-1999  is prepare for gdb fix
 1.24 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.23 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.22 06-Jan-1998  thorpej Garbage-collect pm_stchanged; it's not used by anything.
 1.21 06-Jan-1998  thorpej Garbage-collect use of the PCB's copy of the user segment table pointer.
 1.20 03-Jan-1998  thorpej Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.19 01-Jan-1998  thorpej Change an argument name to PMAP_ACTIVATE() to more accurately describe the
semantics of the argument.
 1.18 01-Jan-1998  thorpej - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
port).
 1.17 10-Jun-1997  veego s/amiga_btop/m68k_btop/
 1.16 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.15 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.14 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 11-May-1995  jtc KERNEL -> _KERNEL
 1.12 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.11 28-Dec-1994  chopps support for recent changes (non-contig mem..)
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.8 25-May-1994  chopps update to work with new m68k frame and recent vm changes.
 1.7 10-Apr-1994  chopps also conform to standard style
 1.6 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.26.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.27.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.27.2.1 23-Apr-2001  bouyer Sync with HEAD.
 1.32.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.32.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.32.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.32.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.33.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.33.4.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.33.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.33.4.2 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.33.4.1 10-Sep-2001  scw file pmap.h was added on branch nathanw_sa on 2001-11-17 21:59:09 +0000
 1.38.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.38.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.38.2.1 03-Aug-2004  skrll Sync with HEAD
 1.39.16.1 03-Sep-2007  yamt sync with head.
 1.41.6.1 22-Apr-2006  simonb Sync with head.
 1.41.4.1 09-Sep-2006  rpaulo sync with head
 1.41.2.1 18-Feb-2006  yamt sync with head.
 1.42.20.1 12-Mar-2007  rmind Sync with HEAD.
 1.43.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.43.4.1 11-Jul-2007  mjf Sync with head.
 1.43.2.1 09-Jun-2007  ad Sync with head.
 1.44.10.1 06-Nov-2007  matt sync with HEAD
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.1 07-Aug-2002  briggs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.202; 1.1.204;
Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:31:54 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-30 00:18:57 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:17:46 +0000
 1.13 13-Jul-2002  scw m68k syscall rototill:

- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
- Add systrace glue.
- Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
(They were all defined exactly the same anyway, other than a couple
of the MDP_* flags.)
 1.12 08-Jun-1997  veego branches: 1.12.36; 1.12.40; 1.12.48;
Use 0x0001 for MDP_STACKADJ. Thanks Klaus.
 1.11 07-Jun-1997  veego GC unused MDP_AST, noticed by Klaus Klein.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.8 10-Apr-1994  chopps also conform to standard style
 1.7 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.6 11-Feb-1994  chopps Add missing Id's
 1.5 26-Jan-1994  mw Updated headers from current amiga branch.
 1.4 31-Oct-1993  mw Define new flag MDP_STACKADJ to back out of a stack adjustment in
syscall() in case of ERESTART.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.12.48.1 16-Jul-2002  gehenna catch up with -current.
 1.12.40.2 01-Aug-2002  nathanw Catch up to -current.
 1.12.40.1 17-Nov-2001  scw SA bits for Amiga.
Compile-tested only.
 1.12.36.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 16-May-1994  chopps just include common m68k version
 1.21 11-Dec-2005  christos merge ktrace-lwp.
 1.20 23-Jan-2005  chs move spl*() and IPL_* definitions from psl.h to intr.h.
 1.19 27-May-2001  is branches: 1.19.8; 1.19.24; 1.19.32;
make the defopted "LEV6_DEFER" work for LKMs, too.
 1.18 08-May-2001  is defopt LEV6_DEFER.
 1.17 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.16 14-Jan-2001  thorpej branches: 1.16.2;
Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.15 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.14 05-Aug-1999  thorpej branches: 1.14.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.13 14-Jun-1998  kleink `interupt' -> `interrupt'
 1.12 11-Apr-1998  is amiga_ttyspl -> amiga_serialspl (and keep ttyspl constant at 4 again).
(Part of this change slipped in with my last machdep commit; thanks to
Matthias Scheler for pointing this out).
 1.11 30-Nov-1996  is Variable spltty a la Jason Thorpe. Needed for the DraCo variant of com.c.
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.14.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.14.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.14.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.16.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.32.1 29-Apr-2005  kent sync with -current
 1.19.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.19.8.2 27-May-2001  is make the defopted "LEV6_DEFER" work for LKMs, too.
 1.19.8.1 27-May-2001  is file psl.h was added on branch nathanw_sa on 2001-05-27 20:22:58 +0000
 1.20 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 05-Jun-2007  mhitch branches: 1.19.10;
Switch amiga to common m68k include files, pcb.h, pmap_motorola.h, and
pte_motrola.h.
 1.18 11-Dec-2005  christos branches: 1.18.30; 1.18.32; 1.18.38;
merge ktrace-lwp.
 1.17 07-Aug-2003  agc branches: 1.17.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.16 02-Apr-2003  thorpej branches: 1.16.2;
Use PAGE_SIZE rather than NBPG.
 1.15 12-Aug-1998  is Get rid of AMIGA_UPTBASE.
Replace it by a variable, which is initialized in amiga_init.c.
This will make the kernel actually work even if we have lots of Zorro-III
(or DraCo direct bus) i/o space.
 1.14 29-Sep-1995  chopps move 040 to hp300 style, use new MI lance ethernet driver
a few minor fixes WRT prototypes.
if_le from Charles rest from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.13 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.12 02-Apr-1995  chopps cleanup SG4_, fix magnum interrupts, gvp hack for ziii, new gvp configs, 4066
4066 interrupt fix, add baudrate gen and don't clear other port lines for mfc
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.11 03-Dec-1994  chopps add typedefs for pte's and ste's.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 08-Jun-1994  chopps put back simple replacement for pte and ste structs to make code work for now.
 1.8 04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.7 04-Jun-1994  chopps fix long standing "bug" with pmap. Basically logic/misunderstanding
error commited when it was ported from hp300 (mach?). All
8M + amigas now gain ~1M of physical ram (4M hack removed).
Some minor cleanup. HAVEVAC code removed as it is for the hp300.
 1.6 01-Jun-1994  chopps bring some good ideas over from hp300 port.
 1.5 08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.4 10-Apr-1994  chopps also conform to standard style
 1.3 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Updated headers from current amiga branch.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.1 03-Sep-2007  yamt sync with head.
 1.18.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.18.32.1 11-Jul-2007  mjf Sync with head.
 1.18.30.1 09-Jun-2007  ad Sync with head.
 1.19.10.1 06-Nov-2007  matt sync with HEAD
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 26-Jan-1994  mw Updated headers from current amiga branch.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 10-Apr-1994  chopps also conform to standard style
 1.9 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.8 27-Jan-1994  cgd HP300 -> MACHINE
 1.7 08-Jan-1994  cgd stubs which pint to m68k include
 1.6 06-Jan-1994  mycroft Still need old #defines for now.
 1.5 06-Jan-1994  mycroft Implement `struct reg'.
 1.4 08-Dec-1993  mycroft Move #define of NIPCREG outside #fidef.
 1.3 02-Sep-1993  mycroft Ditto.
 1.2 22-May-1993  cgd add rcsids to everything and clean up headers
 1.1 13-May-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-May-1993  cgd add hp300 kernel files. generic kernel files might need some help...
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:05:48 +0000
 1.1 20-Dec-1994  cgd make the definition of _JBLEN mach. dep. header-dependent.
 1.6 13-Sep-1998  mycroft Minor change.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 10-Apr-1994  chopps also conform to standard style
 1.3 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.2 26-Jan-1994  mw Updated headers from current amiga branch.
 1.1 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.10 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.9 22-Jan-1999  mycroft Standardize format.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 15-Oct-1994  cgd make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 11-Jul-2005  christos branches: 1.1.6;
Add m68k sunos_machdep.h
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 11-Jul-2005  skrll file sunos_machdep.h was added on branch ktrace-lwp on 2005-11-10 13:55:00 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file sunos_machdep.h was added on branch yamt-lazymbuf on 2006-06-21 14:48:53 +0000
 1.4 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.3 09-Nov-1999  kleink branches: 1.3.40; 1.3.218;
Rip protection against multiple inclusion from wrapper headers.
 1.2 29-Apr-1999  kleink branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10;
Pull in the right generic m68k header. (Where was my mind?)
 1.1 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.2.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.6.1 15-Nov-1999  fvdl Sync with -current
 1.2.4.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.218.1 10-Jun-2019  christos Sync with HEAD
 1.3.40.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8 12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.24 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.23 12-Jun-2011  rmind branches: 1.23.66; 1.23.68;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.22 20-Jan-2008  joerg branches: 1.22.32; 1.22.42;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.21 06-Jan-2008  mhitch Add timecounter support and borrow counter-based delay from i386.
From joerg; testing and final tweaks by me.
 1.20 17-Oct-2007  garbled branches: 1.20.2; 1.20.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 14-Jul-2007  ad branches: 1.19.10;
Generic soft interrupts are mandatory.
 1.18 05-Sep-2006  mhitch branches: 1.18.12; 1.18.20;
Switch amiga to MI todr.
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.8;
merge ktrace-lwp.
 1.16 19-Jan-2005  chs branches: 1.16.8;
amiga no longer abuses cf_unit.
 1.15 06-Aug-2003  bsh branches: 1.15.8;
add __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS to machine/types.h for
following ports:

acorn26, amiga, hpcarm, sparc, sparc64

This was proposed by Martin Husemann at teck-kern@ in May to properly
test whether softintr can be established for all IPL, or only for
IPL_SOFT*. OKed by acorn26, hpcarm and sparc port masters.
 1.14 28-Feb-2002  simonb branches: 1.14.16;
Use "#define<tab>".
 1.13 14-Jan-2001  thorpej branches: 1.13.4; 1.13.8;
Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
 1.12 05-Feb-2000  cgd add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
 1.11 23-Dec-1996  veego branches: 1.11.28;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.10 05-Dec-1996  cgd First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
 1.9 16-Sep-1995  chopps Add minimal dumpfile support.
Fix a bug in pt_enter_ptpage which caused MMU faults on low-mem conditions.
Change siop drivers to better handle sync.
Remove diag. done for ide -- its redundant as the ROM does similar.
fixed ite_filter to not panic if typing before the device is fully setup
All thanks to osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.8 26-Jun-1995  cgd define __BDEVSW_DUMP_OLD_TYPE for ports where it's true. clean up
some m68k ports inclusion of common header.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 10-Apr-1994  chopps also conform to standard style
 1.5 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.11.28.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.11.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.13.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.13.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.14.16.4 24-Jan-2005  skrll Sync with HEAD.
 1.14.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.16.1 03-Aug-2004  skrll Sync with HEAD
 1.15.8.1 29-Apr-2005  kent sync with -current
 1.16.8.3 21-Jan-2008  yamt sync with head
 1.16.8.2 03-Sep-2007  yamt sync with head.
 1.16.8.1 30-Dec-2006  yamt sync with head.
 1.17.8.1 14-Sep-2006  yamt sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.20.1 03-Oct-2007  garbled Sync with HEAD
 1.18.12.1 15-Jul-2007  ad Sync with head.
 1.19.10.3 23-Mar-2008  matt sync with HEAD
 1.19.10.2 09-Jan-2008  matt sync with HEAD
 1.19.10.1 06-Nov-2007  matt sync with HEAD
 1.20.8.2 23-Jan-2008  bouyer Sync with HEAD.
 1.20.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.20.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.22.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.22.32.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.23.68.1 03-Apr-2021  thorpej Sync with HEAD.
 1.23.66.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 15-Oct-1994  cgd make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files.
 1.4 04-Jul-1994  chopps move to new disk minor encoding (parts have lowest 4 bits instead of 3)
remove multiple inclusions protection from varargs.h
 1.3 10-Apr-1994  chopps also conform to standard style
 1.2 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.1 27-Jan-1994  mycroft Pointer to common version.
 1.48 01-Feb-2020  tsutsui Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.
For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.47 27-Mar-2019  christos branches: 1.47.4; 1.47.6;
- expose vmparams to userland on arm, like other archs do.
- remove unneeded includes
 1.46 30-Sep-2015  phx branches: 1.46.18;
Reduce MAXDSIZ from 416MB back to 224MB.
Due to limitations by the current pmap implementation our virtual address
space is limited to 512MB. A MAXDSIZ of 416MB would leave only a little bit
more than 30MB for shared objects and heap allocations, so 224MB seems like
a good compromise.
 1.45 19-Jun-2015  mlelstv remove obsolete comments
 1.44 13-Jun-2015  phx Use all the changes from
http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/vmparam.diff
after a discussion on port-m68k. I tested them on several Amiga models
and they seem to work fine.
This gives us the maximum virtual memory space for a process under the
current 512MB pmap limitation.
Also bump VM_KERNEL_PT_PAGES to allow up to 2 GB RAM.
 1.43 01-Jun-2015  phx Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE.
Bump MAXTSIZ and MAXDSIZ to the same values atari is using.
This makes gcc 4.8 (/usr/libexec/cc1) load and execute.
 1.42 08-Feb-2011  rmind branches: 1.42.14; 1.42.30; 1.42.32;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.41 28-Dec-2010  mhitch branches: 1.41.2; 1.41.4;
Raise address of user stack to the highest safe (for 68040 mmu) address,
which increases available user address space by 256MB. One file in
pkgsrc/lang/php53 was too large for the amiga. Also remove an old
presumably outdated comment.
 1.40 06-Nov-2010  uebayasi Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.39 08-Dec-2009  tsutsui branches: 1.39.2; 1.39.4;
Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
 1.38 26-Aug-2009  thorpej Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
 1.37 06-Mar-2009  joerg Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.36 17-Oct-2007  garbled branches: 1.36.20; 1.36.28; 1.36.30; 1.36.34;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.35 12-May-2007  mhitch branches: 1.35.10;
Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).

- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.

A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.34 11-Dec-2005  christos branches: 1.34.24; 1.34.26; 1.34.30; 1.34.32; 1.34.38; 1.34.40;
merge ktrace-lwp.
 1.33 07-Aug-2003  agc branches: 1.33.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 02-Apr-2003  thorpej branches: 1.32.2;
Use PAGE_SIZE rather than NBPG.
 1.31 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.30 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.29 01-May-2001  thorpej branches: 1.29.2; 1.29.8;
Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.28 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.27 14-Nov-2000  thorpej branches: 1.27.2;
We use 8K pages on the Amiga. Make PAGE_SIZE and friends into
compile-time constants.
 1.26 14-Feb-2000  is enlarge the initial kernel page table - needed for some 128 MB machine
 1.25 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.24 26-Jan-2000  tsutsui Remove obsoleted macros.
 1.23 04-Dec-1999  ragge CL* discarding.
 1.22 25-Sep-1999  is branches: 1.22.2; 1.22.8;
vm_offset_t -> vaddr_t/paddr_t
 1.21 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.20 02-Oct-1998  is branches: 1.20.6; 1.20.8;
Yet another workaround for pmap bugs. Several reports on the port-amiga
list claim this helps with some big-machine situations.
 1.19 10-Jul-1998  mhitch Support two free memory lists; second list will be 16-bit Zorro II memory.
 1.18 22-Mar-1998  is MACHINE_NEW_NONCONTIG for NetBSD/Amiga. The older contiguous and
MACHINE_NONCONTIG stuff isn't supported anymore.
 1.17 11-Sep-1997  chopps branches: 1.17.2;
VM_MAX_ADDRESS is the user max address -- adjust
 1.16 12-Jul-1997  perry branches: 1.16.2;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.15 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.14 21-Apr-1996  veego branches: 1.14.6; 1.14.10;
- Cleanup for -Wall and -Wstrict-prototypes
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 02-Jul-1994  chopps increase SYSPTSIZE to 2 to accommodate zthreebus devices.
 1.11 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 04-Jun-1994  chopps fix long standing "bug" with pmap. Basically logic/misunderstanding
error commited when it was ported from hp300 (mach?). All
8M + amigas now gain ~1M of physical ram (4M hack removed).
Some minor cleanup. HAVEVAC code removed as it is for the hp300.
 1.9 10-Apr-1994  chopps also conform to standard style
 1.8 10-Apr-1994  chopps protect against multiple inclusion (and be consitent)
 1.7 23-Feb-1994  chopps added KUSER_AREA for gdb like things. removed HIGHPAGES
 1.6 17-Feb-1994  chopps amiga now has USRSTACK at 0x0e000000 for further sun compat.
 1.5 11-Feb-1994  chopps Add missing Id's
 1.4 26-Jan-1994  mw Updated headers from current amiga branch.
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.14.10.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.14.6.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.16.2.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.17.2.1 03-Oct-1998  cgd pull up rev 1.20 from trunk (is)
 1.20.8.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.20.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.20.6.1 15-Feb-2000  he Pull up revision 1.26 (requested by is):
Enlarge initial kernel page table. needed to boot some 128 MB
machines.
 1.22.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.22.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.22.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.27.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.29.8.3 11-Dec-2002  thorpej Sync with HEAD.
 1.29.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.29.8.1 01-May-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:22:59 +0000
 1.29.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.33.16.1 03-Sep-2007  yamt sync with head.
 1.34.40.1 04-Jun-2007  wrstuden Update to today's netbsd-4.
 1.34.38.1 22-May-2007  matt Update to HEAD.
 1.34.32.1 11-Jul-2007  mjf Sync with head.
 1.34.30.1 27-May-2007  ad Sync with head.
 1.34.26.1 17-May-2007  yamt sync with head.
 1.34.24.2 16-Jan-2011  bouyer Pull up following revision(s) (requested by mhitch in ticket #1416):
sys/arch/amiga/include/vmparam.h: revision 1.41
Raise address of user stack to the highest safe (for 68040 mmu) address,
which increases available user address space by 256MB. One file in
pkgsrc/lang/php53 was too large for the amiga. Also remove an old
presumably outdated comment.
 1.34.24.1 23-May-2007  riz Pull up following revision(s) (requested by mhitch in ticket #659):
sys/arch/amiga/amiga/amiga_init.c: revision 1.95
sys/arch/amiga/include/vmparam.h: revision 1.35
sys/arch/amiga/amiga/pmap.c: revision 1.123
Final changes to amiga kernel address space layout to match almost all the
other m68k ports (initially from the yamt-km branch a long time ago).
- move Sysmap to the end of address space.
- move Amiga hardware mapping to immediately after Sysptmap.
- tweak virtual_avail/end accordingly.
A DEBUG kernel should now boot without panicing. Also, kernel address space
layout is now compatible with m68k/m68k/pmap_motorola.c.
 1.35.10.1 06-Nov-2007  matt sync with HEAD
 1.36.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.30.1 16-Jan-2011  bouyer Pull up following revision(s) (requested by mhitch in ticket #1518):
sys/arch/amiga/include/vmparam.h: revision 1.41
Raise address of user stack to the highest safe (for 68040 mmu) address,
which increases available user address space by 256MB. One file in
pkgsrc/lang/php53 was too large for the amiga. Also remove an old
presumably outdated comment.
 1.36.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.36.20.3 11-Mar-2010  yamt sync with head
 1.36.20.2 16-Sep-2009  yamt sync with head
 1.36.20.1 04-May-2009  yamt sync with head.
 1.39.4.1 05-Mar-2011  rmind sync with head
 1.39.2.1 26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.41.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.41.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.42.32.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.42.32.2 22-Sep-2015  skrll Sync with HEAD
 1.42.32.1 06-Jun-2015  skrll Sync with HEAD
 1.42.30.3 06-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #989):
sys/arch/amiga/include/vmparam.h: revision 1.46
Reduce MAXDSIZ from 416MB back to 224MB.
Due to limitations by the current pmap implementation our virtual address
space is limited to 512MB. A MAXDSIZ of 416MB would leave only a little bit
more than 30MB for shared objects and heap allocations, so 224MB seems like
a good compromise.
 1.42.30.2 06-Nov-2015  riz Pull up following revision(s) (requested by phx in ticket #986):
sys/arch/amiga/include/vmparam.h: revision 1.44
Use all the changes from
http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/vmparam.diff
after a discussion on port-m68k. I tested them on several Amiga models
and they seem to work fine.
This gives us the maximum virtual memory space for a process under the
current 512MB pmap limitation.
Also bump VM_KERNEL_PT_PAGES to allow up to 2 GB RAM.
 1.42.30.1 29-Jun-2015  snj Pull up following revision(s) (requested by phx in ticket #841):
sys/arch/amiga/include/vmparam.h: revision 1.43
Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE.
Bump MAXTSIZ and MAXDSIZ to the same values atari is using.
This makes gcc 4.8 (/usr/libexec/cc1) load and execute.
 1.42.14.1 03-Dec-2017  jdolecek update from HEAD
 1.46.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.46.18.1 10-Jun-2019  christos Sync with HEAD
 1.47.6.1 29-Feb-2020  ad Sync with head.
 1.47.4.1 10-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #682):

sys/arch/next68k/include/vmparam.h: revision 1.27
sys/arch/mac68k/include/vmparam.h: revision 1.46
sys/arch/sun3/include/vmparam.h: revision 1.38
sys/arch/m68k/include/vmparam.h: revision 1.1
sys/arch/hp300/include/vmparam.h: revision 1.41
sys/arch/m68k/include/Makefile: revision 1.32
sys/arch/amiga/include/vmparam.h: revision 1.48
distrib/sets/lists/comp/ad.m68k: revision 1.63
sys/arch/x68k/include/vmparam.h: revision 1.40
sys/arch/mvme68k/include/vmparam.h: revision 1.38
sys/arch/luna68k/include/vmparam.h: revision 1.23
sys/arch/news68k/include/vmparam.h: revision 1.23
sys/arch/atari/include/vmparam.h: revision 1.34
sys/arch/cesfic/include/vmparam.h: revision 1.19

Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.

For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:32:09 +0000
 1.7 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.6 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.5 24-Apr-2021  thorpej branches: 1.5.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.4 17-Jun-2020  thorpej branches: 1.4.4;
<sys/extent.h> not needed here.
 1.3 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.2 27-Oct-2012  chs branches: 1.2.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 11-Jan-2012  rkujawa branches: 1.1.4; 1.1.6; 1.1.10;
Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 11-Jan-2012  yamt file cv3dpb.c was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 11-Jan-2012  mrg file cv3dpb.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:18 +0000
 1.2.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.5.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 11-Jan-2012  rkujawa branches: 1.1.4; 1.1.6;
Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 11-Jan-2012  yamt file cv3dpbreg.h was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 11-Jan-2012  mrg file cv3dpbreg.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:19 +0000
 1.1 11-Jan-2012  rkujawa branches: 1.1.4; 1.1.6;
Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 11-Jan-2012  yamt file cv3dpbvar.h was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 11-Jan-2012  mrg file cv3dpbvar.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:19 +0000
 1.9 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 07-Jul-2020  thorpej branches: 1.6.4;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.5 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.4 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.3 22-Mar-2014  christos branches: 1.3.4; 1.3.8;
kill sprintf
fix unused variables
 1.2 29-Jan-2013  rkujawa branches: 1.2.2; 1.2.4;
Support PCI_NETBSD_CONFIGURE for em4k. Mediator 4000 now works completely (minus
obvious lack of DMA).
 1.1 29-Jan-2013  rkujawa Add Mediator 4000 driver - em4k(4). Working, but PCI_NETBSD_CONFIGURE not
implemented yet. While here add some untested Mediator ZIV support to empb(4).
 1.2.4.4 03-Dec-2017  jdolecek update from HEAD
 1.2.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 25-Feb-2013  tls resync with head
 1.2.4.1 29-Jan-2013  tls file em4k.c was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.2.2.1 18-May-2014  rmind sync with head
 1.3.8.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1 22-Mar-2014  yamt file em4k.c was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.6.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.7.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 29-Jan-2013  rkujawa branches: 1.1.4; 1.1.14;
Add Mediator 4000 driver - em4k(4). Working, but PCI_NETBSD_CONFIGURE not
implemented yet. While here add some untested Mediator ZIV support to empb(4).
 1.1.14.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.14.1 29-Jan-2013  yamt file em4kvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.1.4.2 25-Feb-2013  tls resync with head
 1.1.4.1 29-Jan-2013  tls file em4kvar.h was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.6 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.5 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.4 29-Jan-2013  rkujawa Add Mediator 4000 driver - em4k(4). Working, but PCI_NETBSD_CONFIGURE not
implemented yet. While here add some untested Mediator ZIV support to empb(4).
 1.3 27-Oct-2012  chs branches: 1.3.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 31-May-2012  rkujawa branches: 1.2.2; 1.2.4;
Add empb(4) functions to switch memory window position.
 1.1 30-May-2012  rkujawa Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
 1.2.4.2 25-Feb-2013  tls resync with head
 1.2.4.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.2.2 02-Jun-2012  mrg sync to latest -current.
 1.2.2.1 31-May-2012  mrg file emmem.c was added on branch jmcneill-usbmp on 2012-06-02 11:08:51 +0000
 1.3.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 27-Oct-2012  yamt file emmem.c was added on branch yamt-pagecache on 2012-10-30 17:18:51 +0000
 1.1 30-May-2012  rkujawa branches: 1.1.2; 1.1.6;
Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 30-May-2012  yamt file emmemvar.h was added on branch yamt-pagecache on 2012-10-30 17:18:51 +0000
 1.1.2.2 02-Jun-2012  mrg sync to latest -current.
 1.1.2.1 30-May-2012  mrg file emmemvar.h was added on branch jmcneill-usbmp on 2012-06-02 11:08:51 +0000
 1.16 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.15 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.14 24-Apr-2021  thorpej branches: 1.14.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.13 07-Jul-2020  thorpej branches: 1.13.4;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.12 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.11 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.10 29-Jan-2013  rkujawa branches: 1.10.14;
Add Mediator 4000 driver - em4k(4). Working, but PCI_NETBSD_CONFIGURE not
implemented yet. While here add some untested Mediator ZIV support to empb(4).
 1.9 28-Jan-2013  rkujawa Add support for power management on Mediator 1200 SX and TX models. Allows
software power-off. Feels so modern.
 1.8 27-Oct-2012  chs branches: 1.8.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.7 27-Jun-2012  rkujawa branches: 1.7.2;
Fix Mediator 1200 memory space support. Now it's good enough to drive a Voodoo 3.
 1.6 04-Jun-2012  rkujawa Finally add support for memory space access for empb(4). Buggy but better than nothing.
 1.5 04-Jun-2012  rkujawa Fix PCI interrupt handling on empb. Also, continue work on memory accesses. Now empb is good enough to handle satalink!
 1.4 01-Jun-2012  rkujawa branches: 1.4.2;
Add support for PCI_NETBSD_CONFIGURE in empb(4). Continue work on memory window.
 1.3 01-Jun-2012  rkujawa More work on PCI memory accesses on empb(4).
 1.2 31-May-2012  rkujawa Add empb(4) functions to switch memory window position.
 1.1 30-May-2012  rkujawa Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
 1.4.2.2 02-Jun-2012  mrg sync to latest -current.
 1.4.2.1 01-Jun-2012  mrg file empb.c was added on branch jmcneill-usbmp on 2012-06-02 11:08:51 +0000
 1.7.2.3 03-Dec-2017  jdolecek update from HEAD
 1.7.2.2 25-Feb-2013  tls resync with head
 1.7.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.2 30-Oct-2012  yamt sync with head
 1.8.2.1 27-Oct-2012  yamt file empb.c was added on branch yamt-pagecache on 2012-10-30 17:18:52 +0000
 1.10.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.13.4.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.14.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.5 27-Jun-2012  rkujawa branches: 1.5.4;
Fix Mediator 1200 memory space support. Now it's good enough to drive a Voodoo 3.
 1.4 04-Jun-2012  rkujawa Finally add support for memory space access for empb(4). Buggy but better than nothing.
 1.3 04-Jun-2012  rkujawa Fix PCI interrupt handling on empb. Also, continue work on memory accesses. Now empb is good enough to handle satalink!
 1.2 01-Jun-2012  rkujawa branches: 1.2.2;
Add support for PCI_NETBSD_CONFIGURE in empb(4). Continue work on memory window.
 1.1 01-Jun-2012  rkujawa More work on PCI memory accesses on empb(4).
 1.2.2.2 02-Jun-2012  mrg sync to latest -current.
 1.2.2.1 01-Jun-2012  mrg file empb_bsm.c was added on branch jmcneill-usbmp on 2012-06-02 11:08:52 +0000
 1.5.4.2 30-Oct-2012  yamt sync with head
 1.5.4.1 27-Jun-2012  yamt file empb_bsm.c was added on branch yamt-pagecache on 2012-10-30 17:18:52 +0000
 1.7 07-Jul-2020  thorpej Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.6 29-Jan-2013  rkujawa Add Mediator 4000 driver - em4k(4). Working, but PCI_NETBSD_CONFIGURE not
implemented yet. While here add some untested Mediator ZIV support to empb(4).
 1.5 28-Jan-2013  rkujawa Add support for power management on Mediator 1200 SX and TX models. Allows
software power-off. Feels so modern.
 1.4 04-Jun-2012  rkujawa branches: 1.4.2; 1.4.4;
Fix PCI interrupt handling on empb. Also, continue work on memory accesses. Now empb is good enough to handle satalink!
 1.3 01-Jun-2012  rkujawa branches: 1.3.2;
Add support for PCI_NETBSD_CONFIGURE in empb(4). Continue work on memory window.
 1.2 31-May-2012  rkujawa Add empb(4) functions to switch memory window position.
 1.1 30-May-2012  rkujawa Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
 1.3.2.2 02-Jun-2012  mrg sync to latest -current.
 1.3.2.1 01-Jun-2012  mrg file empbreg.h was added on branch jmcneill-usbmp on 2012-06-02 11:08:52 +0000
 1.4.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.4.2 30-Oct-2012  yamt sync with head
 1.4.4.1 04-Jun-2012  yamt file empbreg.h was added on branch yamt-pagecache on 2012-10-30 17:18:52 +0000
 1.4.2.1 25-Feb-2013  tls resync with head
 1.3 28-Jan-2013  rkujawa Add support for power management on Mediator 1200 SX and TX models. Allows
software power-off. Feels so modern.
 1.2 04-Jun-2012  rkujawa branches: 1.2.2; 1.2.4;
Fix PCI interrupt handling on empb. Also, continue work on memory accesses. Now empb is good enough to handle satalink!
 1.1 01-Jun-2012  rkujawa branches: 1.1.2;
More work on PCI memory accesses on empb(4).
 1.1.2.2 02-Jun-2012  mrg sync to latest -current.
 1.1.2.1 01-Jun-2012  mrg file empbvar.h was added on branch jmcneill-usbmp on 2012-06-02 11:08:52 +0000
 1.2.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 04-Jun-2012  yamt file empbvar.h was added on branch yamt-pagecache on 2012-10-30 17:18:52 +0000
 1.2.2.1 25-Feb-2013  tls resync with head
 1.1 28-Jan-2013  rkujawa branches: 1.1.4; 1.1.14;
Add support for power management on Mediator 1200 SX and TX models. Allows
software power-off. Feels so modern.
 1.1.14.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.14.1 28-Jan-2013  yamt file empm.c was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.1.4.2 25-Feb-2013  tls resync with head
 1.1.4.1 28-Jan-2013  tls file empm.c was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.1 28-Jan-2013  rkujawa branches: 1.1.4; 1.1.14;
Add support for power management on Mediator 1200 SX and TX models. Allows
software power-off. Feels so modern.
 1.1.14.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.14.1 28-Jan-2013  yamt file empmvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:29 +0000
 1.1.4.2 25-Feb-2013  tls resync with head
 1.1.4.1 28-Jan-2013  tls file empmvar.h was added on branch tls-maxphys on 2013-02-25 00:28:22 +0000
 1.13 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.12 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.11 24-Apr-2021  thorpej branches: 1.11.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.10 07-Jul-2020  thorpej branches: 1.10.4;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.9 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.8 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.7 27-Oct-2012  chs branches: 1.7.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 29-Jan-2012  para branches: 1.6.6;
adapt to extent(9) changes
 1.5 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.4 13-Jan-2012  rkujawa Make it actually build without PCI_NETBSD_CONFIGURE too.
 1.3 13-Jan-2012  rkujawa Make it build without PCI_NETBSD_CONFIGURE too.
 1.2 19-Sep-2011  rkujawa branches: 1.2.2; 1.2.6;
Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.1 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.2.6.1 18-Feb-2012  mrg merge to -current.
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.6.6.2 03-Dec-2017  jdolecek update from HEAD
 1.6.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.11.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.1 17-Sep-2011  rkujawa Add driver for Prometheus PCI bridge.
Change approved by phx.
 1.5 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.4 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.3 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 19-Jan-2012  rkujawa branches: 1.2.4; 1.2.6; 1.2.10;
Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.1 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.2.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.6.3 30-Oct-2012  yamt sync with head
 1.2.6.2 17-Apr-2012  yamt sync with head
 1.2.6.1 19-Jan-2012  yamt file p5membar.c was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.2.4.2 18-Feb-2012  mrg merge to -current.
 1.2.4.1 19-Jan-2012  mrg file p5membar.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:19 +0000
 1.1 10-Jan-2012  rkujawa branches: 1.1.4; 1.1.6;
Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 10-Jan-2012  yamt file p5membarvar.h was added on branch yamt-pagecache on 2012-04-17 00:06:02 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 10-Jan-2012  mrg file p5membarvar.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:19 +0000
 1.21 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.20 26-Aug-2023  andvar amiga/p5pb(4): move parent_dict definition/assignment to #if NGENFB > 0 block,
where it is only used in P5PB_CONSOLE code.

fixes P5PB_CONSOLE enabled build, no functional changes intended.
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 07-Jul-2020  thorpej branches: 1.17.4;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.16 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.15 30-Oct-2015  phx Include genfb.h for NGENFB.
 1.14 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.13 22-Mar-2014  christos branches: 1.13.6;
kill sprintf
fix unused variables
 1.12 27-Oct-2012  chs branches: 1.12.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.11 13-Jul-2012  rkujawa branches: 1.11.2;
Clean up p5pb console glue a bit.
 1.10 11-Jul-2012  rkujawa Fix incomplete bus_dma tag.
 1.9 11-Jul-2012  rkujawa Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.
 1.8 29-Jan-2012  para adapt to extent(9) changes
 1.7 24-Jan-2012  rkujawa Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
 1.6 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.5 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.4 07-Oct-2011  rkujawa branches: 1.4.2; 1.4.6;
P5PB_MATCH_CV643D is supposed to be disabled by default
 1.3 07-Oct-2011  rkujawa Added experimental support for CV64/3D PCI bridge to p5pb(4). Approved by phx.
 1.2 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.1 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.2.2 30-Oct-2012  yamt sync with head
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.11.2.3 03-Dec-2017  jdolecek update from HEAD
 1.11.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.2.1 18-May-2014  rmind sync with head
 1.13.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.17.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.18.8.1 03-Aug-2021  thorpej Adapt to CFARGS().
 1.7 11-Jul-2012  rkujawa Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.
 1.6 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.5 11-Jan-2012  rkujawa Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb.
 1.4 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.3 07-Oct-2011  rkujawa branches: 1.3.2; 1.3.6;
Added experimental support for CV64/3D PCI bridge to p5pb(4). Approved by phx.
 1.2 19-Sep-2011  rkujawa Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.1 04-Aug-2011  rkujawa Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
 1.3.6.1 18-Feb-2012  mrg merge to -current.
 1.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.4 13-Jul-2012  rkujawa Clean up p5pb console glue a bit.
 1.3 19-Jan-2012  rkujawa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
 1.2 10-Jan-2012  rkujawa Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
 1.1 07-Oct-2011  rkujawa branches: 1.1.2; 1.1.6;
Added experimental support for CV64/3D PCI bridge to p5pb(4). Approved by phx.
 1.1.6.1 18-Feb-2012  mrg merge to -current.
 1.1.2.2 30-Oct-2012  yamt sync with head
 1.1.2.1 17-Apr-2012  yamt sync with head
 1.5 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.4 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.3 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.2 22-Mar-2014  christos kill sprintf
fix unused variables
 1.1 19-Sep-2011  rkujawa branches: 1.1.2; 1.1.12; 1.1.16;
Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
 1.1.16.1 18-May-2014  rmind sync with head
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 16-Jun-2004  mhitch AmigaDOS installation tools moving to distrib/amiga/stand.
 1.5 01-Jun-2004  mhitch Add AmigaDOS tools for the amiga, which end up in the "installation/misc"
directory of the release tree.
 1.4 19-May-1997  is branches: 1.4.56;
Yet another try to sanitize the bootblock build. Each major target has now
its own subdirectory.
Smaller changes involved:
- installboot installs to /usr/mdec
- installboot.8 installs to /usr/share/man/cat8/amiga/
 1.3 30-Nov-1996  is Add the bootblock code to list of things made here.
 1.2 30-Nov-1996  is Get it into the main branch... it was added only to netbsd-1-2 by mistake.
 1.1 08-Jun-1996  is branches: 1.1.2;
file Makefile was initially added on branch netbsd-1-2.
 1.1.2.1 08-Jun-1996  is Really install binpatch and loadkmap.
 1.4.56.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.56.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.56.1 03-Aug-2004  skrll Sync with HEAD
 1.9 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.8 13-Feb-1999  lukem branches: 1.8.22; 1.8.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.7 22-Jun-1997  mrg move man pages into share/man.
 1.6 27-Sep-1996  chopps make work with DESTDIR
 1.5 27-Jul-1996  is Add $(DESTDIR).
 1.4 22-Dec-1994  cgd branches: 1.4.6;
specify man pages the new way.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 03-Feb-1994  chopps added makefile and first attempt at documentation.
 1.4.6.1 31-Jul-1996  jtc Pulled up from rev 1.5 by request from Ignatios
 1.8.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.8.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 26-Jan-1994  mycroft Clean up deleted files.
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4 22-Jun-1997  mrg move man pages into share/man.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 03-Feb-1994  chopps fixed small error.
 1.1 03-Feb-1994  chopps added makefile and first attempt at documentation.
 1.16 18-Aug-2025  andvar Fix various typos, mainly in comments:
s/invaid/invalid/
s/instad/instead/
s/wich/with/
s/tranform/transform/
s/tranmist/transmit/
s/tranceiver/transceiver/
s/Tranparent/Transparent/
s/tranlated/translated/
s/tranfer/transfer/
s/tranmissions/transmissions/
s/condtions/conditions/
s/Recient/Recent/
 1.15 30-May-2016  dholland further whitespace
 1.14 30-May-2016  dholland KNF
 1.13 30-May-2016  dholland Reindent.
 1.12 30-May-2016  dholland PR 51185 David Binderman: simplify redundant conditional
 1.11 27-Jun-2006  tsutsui branches: 1.11.106; 1.11.126;
volatile void func(decl) -> void func(decl) __attribute__((__noreturn__))
to appease gcc4.
 1.10 10-Dec-2002  thorpej branches: 1.10.22; 1.10.36; 1.10.40; 1.10.48;
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.9 31-May-2002  thorpej Don't use multi-line string literal.
 1.8 26-Jan-2002  aymeric branches: 1.8.8;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.7 01-Nov-1997  lukem branches: 1.7.28; 1.7.32;
getopt returns -1 not EOF
 1.6 18-Aug-1995  chopps SCSI disconnects: siop from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
and sbic from "Eduardo E. Horvath eeh@btr.com" <eeh@btr.btr.com>

Other cleanup (remove cpu040) and enabling IVS A500 support
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.5 04-Jul-1995  chopps misc cleanup, better tty alloc for mfc. from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 11-Feb-1994  chopps Add missing Id's
 1.2 26-Jan-1994  mw Updated from current amiga branch.
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.7.32.3 11-Dec-2002  thorpej Sync with HEAD.
 1.7.32.2 20-Jun-2002  nathanw Catch up to -current.
 1.7.32.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.28.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.28.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.8.1 09-Jul-2002  gehenna catch up with -current.
 1.10.48.1 13-Jul-2006  gdamore Merge from HEAD.
 1.10.40.1 11-Aug-2006  yamt sync with head
 1.10.36.1 09-Sep-2006  rpaulo sync with head
 1.10.22.1 30-Dec-2006  yamt sync with head.
 1.11.126.1 09-Jul-2016  skrll Sync with HEAD
 1.11.106.1 03-Dec-2017  jdolecek update from HEAD
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 26-Jan-1994  mycroft Clean up deleted files.
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 26-Jan-1994  mycroft Clean up deleted files.
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.6 06-May-2021  rin Unhook elf2bb and txlt as they are built as tools.
 1.5 25-Feb-2021  rin branches: 1.5.4;
Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.4 06-Jul-2010  mrg branches: 1.4.72;
remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 15-Jan-2003  mhitch branches: 1.3.108; 1.3.128; 1.3.130;
Switch to MI installboot.
 1.2 17-Dec-2001  mhitch Changes for building two stage loader, and add support for ELF object
format.
 1.1 19-May-1997  is branches: 1.1.36; 1.1.40;
Yet another try to sanitize the bootblock build. Each major target has now
its own subdirectory.
Smaller changes involved:
- installboot installs to /usr/mdec
- installboot.8 installs to /usr/share/man/cat8/amiga/
 1.1.40.2 15-Jan-2003  thorpej Sync with HEAD.
 1.1.40.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.36.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.130.1 05-Mar-2011  rmind sync with head
 1.3.128.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.108.1 11-Aug-2010  yamt sync with head.
 1.4.72.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.4.1 13-May-2021  thorpej Sync with HEAD.
 1.9 17-Sep-2016  christos kill ssp
 1.8 17-Sep-2016  christos NOPIE
 1.7 06-Jul-2010  mrg branches: 1.7.18; 1.7.36; 1.7.40;
remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.6 11-Dec-2005  christos branches: 1.6.78; 1.6.98; 1.6.100;
merge ktrace-lwp.
 1.5 28-Nov-2004  jmc Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts
 1.4 26-Oct-2003  lukem branches: 1.4.4;
use ${PRINTOBJDIR}
 1.3 29-Jan-2002  aymeric branches: 1.3.2; 1.3.4; 1.3.20;
remove BINDIR definition
 1.2 26-Jan-2002  aymeric Now that this file is not included when it should not, use the print-objdir
target instead of guessing (wrongly with the new toolchain) object directories.

This allows cross-building of bootblocks with the new toolchain.
 1.1 26-Jan-2002  aymeric This is a copy of Makefile.inc
Makefile.inc is going to disappear because we don't want txlt, aout2bb and
elf2bb directories to include this stuff; it is only required by bootblocks.
 1.3.20.4 29-Nov-2004  skrll Sync with HEAD.
 1.3.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.20.1 03-Aug-2004  skrll Sync with HEAD
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 29-Jan-2002  nathanw file Makefile.booters was added on branch nathanw_sa on 2002-02-28 04:07:05 +0000
 1.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 29-Jan-2002  jdolecek file Makefile.booters was added on branch kqueue on 2002-02-11 20:07:09 +0000
 1.4.4.1 06-Apr-2005  he Pull up revision 1.5 (requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.6.100.1 05-Mar-2011  rmind sync with head
 1.6.98.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.6.78.1 11-Aug-2010  yamt sync with head.
 1.7.40.1 04-Nov-2016  pgoyette Sync with HEAD
 1.7.36.1 05-Oct-2016  skrll Sync with HEAD
 1.7.18.1 03-Dec-2017  jdolecek update from HEAD
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 28-Nov-2004  jmc branches: 1.5.12;
Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts
 1.4 26-Jan-2002  aymeric branches: 1.4.14;
Remove this file so it doesn't get included inadvertently
 1.3 17-Dec-2001  mhitch Select relocatable to bootblock conversion program based on which object
format is being used.
 1.2 30-Aug-2000  jhawk branches: 1.2.4; 1.2.8;
Use
${MAKE}
instead of
make
 1.1 19-May-1997  is branches: 1.1.22;
Yet another try to sanitize the bootblock build. Each major target has now
its own subdirectory.
Smaller changes involved:
- installboot installs to /usr/mdec
- installboot.8 installs to /usr/share/man/cat8/amiga/
 1.1.22.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.14.1 29-Nov-2004  skrll Sync with HEAD.
 1.5.12.1 06-Apr-2005  he Pull up revision 1.1 (new, requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.63 08-Jun-2024  mlelstv Enable and use debug printfs to get some output into the build log.
 1.62 29-Apr-2022  rin Enable SA_HARDCODED_SECSIZE to shrink loaders slightly.
 1.61 29-Apr-2022  rin Now, cread.c can be built with -Os.

It was not a compiler bug actually; object code generated with
"-Os -Wa,-l" contains R_68K_16, which is not supported by elf2bb(1).

We should have fixed elf2bb(1), but the problem is gone at the moment.
 1.60 29-Apr-2022  rin Compile boot.amiga without -l option for gas(1).

Fix build failure due to relocation overflows for R_68K_PC16.
 1.59 27-Apr-2022  rin Revert previous.

On 2022/04/27 21:10, Rin Okuyama wrote:
> Module Name: src
> Committed By: rin
> Date: Wed Apr 27 12:10:47 UTC 2022
>
> Modified Files:
> src/sys/arch/amiga/stand/bootblock/boot: Makefile
>
> Log Message:
> Sprinkle SA_HARDCODED_SECSIZE; now everything fits into
> +/-32KB range visible for PC relative addressing mode.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.57 -r1.58 src/sys/arch/amiga/stand/bootblock/boot/Makefile
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
 1.58 27-Apr-2022  rin Sprinkle SA_HARDCODED_SECSIZE; now everything fits into
+/-32KB range visible for PC relative addressing mode.
 1.57 25-Feb-2021  rin Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.56 09-Apr-2017  christos branches: 1.56.26;
make this work again.
 1.55 08-Apr-2017  christos centralize vers.c building for standalone programs.
 1.54 17-Sep-2016  christos branches: 1.54.2;
NOPIE
 1.53 15-Jan-2016  mlelstv branches: 1.53.2;
Add 'C' option to bootblock to enable serial console.
 1.52 19-Apr-2014  tsutsui branches: 1.52.4;
No need to use annoying HAVE_GCC to handle gcc48 m68k behavior chnages.
 1.51 19-Apr-2014  christos unbreak gcc4.5
 1.50 29-Mar-2014  mlelstv branches: 1.50.2;
Use different option (-mcpu=68030) to select target cpu for the assembler.
The old option (-m68030) causes it to complain about features used that
are not provided by the target cpu.
 1.49 21-Aug-2013  matt Use <bsd.klinks.mk>
Use ${_MKTARGET_*}
Use correct arguments to ${AR}
Fix entry symbol.
 1.48 18-Jul-2013  joerg Explicitly disable unwind tables for the boot loader.
 1.47 04-Oct-2011  chs branches: 1.47.2; 1.47.12; 1.47.16; 1.47.24;
build cread.c with -O1 to work around a gcc 4.5 bug.
 1.46 12-Jul-2011  mrg fix previous and only force the failure if reloc2bb already failed.
 1.45 11-Jul-2011  mrg improve the error message if elf2bb finds we are too large. if elf2bb
fails, make sure that the following nm -u's success doesn't cause make
to believe the target was built. now amiga builds with HAVE_GCC=45
actually fail here, rather than fail at sets time due to missing files.
 1.44 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.43 06-Jul-2010  mrg branches: 1.43.2; 1.43.4;
use elf2bb / elf2bb.h instead of the old, now gone aout2bb version.
 1.42 14-Mar-2010  mrg branches: 1.42.2;
update all of these makefiles for the .so -> .pico change.

most of them are most harmless, but the libgcc parts are quite essential.
before this change, all the special rules for .pico files were not applied,
and exception handling wasn't enabled. this caused c++ exceptions not to
work on sparc64.


this fixes the build of boost-headers (it was correctly calling exception
support broken!), which in turn makes all the things that depend upon it
to actually work again on sparc64.
 1.41 29-Dec-2009  elad branches: 1.41.2;
Don't abuse INSECURE for allowing exec() to load files not owned by uid 0.

Adjust references where this has been used.
 1.40 17-Oct-2009  mlelstv Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
 1.39 12-Jan-2009  tsutsui - WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- add src/common/dist/zlib to INCPATH and remove unnecessary options
- remove -I${DESTDIR}/usr/include from INCPATH
 1.38 25-Jan-2006  is branches: 1.38.72; 1.38.76; 1.38.84;
Compile new zlib; compile it in a way that it doesn't inflate the bootblock
by 50% with tables. While we're here: use our own memmove().
 1.37 24-Jan-2006  is Use our own s(n)printf.
 1.36 02-Jan-2006  is Make the bootblocks compile again using the shared libc functions.
 1.35 11-Dec-2005  christos branches: 1.35.2;
merge ktrace-lwp.
 1.34 26-Oct-2003  lukem branches: 1.34.16;
Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.33 25-Oct-2003  mhitch Use -Os to shrink bootblock code a little more. Now bootxx_fd builds with
gcc 3.3.2.
 1.32 24-Aug-2003  he Adapt to new ufs.c needing memcmp and memmove.
 1.31 01-Apr-2003  he branches: 1.31.2;
The adler32.c file previously from libz is no longer needed.
 1.30 03-Feb-2003  mhitch Add 64 bit div/mod for 64 bit daddr_t changes and snprintf.
 1.29 31-May-2002  thorpej Add -ffreestanding.
 1.28 15-Apr-2002  mhitch branches: 1.28.2;
Don't copy boot.amiga to ${DESTDIR}/ - it is now done by the install/update
script, sysinst, or manually when the bootblock is installed.
 1.27 26-Mar-2002  mhitch Need to include files.o for the file descriptor table used by open().

The -S flag to indicate secondary boot no longer takes a size - size is
computed from input image.
 1.26 26-Jan-2002  aymeric include ${.CURDIR}/../Makefile.booters
 1.25 26-Jan-2002  aymeric s/BOOT_ELF/BOOT_ELF32/ inside a comment
 1.24 17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.23 10-Dec-2001  mhitch Add a left shift routine needed by changes in lib/libsa/ufs.c.
 1.22 02-Mar-2001  mhitch branches: 1.22.4; 1.22.8;
Use ${NM} and ${SIZE} so cross-compiling works. The machine and m68k include
directories still need to be fixed.
 1.21 17-Sep-2000  is Make this build again. Fixes by Michael Hitch.
 1.20 15-Apr-2000  is branches: 1.20.4;
Don't use runtime systems' includes.
 1.19 03-Apr-1999  is branches: 1.19.2;
make the Amiga bootblocks link again.
 1.18 03-Mar-1999  tron branches: 1.18.2;
Include "bsd.prog.mk" earlier so that "CFLAGS" doesn't get clobbered.
 1.17 06-Feb-1999  is Define _STANDALONE instead of STANDALONE.
 1.16 03-Jan-1999  veego Enable fdboot again.
 1.15 13-Nov-1998  is Simplify program structure to save a few bytes.
 1.14 08-May-1998  chopps remove -Z (load from chipmem) flag
fix copier code (startit) to work bi-directionally.
change compiler optimization options to save some bytes
 1.13 14-Jul-1997  veego s/BOOTBLOCKS/FILES/, remove the no longer needed install: rule and set the
BINDIR to /usr/mdec.
 1.12 23-Jun-1997  is fdboot is too big again. leave it out.
 1.11 19-May-1997  veego Make the install rule nicer.
 1.10 19-May-1997  is Yet another try to sanitize the bootblock build. Each major target has now
its own subdirectory.
Smaller changes involved:
- installboot installs to /usr/mdec
- installboot.8 installs to /usr/share/man/cat8/amiga/
 1.9 14-May-1997  veego Remove a : which is too much. fix pr#3621
 1.8 07-May-1997  mycroft Clean up weirdness.
 1.7 24-Apr-1997  veego remove a duplicated : for the install rule.
 1.6 24-Apr-1997  is - Minor brushup of man page.
- Try to fix manual installation.
 1.5 24-Mar-1997  mycroft Build fdboot.
 1.4 05-Feb-1997  is The last few libsa/open.c changes gradually increased code size, until fdboot
became too big. Disable its building, til we can squeeze a couple of bytes
out of the code again.
XXX Yes, this is a disgusting hack.
 1.3 23-Jan-1997  is Added libboot.a to the CLEANFILES.
 1.2 21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.18.2.1 03-Apr-1999  is branches: 1.18.2.1.2;
From -current: add errno.c (to define the errno variable). This makes
the bootblocks link again.
 1.18.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.19.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.19.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.20.4.2 09-Feb-2002  he Pull up revision 1.23 (requested by mhitch):
Add a left-shift routine needed by lib/libsa/ufs.c due to changes
in fs.h.
 1.20.4.1 19-Sep-2000  is Pullup from -current, requested by is, granted by thorpej:
Changes by mhitch, needed for those directories to compile.
 1.22.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.22.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.22.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.22.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.22.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.22.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.22.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.22.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.28.2.1 09-Jul-2002  gehenna catch up with -current.
 1.31.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1 03-Aug-2004  skrll Sync with HEAD
 1.34.16.1 21-Jun-2006  yamt sync with head.
 1.35.2.2 01-Feb-2006  yamt sync with head.
 1.35.2.1 15-Jan-2006  yamt sync with head.
 1.38.84.1 19-Jan-2009  skrll Sync with HEAD.
 1.38.76.3 11-Aug-2010  yamt sync with head.
 1.38.76.2 11-Mar-2010  yamt sync with head
 1.38.76.1 04-May-2009  yamt sync with head.
 1.38.72.1 17-Jan-2009  mjf Sync with HEAD.
 1.41.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.41.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.42.2.1 05-Mar-2011  rmind sync with head
 1.43.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.43.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.47.24.1 23-Jul-2013  riastradh sync with HEAD
 1.47.16.2 18-May-2014  rmind sync with head
 1.47.16.1 28-Aug-2013  rmind sync with head
 1.47.12.2 03-Dec-2017  jdolecek update from HEAD
 1.47.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.47.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.50.2.1 10-Aug-2014  tls Rebase.
 1.52.4.3 28-Aug-2017  skrll Sync with HEAD
 1.52.4.2 05-Oct-2016  skrll Sync with HEAD
 1.52.4.1 19-Mar-2016  skrll Sync with HEAD
 1.53.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.53.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.54.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.56.26.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.9 31-Jan-2006  is branches: 1.9.72; 1.9.74; 1.9.76;
Implement dealloc() - and implement alloc() in a way that it matches it.
 1.8 11-Mar-2001  mhitch branches: 1.8.8; 1.8.40; 1.8.52;
ELF ABI requires address to be returned in A0.
 1.7 02-Mar-2001  mhitch branches: 1.7.2;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.6 01-Mar-2001  is Add register prefixes.
 1.5 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.4 16-Feb-1999  is branches: 1.4.8;
Fix Copyright dates
 1.3 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.2 11-Nov-1998  is Correct the calls (use AllocVec() and FreeVec()),
in case somebody ever needs free().
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.4.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.7.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.8.52.1 01-Feb-2006  yamt sync with head.
 1.8.40.1 21-Jun-2006  yamt sync with head.
 1.8.8.2 11-Mar-2001  mhitch ELF ABI requires address to be returned in A0.
 1.8.8.1 11-Mar-2001  mhitch file alloc.s was added on branch nathanw_sa on 2001-03-11 20:10:05 +0000
 1.9.76.1 16-May-2008  yamt sync with head.
 1.9.74.1 18-May-2008  yamt sync with head.
 1.9.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 31-Aug-2001  simonb branches: 1.4.6; 1.4.124; 1.4.126; 1.4.128;
Use comments around the token after a #endif.
 1.3 16-Feb-1999  is branches: 1.3.22;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.128.1 16-May-2008  yamt sync with head.
 1.4.126.1 18-May-2008  yamt sync with head.
 1.4.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.6.2 31-Aug-2001  simonb Use comments around the token after a #endif.
 1.4.6.1 31-Aug-2001  simonb file amigagraph.h was added on branch nathanw_sa on 2001-08-31 04:44:59 +0000
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 16-Feb-1999  is branches: 1.3.144; 1.3.146; 1.3.148;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.148.1 16-May-2008  yamt sync with head.
 1.3.146.1 18-May-2008  yamt sync with head.
 1.3.144.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 04-Jan-2016  phx Make the -p option work, like with loadbsd.
Otherwise the kernel could load into a low-priority 512MB Z3 RAM segment.
 1.7 28-Apr-2008  martin branches: 1.7.44; 1.7.64;
Remove clause 3 and 4 from TNF licenses
 1.6 04-Mar-2007  christos branches: 1.6.40; 1.6.42; 1.6.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5 26-Jan-2002  aymeric branches: 1.5.32; 1.5.70;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 11-Mar-2001  mhitch branches: 1.4.2; 1.4.8;
Pack the ExecBase structure to avoid aligning contraint problems with ELF
compiler
 1.3 16-Feb-1999  is branches: 1.3.8; 1.3.20;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.20.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.4.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.1 11-Mar-2001  nathanw file amigatypes.h was added on branch nathanw_sa on 2002-02-28 04:07:07 +0000
 1.4.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.70.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.32.1 03-Sep-2007  yamt sync with head.
 1.6.44.1 16-May-2008  yamt sync with head.
 1.6.42.1 18-May-2008  yamt sync with head.
 1.6.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.64.1 19-Mar-2016  skrll Sync with HEAD
 1.7.44.1 03-Dec-2017  jdolecek update from HEAD
 1.3 22-Aug-2020  isaki Fix register order. %d0 is higher and %d1 is lower.
This would have rarely affected.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 10-Dec-2001  mhitch branches: 1.1.2; 1.1.4; 1.1.6; 1.1.124; 1.1.126; 1.1.128;
Add a left shift routine needed by changes in lib/libsa/ufs.c.
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.6.2 09-Feb-2002  he Pull up revision 1.1 (new, requested by mhitch):
Add a left-shift routine needed by lib/libsa/ufs.c due to changes
in fs.h.
 1.1.6.1 10-Dec-2001  he file ashldi3.s was added on branch netbsd-1-5 on 2002-02-09 17:35:07 +0000
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 10-Dec-2001  thorpej file ashldi3.s was added on branch kqueue on 2002-01-10 19:37:23 +0000
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 10-Dec-2001  nathanw file ashldi3.s was added on branch nathanw_sa on 2002-01-08 00:23:00 +0000
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 02-Mar-2001  mhitch branches: 1.6.126; 1.6.128; 1.6.130;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.5 01-Mar-2001  is Add register prefixes.
 1.4 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.3 16-Feb-1999  is branches: 1.3.8;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.6.130.1 16-May-2008  yamt sync with head.
 1.6.128.1 18-May-2008  yamt sync with head.
 1.6.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.15 29-Apr-2022  rin Simplify relocation rules.

Now, both single- and triple-byte encodings in relocation table
represent addrdiff (instead of absolute file offset for the latter).

Shave off one insn for boot.amiga. Also, for elf2bb(1), relocation
overflow is mitigated and detectable at least even if inevitable
(it seems unlikely to happen although).
 1.14 29-Apr-2022  rin Fix boot.amiga when relocation table is located beyond 0x8000.

In this case, we cannot load reltab directly into %a2 by movw:

For m68k, movw is actually synonym for different instructions when
its destination is data or address register, respectively.

(1) For data register, it is for move.w, which loads source into lower
half word with upper wharf word being kept untouched.

(2) For address register, it is movea.w, which loads source with
*sign extension*.

XXX
We should really stop using movw, and use move.w or movea.w explicitly.
However, this will end up with BIG diff...

Thanks ryo@ and isaki@ for comments offlist.
 1.13 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.12 28-Apr-2008  martin branches: 1.12.20; 1.12.22;
Remove clause 3 and 4 from TNF licenses
 1.11 26-Jan-2002  aymeric branches: 1.11.118; 1.11.120; 1.11.122;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10 17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.9 24-Sep-2001  is branches: 1.9.4;
Put default command line into a fixed location with a known size.
This is intended to allow patching of the command line without a
compiler.
 1.8 02-Mar-2001  mhitch branches: 1.8.2; 1.8.4;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.7 01-Mar-2001  is Add register prefixes.
 1.6 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.5 16-Feb-1999  is branches: 1.5.8;
Fix Copyright dates
 1.4 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.3 13-Nov-1998  is Simplify program structure to save a few bytes.
 1.2 21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.5.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.8.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.9.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.9.4.1 24-Sep-2001  nathanw file bbstart.s was added on branch nathanw_sa on 2002-01-08 00:23:00 +0000
 1.11.122.2 11-Aug-2010  yamt sync with head.
 1.11.122.1 16-May-2008  yamt sync with head.
 1.11.120.1 18-May-2008  yamt sync with head.
 1.11.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.22.1 05-Mar-2011  rmind sync with head
 1.12.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 25-Jan-2006  is branches: 1.8.72; 1.8.74; 1.8.76;
Define memmove(), too.
 1.7 02-Mar-2001  mhitch branches: 1.7.40; 1.7.52;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.6 01-Mar-2001  is Add register prefixes.
 1.5 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.4 16-Feb-1999  is branches: 1.4.8;
Fix Copyright dates
 1.3 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.2 05-Jan-1998  perry RCSID Police.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.4.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.7.52.1 01-Feb-2006  yamt sync with head.
 1.7.40.1 21-Jun-2006  yamt sync with head.
 1.8.76.1 16-May-2008  yamt sync with head.
 1.8.74.1 18-May-2008  yamt sync with head.
 1.8.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 01-Mar-2001  is branches: 1.5.126; 1.5.128; 1.5.130;
Add register prefixes.
 1.4 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.3 16-Feb-1999  is branches: 1.3.8;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.3.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.5.130.1 16-May-2008  yamt sync with head.
 1.5.128.1 18-May-2008  yamt sync with head.
 1.5.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 13-Nov-1998  is Simplify program structure to save a few bytes.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.16 25-Mar-2023  abs Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh

Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.15 18-Dec-2016  mlelstv branches: 1.15.46;
check for serial console flag also when re-using console from
primary bootstrap.
 1.14 15-Jan-2016  mlelstv branches: 1.14.2;
Add 'C' option to bootblock to enable serial console.
 1.13 17-Oct-2009  mlelstv branches: 1.13.22; 1.13.40;
Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
 1.12 11-Oct-2009  mlelstv AmigaOS console.device expects a character buffer, not a pointer to an int.
This fixes printf() output.
 1.11 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.10 17-Mar-2009  he Make putchar() obey the stand.h prototype.
 1.9 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.8 28-Apr-2008  martin branches: 1.8.8; 1.8.14;
Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.5 26-Jan-2002  aymeric branches: 1.5.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.3 16-Feb-1999  is branches: 1.3.22; 1.3.26;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.26.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.22.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.78.3 11-Mar-2010  yamt sync with head
 1.7.78.2 04-May-2009  yamt sync with head.
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.40.2 05-Feb-2017  skrll Sync with HEAD
 1.13.40.1 19-Mar-2016  skrll Sync with HEAD
 1.13.22.1 03-Dec-2017  jdolecek update from HEAD
 1.14.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.15.46.1 30-Mar-2023  martin Pull up following revision(s) (requested by abs in ticket #133):

sys/arch/amiga/stand/bootblock/boot/libstubs.h: revision 1.8
sys/arch/amiga/stand/bootblock/boot/version: revision 1.3
sys/arch/amiga/stand/bootblock/boot/libstubs.s: revision 1.11
sys/arch/amiga/stand/bootblock/boot/console.c: revision 1.16

Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh
Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.8 25-Mar-2023  abs Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh

Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.7 17-Oct-2009  mlelstv branches: 1.7.94;
Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 24-Dec-2005  perry branches: 1.5.74; 1.5.76; 1.5.78;
bare asm -> __asm
 1.4 17-Dec-2001  mhitch branches: 1.4.32;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.3 16-Feb-1999  is branches: 1.3.22; 1.3.26;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.32.1 21-Jun-2006  yamt sync with head.
 1.5.78.2 11-Mar-2010  yamt sync with head
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.94.1 30-Mar-2023  martin Pull up following revision(s) (requested by abs in ticket #133):

sys/arch/amiga/stand/bootblock/boot/libstubs.h: revision 1.8
sys/arch/amiga/stand/bootblock/boot/version: revision 1.3
sys/arch/amiga/stand/bootblock/boot/libstubs.s: revision 1.11
sys/arch/amiga/stand/bootblock/boot/console.c: revision 1.16

Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh
Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.11 25-Mar-2023  abs Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh

Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.10 17-Oct-2009  mlelstv branches: 1.10.94;
Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 17-Dec-2001  mhitch branches: 1.8.118; 1.8.120; 1.8.122;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.7 11-Mar-2001  mhitch branches: 1.7.2; 1.7.8;
ELF ABI requires address to be returned in A0.

Change an external reference from absolute address to PC-relative.
 1.6 02-Mar-2001  mhitch branches: 1.6.2;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.5 01-Mar-2001  is Add register prefixes.
 1.4 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.3 16-Feb-1999  is branches: 1.3.8;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.6.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.7.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.7.8.1 11-Mar-2001  nathanw file libstubs.s was added on branch nathanw_sa on 2002-01-08 00:23:00 +0000
 1.7.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.122.2 11-Mar-2010  yamt sync with head
 1.8.122.1 16-May-2008  yamt sync with head.
 1.8.120.1 18-May-2008  yamt sync with head.
 1.8.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.94.1 30-Mar-2023  martin Pull up following revision(s) (requested by abs in ticket #133):

sys/arch/amiga/stand/bootblock/boot/libstubs.h: revision 1.8
sys/arch/amiga/stand/bootblock/boot/version: revision 1.3
sys/arch/amiga/stand/bootblock/boot/libstubs.s: revision 1.11
sys/arch/amiga/stand/bootblock/boot/console.c: revision 1.16

Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh
Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.32 05-Dec-2021  msaitoh s/supress/suppress/
 1.31 11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.30 04-Jan-2016  phx Make the -p option work, like with loadbsd.
Otherwise the kernel could load into a low-priority 512MB Z3 RAM segment.
 1.29 29-Mar-2014  mlelstv branches: 1.29.6;
Test mode is not implemented. Appease compiler.
 1.28 10-Jul-2011  mhitch branches: 1.28.2; 1.28.12; 1.28.16;
Add a serial console flag passed from the boot loader to the kernel to
allow enabling the serial console with the boot command. Loadbsd has
the option added, but I am not able to buid a new loadbsd binary at this
time, so only the bootxx loader can set the option.
 1.27 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.26 13-Jan-2011  phx branches: 1.26.2; 1.26.4;
Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.25 15-Nov-2009  snj branches: 1.25.4;
Drop 3rd and 4th clauses (except in one case, where copyright is shared
with UCB and only the 3rd clause is dropped). Approved by mhitch@ and is@
(copyright holders).
 1.24 12-Jan-2009  tsutsui - WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- add src/common/dist/zlib to INCPATH and remove unnecessary options
- remove -I${DESTDIR}/usr/include from INCPATH
 1.23 04-Mar-2007  christos branches: 1.23.40; 1.23.44; 1.23.52;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 27-Jun-2006  tsutsui branches: 1.22.10;
- fix signed/unsigned mismatch
- fix lvalue cast
 1.21 25-Jan-2006  christos branches: 1.21.2; 1.21.6; 1.21.14;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.20 11-Dec-2005  christos branches: 1.20.2;
merge ktrace-lwp.
 1.19 28-Jun-2005  junyoung branches: 1.19.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.18 28-Jun-2005  junyoung Remove trailing spaces.
 1.17 20-Jan-2003  simonb branches: 1.17.2;
The Double-Semi-Colon Police.
 1.16 10-Dec-2002  thorpej Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.15 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.14 17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.13 24-Sep-2001  is branches: 1.13.4;
Put default command line into a fixed location with a known size.
This is intended to allow patching of the command line without a
compiler.
 1.12 24-Sep-2000  jdolecek branches: 1.12.2; 1.12.4;
this file was oversight at first (pointed out by is):

Add new boot flags -v, -q, which switch on AB_VERBOSE or AB_QUIET
respectively. This follows recent bootverbose/bootquiet changes.
 1.11 28-Nov-1999  is Very initial support for booting PPC kernels on P5 boards.
 1.10 13-Nov-1998  is branches: 1.10.10; 1.10.16;
Simplify program structure to save a few bytes.
 1.9 31-Oct-1998  is Make the exec header an automatic variable, instead of malloc()ed space.
Saves 60 bytes of code.
 1.8 08-May-1998  chopps add -m and -k flags
 1.7 08-May-1998  chopps remove -Z (load from chipmem) flag
fix copier code (startit) to work bi-directionally.
change compiler optimization options to save some bytes
 1.6 24-Mar-1997  mycroft Fix calculation of fmem and fmemsz for old ROMs.
 1.5 24-Mar-1997  mycroft Make the segment rounding code consistent. (No functional change.)
If DEBUG_MEMORY_LIST, wait for a keypress before starting the kernel; never
time out.
 1.4 24-Mar-1997  mycroft Kluge to allow building on a M68K4K system.
 1.3 01-Feb-1997  mhitch Use the disk offset to the boot block (first block in the partition) to
pass the block number of the boot partition to the kernel. The kernel
will use the block number to determine which disk device the kernel was
booted from and set the boot device based on that instead of the old
"generic" method.
 1.2 21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.10.16.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.10.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.12.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.13.4.4 11-Dec-2002  thorpej Sync with HEAD.
 1.13.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.13.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.13.4.1 24-Sep-2001  nathanw file main.c was added on branch nathanw_sa on 2002-01-08 00:23:00 +0000
 1.17.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.3 03-Sep-2007  yamt sync with head.
 1.19.2.2 30-Dec-2006  yamt sync with head.
 1.19.2.1 21-Jun-2006  yamt sync with head.
 1.20.2.1 01-Feb-2006  yamt sync with head.
 1.21.14.1 13-Jul-2006  gdamore Merge from HEAD.
 1.21.6.1 11-Aug-2006  yamt sync with head
 1.21.2.1 09-Sep-2006  rpaulo sync with head
 1.22.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.23.44.2 11-Mar-2010  yamt sync with head
 1.23.44.1 04-May-2009  yamt sync with head.
 1.23.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.25.4.1 05-Mar-2011  rmind sync with head
 1.26.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.26.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.28.16.1 18-May-2014  rmind sync with head
 1.28.12.2 03-Dec-2017  jdolecek update from HEAD
 1.28.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.6.2 09-Jul-2016  skrll Sync with HEAD
 1.29.6.1 19-Mar-2016  skrll Sync with HEAD
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 02-Mar-2001  mhitch branches: 1.6.126; 1.6.128; 1.6.130;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.5 01-Mar-2001  is Add register prefixes.
 1.4 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.3 16-Feb-1999  is branches: 1.3.8;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.6.130.1 16-May-2008  yamt sync with head.
 1.6.128.1 18-May-2008  yamt sync with head.
 1.6.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 12-Jan-2009  tsutsui - WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- add src/common/dist/zlib to INCPATH and remove unnecessary options
- remove -I${DESTDIR}/usr/include from INCPATH
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 17-Dec-2001  mhitch branches: 1.1.2; 1.1.4; 1.1.122; 1.1.124; 1.1.126;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.1.126.2 04-May-2009  yamt sync with head.
 1.1.126.1 16-May-2008  yamt sync with head.
 1.1.124.1 18-May-2008  yamt sync with head.
 1.1.122.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.122.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 17-Dec-2001  thorpej file panic.c was added on branch kqueue on 2002-01-10 19:37:24 +0000
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 17-Dec-2001  nathanw file panic.c was added on branch nathanw_sa on 2002-01-08 00:23:00 +0000
 1.2.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.10 26-Mar-2014  christos mark unused
 1.9 22-Mar-2014  christos kill sprintf
fix unused variables
 1.8 28-Apr-2008  martin branches: 1.8.34; 1.8.44; 1.8.50;
Remove clause 3 and 4 from TNF licenses
 1.7 24-Jan-2006  is branches: 1.7.72; 1.7.74; 1.7.76;
Implement sprintf and snprintf.
 1.6 02-Mar-2001  mhitch branches: 1.6.40; 1.6.52;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.5 01-Mar-2001  is Add register prefixes.
 1.4 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.3 16-Feb-1999  is branches: 1.3.8;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.8.1 12-Mar-2001  bouyer Sync with HEAD.
 1.6.52.1 01-Feb-2006  yamt sync with head.
 1.6.40.1 21-Jun-2006  yamt sync with head.
 1.7.76.1 16-May-2008  yamt sync with head.
 1.7.74.1 18-May-2008  yamt sync with head.
 1.7.72.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.50.1 18-May-2014  rmind sync with head
 1.8.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.34.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 17-Dec-2001  mhitch branches: 1.5.118; 1.5.120; 1.5.122;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.4 16-Feb-1999  is branches: 1.4.22; 1.4.26;
Fix Copyright dates
 1.3 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.2 25-Nov-1998  frueauf pain(void) -> pain(void *), pointed out by Adam Ciarcinski.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.4.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.4.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.122.1 16-May-2008  yamt sync with head.
 1.5.120.1 18-May-2008  yamt sync with head.
 1.5.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 15-Nov-2009  snj Drop 3rd and 4th clauses (except in one case, where copyright is shared
with UCB and only the 3rd clause is dropped). Approved by mhitch@ and is@
(copyright holders).
 1.8 02-Mar-2001  mhitch branches: 1.8.130;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.7 01-Mar-2001  is Add register prefixes.
 1.6 26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.5 11-Nov-1998  is branches: 1.5.10;
Switch off the cache later.
Apparently, this avoids a problem on DraCos with HyperCom boards.
 1.4 06-Nov-1998  is Add color debug code for DraCos.
 1.3 08-May-1998  chopps remove -Z (load from chipmem) flag
fix copier code (startit) to work bi-directionally.
change compiler optimization options to save some bytes
 1.2 01-Feb-1997  mhitch Use the disk offset to the boot block (first block in the partition) to
pass the block number of the boot partition to the kernel. The kernel
will use the block number to determine which disk device the kernel was
booted from and set the boot device based on that instead of the old
"generic" method.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.5.10.1 12-Mar-2001  bouyer Sync with HEAD.
 1.8.130.1 11-Mar-2010  yamt sync with head
 1.5 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.86; 1.4.92;
merge ktrace-lwp.
 1.3 28-Jun-2005  junyoung #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is branches: 1.1.1.1.56;
First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.1.1.1.56.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.1.1.56.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.1.1.56.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.1.1.56.1 03-Aug-2004  skrll Sync with HEAD
 1.4.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.78.1 04-May-2009  yamt sync with head.
 1.3 25-Mar-2023  abs Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh

Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.2 25-Feb-2021  rin branches: 1.2.18;
Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.1 17-Dec-2001  mhitch branches: 1.1.2; 1.1.4; 1.1.222;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.1.222.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 17-Dec-2001  thorpej file version was added on branch kqueue on 2002-01-10 19:37:24 +0000
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 17-Dec-2001  nathanw file version was added on branch nathanw_sa on 2002-01-08 00:23:01 +0000
 1.2.18.1 30-Mar-2023  martin Pull up following revision(s) (requested by abs in ticket #133):

sys/arch/amiga/stand/bootblock/boot/libstubs.h: revision 1.8
sys/arch/amiga/stand/bootblock/boot/version: revision 1.3
sys/arch/amiga/stand/bootblock/boot/libstubs.s: revision 1.11
sys/arch/amiga/stand/bootblock/boot/console.c: revision 1.16

Fix NetBSD/amiga bootblocks for Kickstart 3.2 - from Karoly Balogh
Kickstart 3.2 changed to not initialize console.device before
bootstrap, so the previous NetBSD bootblocks would crash when they
tried to initialise console output.

With this change if the call to the OpenDevice() stub fails, the
code now calls FindResident() and InitResident() before retrying
the OpenDevice().

Many thanks to Karoly Balogh for tracking this down (and also for
knowing just who to poke to get insight into the 3.2 changes :)
 1.11 25-Feb-2021  rin Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.10 14-Mar-2009  dsl branches: 1.10.76;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.9 27-Jun-2006  tsutsui branches: 1.9.62; 1.9.70; 1.9.76;
Remove static from devsw[] declaration since it's declared as extern
in <lib/libsa/stand.h>.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8; 1.8.16;
merge ktrace-lwp.
 1.7 28-Jun-2005  junyoung branches: 1.7.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.6 23-Jun-2005  junyoung Use FS_OPS() macro.
 1.5 26-Jan-2002  aymeric branches: 1.5.16;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.3 01-Feb-1997  mhitch branches: 1.3.36; 1.3.40;
Use the disk offset to the boot block (first block in the partition) to
pass the block number of the boot partition to the kernel. The kernel
will use the block number to determine which disk device the kernel was
booted from and set the boot device based on that instead of the old
"generic" method.
 1.2 21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.40.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.40.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.36.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.36.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.16.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.1 30-Dec-2006  yamt sync with head.
 1.8.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.8.8.1 11-Aug-2006  yamt sync with head
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.62.1 04-May-2009  yamt sync with head.
 1.10.76.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 16-Feb-1999  is branches: 1.3.144; 1.3.146; 1.3.148;
Fix Copyright dates
 1.2 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.1 29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1 29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.3.148.1 16-May-2008  yamt sync with head.
 1.3.146.1 18-May-2008  yamt sync with head.
 1.3.144.1 02-Jun-2008  mjf Sync with HEAD.
 1.28 29-Apr-2022  rin Enable SA_HARDCODED_SECSIZE to shrink loaders slightly.
 1.27 29-Apr-2022  rin Stop twiddling when loading boot.amiga; it is small enough.

Slightly reduce insn's for primary loaders, and stop them to output garbage.
 1.26 25-Feb-2021  rin Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.25 09-Apr-2017  christos branches: 1.25.26;
make this work again.
 1.24 08-Apr-2017  christos centralize vers.c building for standalone programs.
 1.23 15-Jan-2016  mlelstv branches: 1.23.2; 1.23.4;
Add 'C' option to bootblock to enable serial console.
 1.22 29-Apr-2014  martin branches: 1.22.4;
Specify both -march=68030 and -mcpu=68030 for assembler files here
as well.
 1.21 29-Mar-2014  mlelstv branches: 1.21.2;
Use different option (-mcpu=68030) to select target cpu for the assembler.
The old option (-m68030) causes it to complain about features used that
are not provided by the target cpu.
 1.20 21-Aug-2013  matt Use <bsd.klinks.mk>
Use ${_MKTARGET_*}
Use correct arguments to ${AR}
Fix entry symbol.
 1.19 18-Jul-2013  joerg Explicitly disable unwind tables for the boot loader.
 1.18 02-Oct-2011  christos branches: 1.18.2; 1.18.12; 1.18.16; 1.18.24;
don't mark vers.c phony.
 1.17 12-Jul-2011  mrg fix previous and only force the failure if reloc2bb already failed.
 1.16 11-Jul-2011  mrg improve the error message if elf2bb finds we are too large. if elf2bb
fails, make sure that the following nm -u's success doesn't cause make
to believe the target was built. now amiga builds with HAVE_GCC=45
actually fail here, rather than fail at sets time due to missing files.
 1.15 22-Jan-2011  joerg Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.14 06-Jul-2010  mrg branches: 1.14.2; 1.14.4;
use elf2bb / elf2bb.h instead of the old, now gone aout2bb version.
 1.13 14-Mar-2010  mrg branches: 1.13.2;
update all of these makefiles for the .so -> .pico change.

most of them are most harmless, but the libgcc parts are quite essential.
before this change, all the special rules for .pico files were not applied,
and exception handling wasn't enabled. this caused c++ exceptions not to
work on sparc64.


this fixes the build of boost-headers (it was correctly calling exception
support broken!), which in turn makes all the things that depend upon it
to actually work again on sparc64.
 1.12 29-Dec-2009  elad branches: 1.12.2;
Don't abuse INSECURE for allowing exec() to load files not owned by uid 0.

Adjust references where this has been used.
 1.11 12-Jan-2009  tsutsui - WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- add src/common/dist/zlib to INCPATH and remove unnecessary options
- remove -I${DESTDIR}/usr/include from INCPATH
 1.10 02-Jan-2006  is branches: 1.10.72; 1.10.76; 1.10.84;
Make the bootblocks compile again using the shared libc functions.
 1.9 11-Dec-2005  christos branches: 1.9.2;
merge ktrace-lwp.
 1.8 26-Oct-2003  lukem branches: 1.8.16;
Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.7 25-Oct-2003  mhitch Use -Os to shrink bootblock code a little more. Now bootxx_fd builds with
gcc 3.3.2.
 1.6 24-Aug-2003  he Adapt to new ufs.c needing memcmp and memmove.
 1.5 03-Feb-2003  mhitch branches: 1.5.2;
Use 32 bit daddr_t due to space limitations when using 64 bit div/mod.
 1.4 31-May-2002  thorpej Add -ffreestanding.
 1.3 26-Mar-2002  mhitch branches: 1.3.2;
Need to include files.o for the file descriptor table used by open().
 1.2 26-Jan-2002  aymeric include ${.CURDIR}/../Makefile.booters
 1.1 17-Dec-2001  mhitch branches: 1.1.2;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.1.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 17-Dec-2001  thorpej file Makefile was added on branch kqueue on 2002-01-10 19:37:25 +0000
 1.3.2.1 09-Jul-2002  gehenna catch up with -current.
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.9.2.1 15-Jan-2006  yamt sync with head.
 1.10.84.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.76.3 11-Aug-2010  yamt sync with head.
 1.10.76.2 11-Mar-2010  yamt sync with head
 1.10.76.1 04-May-2009  yamt sync with head.
 1.10.72.1 17-Jan-2009  mjf Sync with HEAD.
 1.12.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.12.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.13.2.1 05-Mar-2011  rmind sync with head
 1.14.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.14.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.24.1 23-Jul-2013  riastradh sync with HEAD
 1.18.16.2 18-May-2014  rmind sync with head
 1.18.16.1 28-Aug-2013  rmind sync with head
 1.18.12.2 03-Dec-2017  jdolecek update from HEAD
 1.18.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.21.2.1 10-Aug-2014  tls Rebase.
 1.22.4.2 28-Aug-2017  skrll Sync with HEAD
 1.22.4.1 19-Mar-2016  skrll Sync with HEAD
 1.23.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.23.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.25.26.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 29-Apr-2022  rin Stop twiddling when loading boot.amiga; it is small enough.

Slightly reduce insn's for primary loaders, and stop them to output garbage.
 1.9 15-Nov-2009  snj Drop 3rd and 4th clauses (except in one case, where copyright is shared
with UCB and only the 3rd clause is dropped). Approved by mhitch@ and is@
(copyright holders).
 1.8 12-Jan-2009  tsutsui - WARNSfy
- make sure machine and ${MACHIN_ARCH} symlinks are always created
- add src/common/dist/zlib to INCPATH and remove unnecessary options
- remove -I${DESTDIR}/usr/include from INCPATH
 1.7 04-Mar-2007  christos branches: 1.7.40; 1.7.44; 1.7.52;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 25-Jan-2006  christos branches: 1.6.24;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.5 11-Dec-2005  christos branches: 1.5.2;
merge ktrace-lwp.
 1.4 28-Jun-2005  junyoung branches: 1.4.2;
#include <lib/libsa/stand.h> rather than <stand.h> or "stand.h"
 1.3 10-Dec-2002  thorpej branches: 1.3.6;
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.2 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.1 17-Dec-2001  mhitch branches: 1.1.2;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.1.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 17-Dec-2001  thorpej file main.c was added on branch kqueue on 2002-01-10 19:37:25 +0000
 1.3.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.2 03-Sep-2007  yamt sync with head.
 1.4.2.1 21-Jun-2006  yamt sync with head.
 1.5.2.1 01-Feb-2006  yamt sync with head.
 1.6.24.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.7.44.2 11-Mar-2010  yamt sync with head
 1.7.44.1 04-May-2009  yamt sync with head.
 1.7.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.3 15-Nov-2009  snj Drop 3rd and 4th clauses (except in one case, where copyright is shared
with UCB and only the 3rd clause is dropped). Approved by mhitch@ and is@
(copyright holders).
 1.2 20-May-2002  mhitch branches: 1.2.114;
The second-stage boot loader, boot.amiga, uses the default command in the
boot loader image. Installboot can modify the default command in the
first-stage bootblocks, which will have no effect. Copy the default command
from the first-stage bootblock into the second-stage bootloader so modifying
the commandline with installboot actually works again.
 1.1 17-Dec-2001  mhitch branches: 1.1.2; 1.1.10;
Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.1.10.1 30-May-2002  gehenna Catch up with -current.
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 17-Dec-2001  thorpej file startit.s was added on branch kqueue on 2002-01-10 19:37:25 +0000
 1.2.114.1 11-Mar-2010  yamt sync with head
 1.1 25-Feb-2021  rin branches: 1.1.4;
Add FFSv2 support for primary- and second-stage boot loaders.

Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.

Bump version to 3.1.
 1.1.4.2 03-Apr-2021  thorpej Sync with HEAD.
 1.1.4.1 25-Feb-2021  thorpej file Makefile was added on branch thorpej-futex on 2021-04-03 22:28:15 +0000
 1.5 08-Jun-2024  mlelstv Enable and use debug printfs to get some output into the build log.
 1.4 17-Sep-2016  christos NOPIE
 1.3 11-Dec-2005  christos branches: 1.3.122; 1.3.142; 1.3.146;
merge ktrace-lwp.
 1.2 28-Nov-2004  jmc Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts
 1.1 19-Dec-2001  mhitch branches: 1.1.2; 1.1.18; 1.1.22;
The ELF counterpart to aout2bb: convert a relocatable ELF object file
to the simple relocatable image used for the amiga bootblock loader.
 1.1.22.1 06-Apr-2005  he Pull up revision 1.2 (requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.1.18.1 29-Nov-2004  skrll Sync with HEAD.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 19-Dec-2001  thorpej file Makefile was added on branch kqueue on 2002-01-10 19:37:26 +0000
 1.3.146.1 04-Nov-2016  pgoyette Sync with HEAD
 1.3.142.1 05-Oct-2016  skrll Sync with HEAD
 1.3.122.1 03-Dec-2017  jdolecek update from HEAD
 1.9 25-Apr-2022  rin One more style... No binary changes.
 1.8 25-Apr-2022  rin Wrap looong lines, and misc style/cosmetic fixes.

No binary changes.
 1.7 25-Apr-2022  rin Use htobe{16,32}(9) instead of be{16,32}toh(9) where appropriate.

No binary changes both for little and big endian machines.
 1.6 25-Apr-2022  rin u_intN_t --> uintN_t

No binary changes.
 1.5 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.4 28-Apr-2008  martin branches: 1.4.8; 1.4.14;
Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 28-Nov-2004  jmc Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts
 1.1 19-Dec-2001  mhitch branches: 1.1.2; 1.1.18; 1.1.22;
The ELF counterpart to aout2bb: convert a relocatable ELF object file
to the simple relocatable image used for the amiga bootblock loader.
 1.1.22.1 06-Apr-2005  he Pull up revision 1.2 (requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.1.18.1 29-Nov-2004  skrll Sync with HEAD.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 19-Dec-2001  thorpej file chksum.c was added on branch kqueue on 2002-01-10 19:37:26 +0000
 1.3.78.2 04-May-2009  yamt sync with head.
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.4 25-Apr-2022  rin u_intN_t --> uintN_t

No binary changes.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 26-Jan-2002  aymeric branches: 1.2.118; 1.2.120; 1.2.122;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.1 19-Dec-2001  mhitch branches: 1.1.2;
The ELF counterpart to aout2bb: convert a relocatable ELF object file
to the simple relocatable image used for the amiga bootblock loader.
 1.1.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 19-Dec-2001  thorpej file chksum.h was added on branch kqueue on 2002-01-10 19:37:26 +0000
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.30 29-Apr-2022  rin Simplify relocation rules.

Now, both single- and triple-byte encodings in relocation table
represent addrdiff (instead of absolute file offset for the latter).

Shave off one insn for boot.amiga. Also, for elf2bb(1), relocation
overflow is mitigated and detectable at least even if inevitable
(it seems unlikely to happen although).
 1.29 29-Apr-2022  rin Comment that (buffer + 14) stands for reltab in bbstart.s.
 1.28 25-Apr-2022  rin One more style. No binary changes.
 1.27 25-Apr-2022  rin static-ify function bodies of usage() and eval().

No binary changes.
 1.26 25-Apr-2022  rin Wrap looong lines, and misc style/cosmetic fixes.

No binary changes.
 1.25 25-Apr-2022  rin Do not cast return value from malloc(3).

No binary changes.
 1.24 25-Apr-2022  rin - static-ify usage(), intcmp(), and eval()
- remove prototype declaration for main()

NFCI; no binary changes observed for amd64 with -O0.
 1.23 25-Apr-2022  rin Use htobe{16,32}(9) instead of be{16,32}toh(9) where appropriate.

No binary changes both for little and big endian machines.
 1.22 25-Apr-2022  rin u_intN_t --> uintN_t

No binary changes.
 1.21 18-Feb-2022  mlelstv Don't crash when reporting an undefined symbol.
 1.20 18-May-2021  dholland Remove some unused variables, found by gcc -Wall.
 1.19 18-May-2021  dholland Print ptrdiff_t with %td, not %d. Appeared in passing in PR 56188.
 1.18 25-Feb-2021  rin branches: 1.18.4; 1.18.6;
For upcoming FFSv2 support for boot.amiga, dynamically scale its size,
instead of fixing to 32KB.

Old 32KB limit comes from

(1) all R_68K_PC16 symbols get relocated, and

(2) all values in our relocation table for R_68K_32 symbols fit within
16-bit integer.

(1) is already checked in the code. Assertion for (2) is added, but this
limit is satisfied with sufficient margin at the moment. If it is not the
case in the future, we may need to change format for relocation table.
 1.17 20-Aug-2020  riastradh branches: 1.17.2;
mmap MAP_FAILED audit.
 1.16 11-Jul-2011  mrg improve the error message if elf2bb finds we are too large. if elf2bb
fails, make sure that the following nm -u's success doesn't cause make
to believe the target was built. now amiga builds with HAVE_GCC=45
actually fail here, rather than fail at sets time due to missing files.
 1.15 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.14 04-Mar-2007  christos branches: 1.14.40; 1.14.42; 1.14.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 15-Jun-2006  gdamore branches: 1.13.10;
Make this cross-compile on Solaris, by wrapping the #include of sys/endian.h
with a test for #ifndef HAVE_NBTOOL_CONFIG_H.
 1.12 24-Jan-2006  is branches: 1.12.2; 1.12.6; 1.12.12; 1.12.14;
provide more space for relocs in the secondary bootblock.
Guarantee that relocs and 16 bit pc-relative addressing works.
 1.11 11-Dec-2005  christos branches: 1.11.2;
merge ktrace-lwp.
 1.10 04-Dec-2004  chs branches: 1.10.12;
elf2bb is a host program, don't assume that m68k pointer alignment is
sufficient. fixes PR 27055.
 1.9 28-Nov-2004  jmc Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts
 1.8 26-Oct-2003  mhitch branches: 1.8.4;
Fix errors in processing the ELF sections. Gcc3 generated a .comment section
which was erroneously being added to the boot image size and loaded into the
boot image.
 1.7 06-Apr-2003  mhitch branches: 1.7.2;
Check if 16 bit PC-relative offset will overflow, and abort if it does.
This will prevent building a bad boot file if it gets too large.
 1.6 20-Jan-2003  simonb The Double-Semi-Colon Police.
 1.5 20-Jul-2002  grant sweep of errx/warnx, remove unnecessary trailing \n
 1.4 18-Jul-2002  mjl Correct obviously switched args to memset()
 1.3 26-Mar-2002  mhitch branches: 1.3.2;
Check for referencing undefined symbols, and bail out if there were any.

Change the -S option to just a flag for Secondary boot, and compute size
of bootfile image from the input. Secondary boot is no longer a fixed size.
 1.2 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.1 19-Dec-2001  mhitch branches: 1.1.2;
The ELF counterpart to aout2bb: convert a relocatable ELF object file
to the simple relocatable image used for the amiga bootblock loader.
 1.1.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 19-Dec-2001  thorpej file elf2bb.c was added on branch kqueue on 2002-01-10 19:37:27 +0000
 1.3.2.2 30-Aug-2002  gehenna catch up with -current.
 1.3.2.1 21-Jul-2002  gehenna catch up with -current.
 1.7.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.7.2.4 29-Nov-2004  skrll Sync with HEAD.
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.4.1 06-Apr-2005  he Pull up revision 1.9 (requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.10.12.2 03-Sep-2007  yamt sync with head.
 1.10.12.1 21-Jun-2006  yamt sync with head.
 1.11.2.1 01-Feb-2006  yamt sync with head.
 1.12.14.1 15-Jun-2006  gdamore Fix to make this work with cross-building. (sys/endian.h should not be
#include'd if HAVE_NBTOOL_CONFIG_H is defined.)
 1.12.12.1 19-Jun-2006  chap Sync with head.
 1.12.6.1 26-Jun-2006  yamt sync with head.
 1.12.2.1 09-Sep-2006  rpaulo sync with head
 1.13.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.44.1 16-May-2008  yamt sync with head.
 1.14.42.1 18-May-2008  yamt sync with head.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.18.6.1 31-May-2021  cjep sync with head
 1.18.4.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 26-Jan-2002  aymeric branches: 1.2.118; 1.2.120; 1.2.122;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.1 19-Dec-2001  mhitch branches: 1.1.2;
The ELF counterpart to aout2bb: convert a relocatable ELF object file
to the simple relocatable image used for the amiga bootblock loader.
 1.1.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 19-Dec-2001  thorpej file elf2bb.h was added on branch kqueue on 2002-01-10 19:37:27 +0000
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 29-Mar-2014  mlelstv Use different option (-mcpu=68030) to select target cpu for the assembler.
The old option (-m68030) causes it to complain about features used that
are not provided by the target cpu.
 1.11 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.10 18-Jul-2013  joerg Explicitly disable unwind tables for the boot loader.
 1.9 06-Jul-2010  mrg branches: 1.9.8; 1.9.18; 1.9.22; 1.9.30;
use elf2bb / elf2bb.h instead of the old, now gone aout2bb version.
 1.8 14-Mar-2010  mrg branches: 1.8.2;
update all of these makefiles for the .so -> .pico change.

most of them are most harmless, but the libgcc parts are quite essential.
before this change, all the special rules for .pico files were not applied,
and exception handling wasn't enabled. this caused c++ exceptions not to
work on sparc64.


this fixes the build of boost-headers (it was correctly calling exception
support broken!), which in turn makes all the things that depend upon it
to actually work again on sparc64.
 1.7 29-Dec-2009  elad branches: 1.7.2;
Don't abuse INSECURE for allowing exec() to load files not owned by uid 0.

Adjust references where this has been used.
 1.6 19-Oct-2008  apb Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
 1.5 31-May-2002  thorpej branches: 1.5.108; 1.5.112; 1.5.118;
Add -ffreestanding.
 1.4 26-Jan-2002  aymeric branches: 1.4.8;
include ${.CURDIR}/../Makefile.booters
 1.3 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 17-Dec-2001  mhitch Adjust for a.out/ELF conversion program.
 1.1 28-Nov-1999  is branches: 1.1.2; 1.1.8; 1.1.12; 1.1.16;
Very initial support for booting PPC kernels on P5 boards.
 1.1.16.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.16.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.16.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.12.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.12.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.12.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.8.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.1.8.1 28-Nov-1999  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 19:58:51 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.8.1 09-Jul-2002  gehenna catch up with -current.
 1.5.118.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.5.112.3 11-Aug-2010  yamt sync with head.
 1.5.112.2 11-Mar-2010  yamt sync with head
 1.5.112.1 04-May-2009  yamt sync with head.
 1.5.108.1 17-Jan-2009  mjf Sync with HEAD.
 1.7.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.8.2.1 05-Mar-2011  rmind sync with head
 1.9.30.1 23-Jul-2013  riastradh sync with HEAD
 1.9.22.2 18-May-2014  rmind sync with head
 1.9.22.1 28-Aug-2013  rmind sync with head
 1.9.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 30-Dec-1999  is branches: 1.2.6; 1.2.132; 1.2.134; 1.2.136;
Assign copyright to TNF and add license.
 1.1 28-Nov-1999  is branches: 1.1.2;
Very initial support for booting PPC kernels on P5 boards.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.136.1 16-May-2008  yamt sync with head.
 1.2.134.1 18-May-2008  yamt sync with head.
 1.2.132.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.6.1 30-Dec-1999  bouyer file hex2c.awk was added on branch thorpej_scsipi on 2000-11-20 19:58:51 +0000
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 30-Dec-1999  is branches: 1.2.6; 1.2.132; 1.2.134; 1.2.136;
Assign copyright to TNF and add license.
 1.1 28-Nov-1999  is branches: 1.1.2;
Very initial support for booting PPC kernels on P5 boards.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.136.1 16-May-2008  yamt sync with head.
 1.2.134.1 18-May-2008  yamt sync with head.
 1.2.132.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.6.1 30-Dec-1999  bouyer file kickstart.S was added on branch thorpej_scsipi on 2000-11-20 19:58:51 +0000
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 04-Mar-2007  christos branches: 1.4.40; 1.4.42; 1.4.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 26-Jan-2002  aymeric branches: 1.3.32; 1.3.70;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.2 30-Dec-1999  is branches: 1.2.6; 1.2.10; 1.2.14;
Assign copyright to TNF and add license.
 1.1 28-Nov-1999  is branches: 1.1.2;
Very initial support for booting PPC kernels on P5 boards.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.14.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.2.6.1 30-Dec-1999  bouyer file ppcstart.c was added on branch thorpej_scsipi on 2000-11-20 19:58:51 +0000
 1.3.70.1 12-Mar-2007  rmind Sync with HEAD.
 1.3.32.1 03-Sep-2007  yamt sync with head.
 1.4.44.1 16-May-2008  yamt sync with head.
 1.4.42.1 18-May-2008  yamt sync with head.
 1.4.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.10 17-Sep-2016  christos NOPIE
 1.9 03-Feb-2015  aymeric branches: 1.9.2;
. don't depend on -ll to provide a main() function. Lex on ArchLinux doesn't
provide a libl
. still depend on -ll for the !HOSTPROG case for yywrap()
. ANSIfy
 1.8 11-Dec-2005  christos branches: 1.8.122; 1.8.142;
merge ktrace-lwp.
 1.7 28-Nov-2004  jmc Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts
 1.6 12-Dec-2001  tv branches: 1.6.16; 1.6.20;
MKfoo=no -> NOfoo
 1.5 25-Jul-2001  aymeric branches: 1.5.6;
These programs are for the host, not for the target, to execute.
 1.4 13-Feb-1999  lukem branches: 1.4.22;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 19-May-1997  is Add forgotten CLEANFILES. Pointed out by Bernd Ernesti.
 1.1 19-May-1997  is Yet another try to sanitize the bootblock build. Each major target has now
its own subdirectory.
Smaller changes involved:
- installboot installs to /usr/mdec
- installboot.8 installs to /usr/share/man/cat8/amiga/
 1.4.22.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.22.1 03-Aug-2001  lukem update to -current
 1.5.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.6.1 25-Jul-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:23:02 +0000
 1.6.20.1 06-Apr-2005  he Pull up revision 1.7 (requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.6.16.1 29-Nov-2004  skrll Sync with HEAD.
 1.8.142.2 05-Oct-2016  skrll Sync with HEAD
 1.8.142.1 06-Apr-2015  skrll Sync with HEAD
 1.8.122.1 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.6 03-Feb-2015  aymeric . don't depend on -ll to provide a main() function. Lex on ArchLinux doesn't
provide a libl
. still depend on -ll for the !HOSTPROG case for yywrap()
. ANSIfy
 1.5 20-Jun-2011  he branches: 1.5.12; 1.5.30;
Include <string.h> for strncmp() prototype.
 1.4 17-Dec-2001  mhitch branches: 1.4.154;
Add some additional conversions for ELF assembler output.
 1.3 02-Mar-2001  mhitch branches: 1.3.4; 1.3.8;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.2 05-Jan-1998  perry branches: 1.2.14;
RCSID Police.
 1.1 21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.2.14.1 12-Mar-2001  bouyer Sync with HEAD.
 1.3.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.154.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.30.1 06-Apr-2015  skrll Sync with HEAD
 1.5.12.1 03-Dec-2017  jdolecek update from HEAD
 1.6 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.5 26-Oct-1994  cgd branches: 1.5.46; 1.5.50;
new RCS ID format.
 1.4 11-Feb-1994  chopps Add missing Id's
 1.3 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.5.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.4 26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.3 26-Oct-1994  cgd branches: 1.3.46; 1.3.50;
new RCS ID format.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 26-Jan-1994  mw Add new, improved fontdumper.
 1.3.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5 14-May-2023  phx Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.4 06-Sep-2022  phx branches: 1.4.4;
Update loadbsd source and distribution binary to version 3.2.
Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.3 11-Nov-2015  phx branches: 1.3.10; 1.3.22;
Build instructions and Makefile for loadbsd 3.0.
Submitted by Gunther Nikl.
 1.2 05-Jan-1998  perry branches: 1.2.198; 1.2.218;
RCSID Police.
 1.1 26-Jun-1996  is branches: 1.1.2;
- Add code to loadbsd.c to allow booting on DraCos. This could be done
in a more elegant way, but it works as is, and we need it now.
- Add a README and Makefile for the above. Note that this directory should
NOT be added to ../Makefile's SUBDIRS.
 1.1.2.2 26-Jun-1996  is - Add code to loadbsd.c to allow booting on DraCos. This could be done
in a more elegant way, but it works as is, and we need it now.
- Add a README and Makefile for the above. Note that this directory should
NOT be added to ../Makefile's SUBDIRS.
 1.1.2.1 26-Jun-1996  is file Makefile was added on branch netbsd-1-2 on 1996-06-26 15:53:06 +0000
 1.2.218.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.198.1 03-Dec-2017  jdolecek update from HEAD
 1.3.22.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1638):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.3.22.1 24-Feb-2023  martin Pull up following revision(s) (requested by abs in ticket #1607):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.37
distrib/amiga/stand/loadbsd.uue: revision 1.3
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.4
sys/arch/amiga/stand/loadbsd/README: revision 1.5

Update loadbsd source and distribution binary to version 3.2.

Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.3.10.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1823):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.3.10.1 24-Feb-2023  martin Pull up following revision(s) (requested by abs in ticket #1803):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.37
distrib/amiga/stand/loadbsd.uue: revision 1.3
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.4
sys/arch/amiga/stand/loadbsd/README: revision 1.5

Update loadbsd source and distribution binary to version 3.2.

Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.4.4.1 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #189):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.6 14-May-2023  phx Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.5 06-Sep-2022  phx branches: 1.5.4;
Update loadbsd source and distribution binary to version 3.2.
Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.4 04-Apr-2022  andvar fix various typos, mainly in comments.
 1.3 11-Nov-2015  phx branches: 1.3.10; 1.3.22;
Build instructions and Makefile for loadbsd 3.0.
Submitted by Gunther Nikl.
 1.2 05-Jan-1998  perry branches: 1.2.198; 1.2.218;
RCSID Police.
 1.1 26-Jun-1996  is branches: 1.1.2;
- Add code to loadbsd.c to allow booting on DraCos. This could be done
in a more elegant way, but it works as is, and we need it now.
- Add a README and Makefile for the above. Note that this directory should
NOT be added to ../Makefile's SUBDIRS.
 1.1.2.2 26-Jun-1996  is - Add code to loadbsd.c to allow booting on DraCos. This could be done
in a more elegant way, but it works as is, and we need it now.
- Add a README and Makefile for the above. Note that this directory should
NOT be added to ../Makefile's SUBDIRS.
 1.1.2.1 26-Jun-1996  is file README was added on branch netbsd-1-2 on 1996-06-26 15:53:07 +0000
 1.2.218.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.198.1 03-Dec-2017  jdolecek update from HEAD
 1.3.22.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1638):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.3.22.1 24-Feb-2023  martin Pull up following revision(s) (requested by abs in ticket #1607):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.37
distrib/amiga/stand/loadbsd.uue: revision 1.3
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.4
sys/arch/amiga/stand/loadbsd/README: revision 1.5

Update loadbsd source and distribution binary to version 3.2.

Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.3.10.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1823):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.3.10.1 24-Feb-2023  martin Pull up following revision(s) (requested by abs in ticket #1803):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.37
distrib/amiga/stand/loadbsd.uue: revision 1.3
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.4
sys/arch/amiga/stand/loadbsd/README: revision 1.5

Update loadbsd source and distribution binary to version 3.2.

Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.5.4.1 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #189):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.38 14-May-2023  phx Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.37 06-Sep-2022  phx branches: 1.37.4;
Update loadbsd source and distribution binary to version 3.2.
Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.36 29-May-2019  msaitoh branches: 1.36.2;
s/suppport/support/
 1.35 10-Jul-2011  mhitch branches: 1.35.46; 1.35.54;
Add a serial console flag passed from the boot loader to the kernel to
allow enabling the serial console with the boot command. Loadbsd has
the option added, but I am not able to buid a new loadbsd binary at this
time, so only the bootxx loader can set the option.
 1.34 21-Oct-2009  snj Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
 1.33 24-Dec-2005  perry branches: 1.33.78;
bare asm -> __asm
 1.32 11-Dec-2005  christos merge ktrace-lwp.
 1.31 13-Feb-2004  wiz branches: 1.31.16;
Uppercase CPU, plural is CPUs.
 1.30 03-Apr-2003  jklos branches: 1.30.2;
Version bumped to 3.0 to reflect changes to support ELF kernels. Thanks to
Gunther Nikl <gni@gecko.de> for the patches.
 1.29 10-Dec-2002  thorpej Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.28 09-Aug-2002  soren Remove extraneous \n's in {err,warn}{,x}.
 1.27 26-Jan-2002  aymeric branches: 1.27.8;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.26 30-Oct-2000  aymeric branches: 1.26.4; 1.26.8;
add a semicolon to make this compile again
 1.25 24-Sep-2000  jdolecek add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.24 15-Jun-2000  is Fix for two bugs discovered by Gunther Nikl:
- missing printf parameter
- error in DraCo detection
 1.23 01-Nov-1997  lukem branches: 1.23.14; 1.23.22;
getopt returns -1 not EOF
 1.22 13-Oct-1996  is Fix an error message, and extend it to indicate possible workarounds.
 1.21 02-Aug-1996  is Kludge to get back "Fusion Forty" fastkick memory.
 1.20 26-Jun-1996  is - Add code to loadbsd.c to allow booting on DraCos. This could be done
in a more elegant way, but it works as is, and we need it now.
- Add a README and Makefile for the above. Note that this directory should
NOT be added to ../Makefile's SUBDIRS.
 1.19 04-May-1996  mhitch branches: 1.19.4;
Add support for loading kernel into fastmem, if the kernel also supports
loading into fastmem. This removes the requirement that the kernel fit
into chipmem.
Add a -Z flag to force loading into chip memory.
Add a -s option for compatibility with my bootblock loader.
Move the test exit to just before starting the kernel; this lets the
test mode actually load the kernel and do the version checks.
 1.18 28-Jan-1996  chopps add check for "A4000 bonus" (small b)
 1.17 30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.16 12-Feb-1995  chopps branches: 1.16.2;
Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 29-Jun-1994  chopps aga mode, finally.. thanks to osymh@gemini.oscs.montana.edu (Michael Hitch)
 1.13 23-Jun-1994  chopps update from michael.
 1.12 15-Jun-1994  chopps some cleanup and added passing of timer frequency
 1.11 13-Jun-1994  chopps some cleanup and various fixes for new fs code. plus some general
fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.10 12-May-1994  chopps update from osymh@gemini.oscs.montana.edu (Michael L. Hitch) add support
for zthreebus siop scsi drivers and better machine recocgnition.
 1.9 28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.8 20-Mar-1994  chopps load symbols if given -S flag, upped kern version to 2. All
symbols handling changes thanks to Michael Hitch.
 1.7 11-Feb-1994  chopps Add missing Id's
 1.6 01-Feb-1994  chopps now checks bootstrap version to avoid problems.
 1.5 26-Jan-1994  mw Update to current amiga branch.
 1.4 30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3 02-Sep-1993  mw new source release integrated from amiga-release.
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1 05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.16.2.2 24-Nov-1995  chopps add sync flag to booter and use in scsi devs instead of binpatch
 1.16.2.1 20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.19.4.2 03-Aug-1996  jtc Pulled up from rev 1.21 by request from Ignatios Souvatzis
 1.19.4.1 26-Jun-1996  jtc Pulled up from revision 1.20 by request from Ignatios
 1.23.22.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.23.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.23.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.26.8.3 11-Dec-2002  thorpej Sync with HEAD.
 1.26.8.2 13-Aug-2002  nathanw Catch up to -current.
 1.26.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.26.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.26.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.27.8.1 30-Aug-2002  gehenna catch up with -current.
 1.30.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.30.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.30.2.1 03-Aug-2004  skrll Sync with HEAD
 1.31.16.1 21-Jun-2006  yamt sync with head.
 1.33.78.1 11-Mar-2010  yamt sync with head
 1.35.54.1 10-Jun-2019  christos Sync with HEAD
 1.35.46.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1823):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.35.46.1 24-Feb-2023  martin Pull up following revision(s) (requested by abs in ticket #1803):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.37
distrib/amiga/stand/loadbsd.uue: revision 1.3
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.4
sys/arch/amiga/stand/loadbsd/README: revision 1.5

Update loadbsd source and distribution binary to version 3.2.

Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.36.2.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1638):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.36.2.1 24-Feb-2023  martin Pull up following revision(s) (requested by abs in ticket #1607):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.37
distrib/amiga/stand/loadbsd.uue: revision 1.3
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.4
sys/arch/amiga/stand/loadbsd/README: revision 1.5

Update loadbsd source and distribution binary to version 3.2.

Including the following changes by Gunther Nikl:
- Added detection of A600.
- Fix handling of multiple -n options.
Make it compile with recent AmigaOS gcc ports (for example gcc6), as
older ports no longer work with current NetBSD header files.
 1.37.4.1 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #189):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1 14-May-2023  phx branches: 1.1.2; 1.1.4; 1.1.6;
Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.6.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1823):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.6.1 14-May-2023  martin file startit.s was added on branch netbsd-8 on 2023-06-03 15:09:01 +0000
 1.1.4.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1638):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.4.1 14-May-2023  martin file startit.s was added on branch netbsd-9 on 2023-06-03 15:07:53 +0000
 1.1.2.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #189):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.2.1 14-May-2023  martin file startit.s was added on branch netbsd-10 on 2023-06-03 15:04:06 +0000
 1.1 14-May-2023  phx branches: 1.1.2; 1.1.4; 1.1.6;
Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.6.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1823):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.6.1 14-May-2023  martin file vmakefile was added on branch netbsd-8 on 2023-06-03 15:09:01 +0000
 1.1.4.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #1638):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.4.1 14-May-2023  martin file vmakefile was added on branch netbsd-9 on 2023-06-03 15:07:53 +0000
 1.1.2.2 03-Jun-2023  martin Pull up following revision(s) (requested by abs in ticket #189):

sys/arch/amiga/stand/loadbsd/loadbsd.c: revision 1.38
distrib/amiga/stand/loadbsd.uue: revision 1.4
sys/arch/amiga/stand/loadbsd/startit.s: revision 1.1
sys/arch/amiga/stand/loadbsd/Makefile: revision 1.5
sys/arch/amiga/stand/loadbsd/vmakefile: revision 1.1
sys/arch/amiga/stand/loadbsd/README: revision 1.6

Update loadbsd source and distribution binary to version 3.3.
- Loading the kernel to the highest priority memory segment is default now.
- New option -l to revert the to the previous behaviour of largest segment.
- New option -M to define a minimum size for the memory segment.
- Fixed some warnings and typos.
- Put assembler inline source into its own source text startit.s.
- Can be built with Bebbo's gcc6 Amiga port or with vbcc.
 1.1.2.1 14-May-2023  martin file vmakefile was added on branch netbsd-10 on 2023-06-03 15:04:06 +0000
 1.11 05-Apr-2002  heinz Add polish keymaps pl_din and pl_us by Pawel Chwalowski <pch@polo.po.opole.pl>.
This solves part of PR port-amiga/15980
 1.10 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.9 13-Feb-1999  lukem branches: 1.9.22; 1.9.26;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.8 13-Mar-1998  is Ite keyboard map, for spanish Amiga keyboards.
Contributed by Inaki Saez <jisaez@sfe.indra.es>.
 1.7 27-Oct-1997  veego Include <bsd.subdir.mk> to build SUBDIRS.
 1.6 06-Aug-1997  veego branches: 1.6.4;
French keymap. From Eric Delcamp in pr: port-amiga/3923
 1.5 27-Sep-1996  chopps branches: 1.5.10;
make work with DESTDIR
 1.4 27-Jul-1996  is Add $(DESTDIR) to the BINDIR=
 1.3 27-Jul-1996  is Oops; somehow got the wrong version.
 1.2 27-Jul-1996  is Get this onto the Main branch.
 1.1 08-Jun-1996  is branches: 1.1.2;
file Makefile was initially added on branch netbsd-1-2.
 1.1.2.2 31-Jul-1996  jtc Pulled up from rev 1.4 by request from Ignatios
 1.1.2.1 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.5.10.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.6.4.1 27-Oct-1997  mellon Pull rev 1.7 up from trunk (veego)
 1.9.26.2 17-Apr-2002  nathanw Catch up to -current.
 1.9.26.1 08-Jan-2002  nathanw Catch up to -current.
 1.9.22.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.10 27-Sep-2000  aymeric branches: 1.10.4; 1.10.8;
cross-compile properly
 1.9 17-Sep-2000  is Make this build again. Fixes by Michael Hitch.
 1.8 03-Mar-1999  tron branches: 1.8.8; 1.8.18;
Fix creation of keymap files.
 1.7 13-Feb-1999  lukem convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.6 14-Jul-1997  veego Updated for the use of ${FILES}.
 1.5 24-May-1997  veego Fix the DESTDIR problem.
 1.4 29-Jan-1997  is Correct yet another typing error.
 1.3 29-Jan-1997  is fixed my own stupid typing error.
 1.2 21-Jun-1996  is Forgotten $(DESTDIR) in special install rule.
 1.1 08-Jun-1996  is branches: 1.1.2;
file Makefile.inc was initially added on branch netbsd-1-2.
 1.1.2.3 25-Jun-1996  jtc Pulled up by request from Ignatios Souvatzis
 1.1.2.2 08-Jun-1996  is Make this really really compile.
 1.1.2.1 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.8.18.1 19-Sep-2000  is Pullup from -current, requested by is, granted by thorpej:
Changes by mhitch, needed for those directories to compile.
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.10.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.10.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.4 09-Oct-1995  chopps fix keymap (fixes pr#1254) from Blaz Zupan <blaz.zupan@uni-mb.si>
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.8 20-May-2011  christos typo
 1.7 19-May-2011  christos include missing headers.
 1.6 27-Jun-2006  tsutsui branches: 1.6.84; 1.6.90;
Include <stdlib.h> for exit(3) prototype.
 1.5 26-Jan-2002  aymeric branches: 1.5.32; 1.5.46; 1.5.50; 1.5.58;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.4 26-Oct-1994  cgd branches: 1.4.46; 1.4.50;
new RCS ID format.
 1.3 11-May-1994  chopps update to new ioctl names
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4.50.1 28-Feb-2002  nathanw Catch up to -current.
 1.4.46.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.58.1 13-Jul-2006  gdamore Merge from HEAD.
 1.5.50.1 11-Aug-2006  yamt sync with head
 1.5.46.1 09-Sep-2006  rpaulo sync with head
 1.5.32.1 30-Dec-2006  yamt sync with head.
 1.6.90.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.84.1 31-May-2011  rmind sync with head
 1.3 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.2 05-May-1996  veego Make this compile. Fixes PR#2047
 1.1 28-Jan-1996  chopps add swedish keyboard support by Stefan Pedersen
 1.4 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.11 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.10 04-May-2018  christos branches: 1.10.2;
remove bsd.hostinit.mk; it breaks install.
 1.9 01-May-2018  christos more NOMAN= removal.
 1.8 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.7 12-Dec-2001  tv branches: 1.7.28;
MKfoo=no -> NOfoo
 1.6 27-Sep-2000  aymeric branches: 1.6.4; 1.6.8;
cross-compile properly
 1.5 13-Feb-1999  lukem branches: 1.5.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.4 14-Jul-1997  veego s/MAP/FILES/
 1.3 31-Dec-1996  veego Add NOMAN=
 1.2 08-Jun-1996  is branches: 1.2.2;
Make this really really compile.
 1.1 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.2.2.2 08-Jun-1996  is Make this really really compile.
 1.2.2.1 08-Jun-1996  is file Makefile was added on branch netbsd-1-2 on 1996-06-08 15:42:01 +0000
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.6.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.28.2 21-May-2018  pgoyette Sync with HEAD
 1.7.28.1 02-May-2018  pgoyette Synch with HEAD
 1.10.2.1 10-Jun-2019  christos Sync with HEAD
 1.6 27-Sep-2000  aymeric cross-compile properly
 1.5 08-Jun-1996  is branches: 1.5.28;
Really compile and install keymap loader and binary keymaps.
 1.4 09-Oct-1995  chopps branches: 1.4.6;
fix keymap (fixes pr#1254) from Blaz Zupan <blaz.zupan@uni-mb.si>
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.4.6.1 08-Jun-1996  is pull up fixes for installation
 1.5.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.7 04-May-2018  christos remove bsd.hostinit.mk; it breaks install.
 1.6 01-May-2018  christos more NOMAN= removal.
 1.5 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.4 12-Dec-2001  tv branches: 1.4.28;
MKfoo=no -> NOfoo
 1.3 27-Sep-2000  aymeric branches: 1.3.4; 1.3.8;
cross-compile properly
 1.2 13-Feb-1999  lukem branches: 1.2.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.1 13-Mar-1998  is Ite keyboard map, for spanish Amiga keyboards.
Contributed by Inaki Saez <jisaez@sfe.indra.es>.
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.3.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.28.2 21-May-2018  pgoyette Sync with HEAD
 1.4.28.1 02-May-2018  pgoyette Synch with HEAD
 1.2 27-Sep-2000  aymeric cross-compile properly
 1.1 13-Mar-1998  is branches: 1.1.14;
Ite keyboard map, for spanish Amiga keyboards.
Contributed by Inaki Saez <jisaez@sfe.indra.es>.
 1.1.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.7 04-May-2018  christos remove bsd.hostinit.mk; it breaks install.
 1.6 01-May-2018  christos more NOMAN= removal.
 1.5 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.4 12-Dec-2001  tv branches: 1.4.28;
MKfoo=no -> NOfoo
 1.3 27-Sep-2000  aymeric branches: 1.3.4; 1.3.8;
cross-compile properly
 1.2 13-Feb-1999  lukem branches: 1.2.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.1 06-Aug-1997  veego French keymap. From Eric Delcamp in pr: port-amiga/3923
 1.2.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.3.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.28.2 21-May-2018  pgoyette Sync with HEAD
 1.4.28.1 02-May-2018  pgoyette Synch with HEAD
 1.2 27-Sep-2000  aymeric cross-compile properly
 1.1 06-Aug-1997  veego branches: 1.1.18;
French keymap. From Eric Delcamp in pr: port-amiga/3923
 1.1.18.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.4 04-May-2018  christos remove bsd.hostinit.mk; it breaks install.
 1.3 01-May-2018  christos more NOMAN= removal.
 1.2 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.1 05-Apr-2002  heinz branches: 1.1.2; 1.1.8; 1.1.204;
add polish keymaps created by Pawel Chwalowski <pch@polo.po.opole.pl>
 1.1.204.2 21-May-2018  pgoyette Sync with HEAD
 1.1.204.1 02-May-2018  pgoyette Synch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 05-Apr-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:34:36 +0000
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 05-Apr-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-04-17 00:02:17 +0000
 1.1 05-Apr-2002  heinz branches: 1.1.2; 1.1.8;
add polish keymaps created by Pawel Chwalowski <pch@polo.po.opole.pl>
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 05-Apr-2002  jdolecek file pl_din-kbdmap.c was added on branch kqueue on 2002-06-23 17:34:36 +0000
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 05-Apr-2002  nathanw file pl_din-kbdmap.c was added on branch nathanw_sa on 2002-04-17 00:02:17 +0000
 1.4 04-May-2018  christos remove bsd.hostinit.mk; it breaks install.
 1.3 01-May-2018  christos more NOMAN= removal.
 1.2 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.1 05-Apr-2002  heinz branches: 1.1.2; 1.1.8; 1.1.204;
add polish keymaps created by Pawel Chwalowski <pch@polo.po.opole.pl>
 1.1.204.2 21-May-2018  pgoyette Sync with HEAD
 1.1.204.1 02-May-2018  pgoyette Synch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 05-Apr-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:34:36 +0000
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 05-Apr-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-04-17 00:02:18 +0000
 1.1 05-Apr-2002  heinz branches: 1.1.2; 1.1.8;
add polish keymaps created by Pawel Chwalowski <pch@polo.po.opole.pl>
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 05-Apr-2002  jdolecek file pl_us-kbdmap.c was added on branch kqueue on 2002-06-23 17:34:36 +0000
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 05-Apr-2002  nathanw file pl_us-kbdmap.c was added on branch nathanw_sa on 2002-04-17 00:02:18 +0000
 1.11 04-May-2018  christos remove bsd.hostinit.mk; it breaks install.
 1.10 01-May-2018  christos more NOMAN= removal.
 1.9 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.8 12-Dec-2001  tv branches: 1.8.28;
MKfoo=no -> NOfoo
 1.7 27-Sep-2000  aymeric branches: 1.7.4; 1.7.8;
cross-compile properly
 1.6 13-Feb-1999  lukem branches: 1.6.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.5 14-Jul-1997  veego s/MAP/FILES/
 1.4 31-Dec-1996  veego Add NOMAN=
 1.3 27-Jul-1996  is Delete the NOMAN and BINDIR lines. They're imported from ../Makefile.inc
anyway, and the BINDIR here was even wrong (missing $(DESTDIR)).
 1.2 08-Jun-1996  is branches: 1.2.2;
Make this really really compile.
 1.1 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.2.2.2 31-Jul-1996  jtc Pulled up from rev 1.3 by request from Ignatios
 1.2.2.1 08-Jun-1996  jtc file Makefile was added on branch netbsd-1-2 on 1996-07-31 16:11:27 +0000
 1.6.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.7.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.7.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.28.2 21-May-2018  pgoyette Sync with HEAD
 1.8.28.1 02-May-2018  pgoyette Synch with HEAD
 1.4 27-Sep-2000  aymeric cross-compile properly
 1.3 08-Jun-1996  is branches: 1.3.28;
Really compile and install keymap loader and binary keymaps.
 1.2 05-May-1996  veego branches: 1.2.4;
Make this compile. Fixes PR#2047
 1.1 28-Jan-1996  chopps add swedish keyboard support by Stefan Pedersen
 1.2.4.1 08-Jun-1996  is pull up fixes for installation
 1.3.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.10 04-May-2018  christos remove bsd.hostinit.mk; it breaks install.
 1.9 01-May-2018  christos more NOMAN= removal.
 1.8 01-May-2018  christos Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
 1.7 12-Dec-2001  tv branches: 1.7.28;
MKfoo=no -> NOfoo
 1.6 27-Sep-2000  aymeric branches: 1.6.4; 1.6.8;
cross-compile properly
 1.5 13-Feb-1999  lukem branches: 1.5.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.4 14-Jul-1997  veego s/MAP/FILES/
 1.3 31-Dec-1996  veego Add NOMAN=
 1.2 08-Jun-1996  is branches: 1.2.2;
Make this really really compile.
 1.1 08-Jun-1996  is Really compile and install keymap loader and binary keymaps.
 1.2.2.2 08-Jun-1996  is Make this really really compile.
 1.2.2.1 08-Jun-1996  is file Makefile was added on branch netbsd-1-2 on 1996-06-08 15:42:04 +0000
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.6.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.28.2 21-May-2018  pgoyette Sync with HEAD
 1.7.28.1 02-May-2018  pgoyette Synch with HEAD
 1.5 27-Sep-2000  aymeric cross-compile properly
 1.4 08-Jun-1996  is branches: 1.4.28;
Really compile and install keymap loader and binary keymaps.
 1.3 26-Oct-1994  cgd branches: 1.3.6;
new RCS ID format.
 1.2 11-Feb-1994  chopps Add missing Id's
 1.1 02-Sep-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.1 02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.3.6.1 08-Jun-1996  is pull up fixes for installation
 1.4.28.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)

RSS XML Feed