Home | History | Annotate | only in /src/sys/arch/newsmips
History log of /src/sys/arch/newsmips
RevisionDateAuthorComments
 1.5 25-Oct-2008  apb Use ${TOOL_SED} instead if plain sed in Makefiles.
 1.4 06-Jan-2003  lukem branches: 1.4.104; 1.4.108; 1.4.114;
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.3 08-Jul-1999  tsubai branches: 1.3.20;
Add stand to SUBDIR.
 1.2 12-Jun-1998  cgd branches: 1.2.10;
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.1 05-Mar-1998  tsubai Added arch/newsmips/Makefile.
 1.2.10.1 02-Aug-1999  thorpej Update from trunk.
 1.3.20.1 07-Jan-2003  thorpej Sync with HEAD.
 1.4.114.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.4.108.1 04-May-2009  yamt sync with head.
 1.4.104.1 17-Jan-2009  mjf Sync with HEAD.
 1.29 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.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.27 21-Nov-2020  thorpej branches: 1.27.2;
malloc(9) -> kmem(9)
 1.26 10-Nov-2019  chs branches: 1.26.8;
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.25 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.24 30-Sep-2018  tsutsui Account APbus interrupts by evcnt(9).
 1.23 30-Sep-2018  tsutsui Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).
Should be pulled up to netbsd-8.
 1.22 20-Feb-2011  matt branches: 1.22.48; 1.22.54; 1.22.56;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.21 09-Apr-2008  tsutsui branches: 1.21.22; 1.21.26; 1.21.32; 1.21.34;
Split device_t/softc, with misc cleanup.
 1.20 11-Dec-2005  christos branches: 1.20.74;
merge ktrace-lwp.
 1.19 03-Jun-2005  tsutsui constify.
 1.18 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.17 15-Jul-2003  lukem branches: 1.17.8; 1.17.10;
__KERNEL_RCSID()
 1.16 10-May-2003  tsutsui branches: 1.16.2;
Rename apbus_intr_call() -> apbus_intr_dispatch().
 1.15 10-May-2003  tsutsui - Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.14 03-May-2003  wiz DMA, not dma nor Dma.
 1.13 19-Apr-2003  tsutsui TAB/space cleanup.
 1.12 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.11 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 14-Nov-2001  thorpej branches: 1.8.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.7 28-Sep-2001  chs branches: 1.7.2;
don't depend on other headers to include sys/proc.h for us.
 1.6 26-Jul-2001  wiz branches: 1.6.2;
issueing -> issuing
 1.5 03-Dec-2000  matt branches: 1.5.4;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.4 18-Oct-2000  onoe branches: 1.4.2;
Move APbus dependent unmapped DMA address stuff from bus.c to apbus.c
Support DMA mapping table with NEWSMIPS_DMAMAP_MAPTBL flag for APbus
(MAPTBL is not tested yet).
 1.3 12-Oct-2000  onoe Allow multiple interrupt handler on same interrupt event.
Clear interrupt mask for specified interrupt in apbus_intr_establish().
Add dma stuff; define apbus_dmamap_sync() to flush DMA write cache by
accessing the corresponding I/O port.
 1.2 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.4.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.4.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.
 1.4.2.1 18-Oct-2000  bouyer file apbus.c was added on branch thorpej_scsipi on 2000-11-20 20:17:14 +0000
 1.5.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.5.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1 03-Aug-2001  lukem update to -current
 1.6.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.2.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.8.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.8.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.8.2.1 14-Nov-2001  nathanw file apbus.c was added on branch nathanw_sa on 2002-10-18 02:39:09 +0000
 1.16.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.4 06-Feb-2005  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.17.10.1 12-Feb-2005  yamt sync with head.
 1.17.8.1 29-Apr-2005  kent sync with -current
 1.20.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.34.1 05-Mar-2011  bouyer Sync with HEAD
 1.21.32.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.26.1 05-Mar-2011  rmind sync with head
 1.21.22.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.22.56.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22.56.1 10-Jun-2019  christos Sync with HEAD
 1.22.54.1 20-Oct-2018  pgoyette Sync with head
 1.22.48.1 18-Nov-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1095):

sys/arch/newsmips/apbus/apbus.c: revision 1.23
sys/arch/newsmips/apbus/apbus_subr.c: revision 1.10
sys/arch/newsmips/apbus/apbusvar.h: revision 1.10
sys/arch/newsmips/conf/std.newsmips: revision 1.18

Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).

Should be pulled up to netbsd-8.
 1.26.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.27.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.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.10 30-Sep-2018  tsutsui Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).
Should be pulled up to netbsd-8.
 1.9 24-Mar-2014  christos branches: 1.9.22; 1.9.28; 1.9.30;
- fix unused
- use cpu_{g,s}etmodel
 1.8 09-Apr-2008  tsutsui branches: 1.8.38; 1.8.48; 1.8.54;
Split device_t/softc, with misc cleanup.
 1.7 11-Dec-2005  christos branches: 1.7.74;
merge ktrace-lwp.
 1.6 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.5 15-Jul-2003  lukem branches: 1.5.8; 1.5.10;
__KERNEL_RCSID()
 1.4 19-Apr-2003  tsutsui branches: 1.4.2;
TAB/space cleanup.
 1.3 03-Dec-2000  matt Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.2 23-Dec-1999  tsubai branches: 1.2.6;
* Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2.6.3 08-Dec-2000  bouyer 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.
 1.2.6.1 23-Dec-1999  bouyer file apbus_subr.c was added on branch thorpej_scsipi on 2000-11-20 20:17:15 +0000
 1.4.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.5.10.1 12-Feb-2005  yamt sync with head.
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.54.1 18-May-2014  rmind sync with head
 1.8.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.38.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.9.30.1 10-Jun-2019  christos Sync with HEAD
 1.9.28.1 20-Oct-2018  pgoyette Sync with head
 1.9.22.1 18-Nov-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1095):

sys/arch/newsmips/apbus/apbus.c: revision 1.23
sys/arch/newsmips/apbus/apbus_subr.c: revision 1.10
sys/arch/newsmips/apbus/apbusvar.h: revision 1.10
sys/arch/newsmips/conf/std.newsmips: revision 1.18

Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).

Should be pulled up to netbsd-8.
 1.11 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.10 30-Sep-2018  tsutsui Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).
Should be pulled up to netbsd-8.
 1.9 17-Oct-2007  garbled branches: 1.9.100; 1.9.106; 1.9.108;
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.8 17-Jun-2007  tsutsui branches: 1.8.10;
- add a declaration of apbus_wbflush() in apbusvar.h
- include <mips/locore.h> for mips3_wbflush()
- undef wbflush() macro before declaration of local inlined wbflush()
 1.7 11-Dec-2005  christos branches: 1.7.30; 1.7.32; 1.7.38;
merge ktrace-lwp.
 1.6 03-Jun-2005  tsutsui branches: 1.6.2;
constify.
 1.5 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.4 10-May-2003  tsutsui branches: 1.4.2; 1.4.10; 1.4.12;
Rename apbus_intr_call() -> apbus_intr_dispatch().
 1.3 12-Oct-2000  onoe branches: 1.3.2;
change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
add prototype of apbus_dmatag_init() function, which allocates memory
and initialize its member including bus space handle to flush DMA write
cache. Note that the allocated pointer must be freed.
 1.2 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.3.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.
 1.3.2.1 12-Oct-2000  bouyer file apbusvar.h was added on branch thorpej_scsipi on 2000-11-20 20:17:15 +0000
 1.4.12.1 12-Feb-2005  yamt sync with head.
 1.4.10.1 29-Apr-2005  kent sync with -current
 1.4.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.1 06-Feb-2005  skrll Sync with HEAD.
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.7.32.1 11-Jul-2007  mjf Sync with head.
 1.7.30.1 15-Jul-2007  ad Sync with head.
 1.8.10.1 06-Nov-2007  matt sync with HEAD
 1.9.108.1 10-Jun-2019  christos Sync with HEAD
 1.9.106.1 20-Oct-2018  pgoyette Sync with head
 1.9.100.1 18-Nov-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1095):

sys/arch/newsmips/apbus/apbus.c: revision 1.23
sys/arch/newsmips/apbus/apbus_subr.c: revision 1.10
sys/arch/newsmips/apbus/apbusvar.h: revision 1.10
sys/arch/newsmips/conf/std.newsmips: revision 1.18

Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).

Should be pulled up to netbsd-8.
 1.6 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 02-Oct-2002  thorpej branches: 1.4.6;
Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 23-Dec-1999  tsubai branches: 1.2.6; 1.2.10; 1.2.14;
* Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2.14.1 18-Oct-2002  nathanw Catch up to -current.
 1.2.10.1 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.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.
 1.2.6.1 23-Dec-1999  bouyer file clock_ap.c was added on branch thorpej_scsipi on 2000-11-20 20:17:15 +0000
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.12 13-Jun-2008  cegger branches: 1.12.14;
use device_lookup_private to get softc
 1.11 20-Apr-2008  tsutsui branches: 1.11.2; 1.11.4; 1.11.6;
No need to check whole alldevs to search a specific dmac unit in dmac3_link().
 1.10 09-Apr-2008  tsutsui branches: 1.10.2;
Split device_t/softc, with misc cleanup.
 1.9 27-Aug-2006  tsutsui branches: 1.9.56;
Make sc_dmamap volatile for aggressive gcc4.
Also use uint32_t rather than int since it's unsigned.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 06-Feb-2005  tsutsui branches: 1.7.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.6 15-Jul-2003  lukem branches: 1.6.8; 1.6.10;
__KERNEL_RCSID()
 1.5 02-Apr-2003  thorpej branches: 1.5.2;
Use PAGE_SIZE rather than NBPG.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 14-Nov-2001  thorpej branches: 1.2.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.1 30-Oct-2000  tsubai branches: 1.1.2; 1.1.6; 1.1.8;
NEWS5000 internal SCSI driver.
 1.1.8.1 14-Nov-2001  shin compilation fix.
s/MachFlushDCache/mips_dcache_wbinv_range/
 1.1.6.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.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 30-Oct-2000  bouyer file dmac3.c was added on branch thorpej_scsipi on 2000-11-22 16:01:04 +0000
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 14-Nov-2001  nathanw file dmac3.c was added on branch nathanw_sa on 2002-10-18 02:39:09 +0000
 1.5.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.6.10.1 12-Feb-2005  yamt sync with head.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.6.1 30-Dec-2006  yamt sync with head.
 1.8.8.1 03-Sep-2006  yamt sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.56.2 29-Jun-2008  mjf Sync with HEAD.
 1.9.56.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.2.2 17-Jun-2008  yamt sync with head.
 1.10.2.1 18-May-2008  yamt sync with head.
 1.11.6.1 18-Jun-2008  simonb Sync with head.
 1.11.4.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.11.2.2 11-Mar-2010  yamt sync with head
 1.11.2.1 04-May-2009  yamt sync with head.
 1.12.14.1 26-Aug-2009  matt Fixup (all but mipsco) to deal the new realities in mipsland.
 1.3 09-Apr-2008  tsutsui Remove leftover stuff moved to dmac3var.h.
 1.2 09-Apr-2008  tsutsui Split device_t/softc, with misc cleanup.
 1.1 30-Oct-2000  tsubai branches: 1.1.2; 1.1.128;
NEWS5000 internal SCSI driver.
 1.1.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 30-Oct-2000  bouyer file dmac3reg.h was added on branch thorpej_scsipi on 2000-11-22 16:01:04 +0000
 1.1 09-Apr-2008  tsutsui branches: 1.1.8;
Split device_t/softc, with misc cleanup.
 1.1.8.2 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.1 09-Apr-2008  mjf file dmac3var.h was added on branch mjf-devfs2 on 2008-06-02 13:22:29 +0000
 1.56 05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.55 02-Sep-2023  andvar branches: 1.55.6;
newsmips/sn(4): rename SONIC_DEBUG to SNDEBUG for consistency.

nix this option from i386/amd64 ALL configs, it isn't used anywhere anymore.
 1.54 22-Aug-2023  andvar remove global sndebug definition. looks like historical leftover replaced
by SNDEBUG definition.
 1.53 22-Aug-2023  andvar newsmips: fix build with SNDEBUG option enabled.

It was broken since rev 1.21 24 years ago, and got more broken code later on:
remove leftover device_xname(sc->sc_dev) param from aprint_debug_dev in one block.
fix wrong method name devoce_xname to device_xname in second block.
rename et to eh for consistency, and define it (definition was removed in the past).
while here, improve the code with riastradh help to make it safer.

pullup to at least netbsd-10 is needed.
 1.52 18-Sep-2022  thorpej branches: 1.52.4;
Eliminate use of IFF_OACTIVE, take 2. (Not sure what happened there.)
 1.51 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.50 20-Aug-2022  thorpej snstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
 1.49 05-Feb-2020  martin Fix if_stats access.
 1.48 04-Feb-2020  skrll Trailing whitespace
 1.47 04-Feb-2020  skrll Adopt <net/if_stats.h>
 1.46 13-Sep-2019  msaitoh branches: 1.46.2;
if_flags is neither int nor short. It's unsigned short.
 1.45 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.44 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.43 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.42 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.41 26-Jun-2018  msaitoh branches: 1.41.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.40 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.39 29-Jul-2017  riastradh branches: 1.39.2;
Avoid memory leak in sonic_get.

If this is the first time around, top is null and nothing else will
free m.

From Ilja Van Sprundel.
 1.38 22-Feb-2017  nonaka branches: 1.38.6;
Apply deferred if_start to more MD drivers.
 1.37 15-Dec-2016  ozaki-r branches: 1.37.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.36 10-Jun-2016  ozaki-r branches: 1.36.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.35 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.34 13-Oct-2012  tsutsui branches: 1.34.12; 1.34.14; 1.34.16; 1.34.20;
Fix botch on device_t/softc split inside #ifdef SNDEBUG part. from chs@
 1.33 05-Apr-2010  joerg branches: 1.33.8; 1.33.14; 1.33.18; 1.33.20; 1.33.22;
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.32 19-Jan-2010  pooka branches: 1.32.2; 1.32.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.31 07-Nov-2008  dyoung *** 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.30 09-Apr-2008  tsutsui branches: 1.30.4; 1.30.10; 1.30.12;
Split device_t/softc, with misc cleanup.
 1.29 01-Jan-2008  he branches: 1.29.6;
Follow up the change to soackaddr_dl by using CLLADDR() and propagating
const to camentry().
 1.28 17-Oct-2007  garbled branches: 1.28.2; 1.28.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.27 24-Sep-2007  pooka nuke unused homegrown assert() definitions
 1.26 06-Sep-2007  he branches: 1.26.2;
Remove a now-unused local variable.
 1.25 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.24 17-Jun-2007  tsutsui branches: 1.24.4; 1.24.8; 1.24.10;
- add a declaration of apbus_wbflush() in apbusvar.h
- include <mips/locore.h> for mips3_wbflush()
- undef wbflush() macro before declaration of local inlined wbflush()
 1.23 08-Mar-2007  he branches: 1.23.2; 1.23.4; 1.23.10;
Cast to char* before doing pointer arithmetic.
Also put * close to variable name.
 1.22 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 07-Oct-2006  he branches: 1.21.4;
Make this actually build again -- cast addresses to int before
doing arithmetic on them, such as roundup().
 1.20 04-Oct-2006  christos don't use home-grown round macros
 1.19 24-Dec-2005  perry branches: 1.19.20; 1.19.22;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.18 11-Dec-2005  christos merge ktrace-lwp.
 1.17 22-May-2005  christos branches: 1.17.2;
No 0x in front of %p...
 1.16 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.15 30-Oct-2004  thorpej branches: 1.15.4; 1.15.6;
When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.14 15-Jul-2003  lukem branches: 1.14.4;
__KERNEL_RCSID()
 1.13 19-Apr-2003  tsutsui branches: 1.13.2;
TAB/space cleanup.
 1.12 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.11 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.10 16-Jan-2002  thorpej Use bpf_mtap().
 1.9 22-Jul-2001  wiz branches: 1.9.6;
seperate -> separate
 1.8 19-Jun-2001  wiz branches: 1.8.2;
`accessible' only has one `a'.
 1.7 15-Nov-2000  thorpej branches: 1.7.2; 1.7.4;
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.6 12-Oct-2000  onoe change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
 1.5 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.4 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.3 30-May-2000  tsubai Insert delay() in busy wait.
 1.2 22-Dec-1999  tsubai branches: 1.2.2;
Remove unnecessary debugging code. (not intended to commit)
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.7.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.
 1.7.2.1 15-Nov-2000  bouyer file if_sn.c was added on branch thorpej_scsipi on 2000-11-20 20:17:15 +0000
 1.8.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.8.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.8.2.1 03-Aug-2001  lukem update to -current
 1.9.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.9.6.1 22-Jul-2001  nathanw file if_sn.c was added on branch nathanw_sa on 2002-02-28 04:11:16 +0000
 1.13.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.5 06-Feb-2005  skrll Sync with HEAD.
 1.13.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.4.1 24-Jan-2005  he Pull up revision 1.15 (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.15.6.1 12-Feb-2005  yamt sync with head.
 1.15.4.1 29-Apr-2005  kent sync with -current
 1.17.2.5 21-Jan-2008  yamt sync with head
 1.17.2.4 27-Oct-2007  yamt sync with head.
 1.17.2.3 03-Sep-2007  yamt sync with head.
 1.17.2.2 30-Dec-2006  yamt sync with head.
 1.17.2.1 21-Jun-2006  yamt sync with head.
 1.19.22.1 22-Oct-2006  yamt sync with head
 1.19.20.1 18-Nov-2006  ad Sync with head.
 1.21.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.10.2 03-Oct-2007  garbled Sync with HEAD
 1.23.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.23.4.1 11-Jul-2007  mjf Sync with head.
 1.23.2.2 09-Oct-2007  ad Sync with head.
 1.23.2.1 15-Jul-2007  ad Sync with head.
 1.24.10.2 09-Jan-2008  matt sync with HEAD
 1.24.10.1 06-Nov-2007  matt sync with HEAD
 1.24.8.2 02-Oct-2007  joerg Sync with HEAD.
 1.24.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.24.4.2 10-Sep-2007  skrll Sync with HEAD.
 1.24.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.26.2.1 07-Oct-2007  yamt sync with head.
 1.28.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.28.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.29.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.29.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.30.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.30.4.3 11-Aug-2010  yamt sync with head.
 1.30.4.2 11-Mar-2010  yamt sync with head
 1.30.4.1 04-May-2009  yamt sync with head.
 1.32.4.1 30-May-2010  rmind sync with head
 1.32.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.33.22.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1471):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.33.20.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1471):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.33.18.2 03-Dec-2017  jdolecek update from HEAD
 1.33.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.33.14.1 12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1471):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.33.8.1 30-Oct-2012  yamt sync with head
 1.34.20.1 11-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1467):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.34.16.1 11-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1467):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.34.14.4 28-Aug-2017  skrll Sync with HEAD
 1.34.14.3 05-Feb-2017  skrll Sync with HEAD
 1.34.14.2 09-Jul-2016  skrll Sync with HEAD
 1.34.14.1 19-Mar-2016  skrll Sync with HEAD
 1.34.12.1 11-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1467):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.36.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.36.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.37.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.38.6.2 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.38.6.1 05-Aug-2017  snj Pull up following revision(s) (requested by spz in ticket #180):
sys/arch/newsmips/apbus/if_sn.c: revision 1.39
Avoid memory leak in sonic_get.
If this is the first time around, top is null and nothing else will
free m.
From Ilja Van Sprundel.
 1.39.2.4 20-Oct-2018  pgoyette Sync with head
 1.39.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.39.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.39.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.41.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.41.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.41.2.1 10-Jun-2019  christos Sync with HEAD
 1.46.2.1 29-Feb-2020  ad Sync with head.
 1.52.4.1 02-Sep-2023  martin Pull up following revision(s) (requested by andvar in ticket #341):

sys/arch/newsmips/apbus/if_sn.c: revision 1.53

newsmips: fix build with SNDEBUG option enabled.

It was broken since rev 1.21 24 years ago, and got more broken code later on:
remove leftover device_xname(sc->sc_dev) param from aprint_debug_dev
in one block.
fix wrong method name devoce_xname to device_xname in second block.
rename et to eh for consistency, and define it (definition was removed
in the past).
while here, improve the code with riastradh help to make it safer.
 1.55.6.1 02-Aug-2025  perseant Sync with HEAD
 1.13 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.12 30-Sep-2018  tsutsui Avoid reference of APbus workarea that can't be read via kvm(3).
 1.11 09-Apr-2008  tsutsui branches: 1.11.90; 1.11.92;
Split device_t/softc, with misc cleanup.
 1.10 08-Mar-2007  he branches: 1.10.40;
Cast to char* before doing pointer arithmetic.
Also put * close to variable name.
 1.9 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8 11-Dec-2005  christos branches: 1.8.26;
merge ktrace-lwp.
 1.7 06-Feb-2005  tsutsui branches: 1.7.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.6 15-Jul-2003  lukem branches: 1.6.8; 1.6.10;
__KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 12-Oct-2000  onoe branches: 1.3.2; 1.3.6; 1.3.10;
use macro to access interrupt mask register.
 1.2 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.3.10.1 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.1 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.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.
 1.3.2.1 12-Oct-2000  bouyer file if_sn_ap.c was added on branch thorpej_scsipi on 2000-11-20 20:17:16 +0000
 1.5.6.4 06-Feb-2005  skrll Sync with HEAD.
 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.10.1 12-Feb-2005  yamt sync with head.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.6.1 03-Sep-2007  yamt sync with head.
 1.8.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.92.1 10-Jun-2019  christos Sync with HEAD
 1.11.90.1 20-Oct-2018  pgoyette Sync with head
 1.2 02-Feb-2024  andvar fix various typos in comments.
 1.1 22-Dec-1999  tsubai branches: 1.1.6;
First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 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.
 1.1.6.1 22-Dec-1999  bouyer file if_snreg.h was added on branch thorpej_scsipi on 2000-11-20 20:17:16 +0000
 1.15 10-Nov-2021  msaitoh s/endianess/endianness/
 1.14 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.13 20-Feb-2011  matt branches: 1.13.54; 1.13.56;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.12 09-Apr-2008  tsutsui branches: 1.12.22; 1.12.26; 1.12.32; 1.12.34;
Split device_t/softc, with misc cleanup.
 1.11 17-Oct-2007  garbled branches: 1.11.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.10 17-Jun-2007  tsutsui branches: 1.10.10;
- add a declaration of apbus_wbflush() in apbusvar.h
- include <mips/locore.h> for mips3_wbflush()
- undef wbflush() macro before declaration of local inlined wbflush()
 1.9 08-Mar-2007  he branches: 1.9.2; 1.9.4; 1.9.10;
Cast to char* before doing pointer arithmetic.
Also put * close to variable name.
 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 11-Dec-2005  christos merge ktrace-lwp.
 1.5 06-Feb-2005  tsutsui branches: 1.5.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.4 02-Dec-2003  tsutsui branches: 1.4.8; 1.4.10;
Declare sc_regbase as volatile, so that if_sn.c works with gcc3.

XXX We should switch to MI SONIC driver.
 1.3 03-Dec-2000  matt branches: 1.3.24;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.2 12-Oct-2000  onoe branches: 1.2.2;
change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2.2.3 08-Dec-2000  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.
 1.2.2.1 12-Oct-2000  bouyer file if_snvar.h was added on branch thorpej_scsipi on 2000-11-20 20:17:16 +0000
 1.3.24.4 06-Feb-2005  skrll Sync with HEAD.
 1.3.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.24.1 03-Aug-2004  skrll Sync with HEAD
 1.4.10.1 12-Feb-2005  yamt sync with head.
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.5.6.2 03-Sep-2007  yamt sync with head.
 1.5.6.1 21-Jun-2006  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.9.4.1 11-Jul-2007  mjf Sync with head.
 1.9.2.1 15-Jul-2007  ad Sync with head.
 1.10.10.1 06-Nov-2007  matt sync with HEAD
 1.11.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.34.1 05-Mar-2011  bouyer Sync with HEAD
 1.12.32.1 06-Jun-2011  jruoho Sync with HEAD.
 1.12.26.1 05-Mar-2011  rmind sync with head
 1.12.22.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.13.56.1 10-Jun-2019  christos Sync with HEAD
 1.13.54.1 20-Oct-2018  pgoyette Sync with head
 1.16 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.15 29-May-2019  msaitoh No functional change:
- Simplify MII structure initialization and reference.
- KNF
 1.14 30-Sep-2018  tsutsui Avoid reference of APbus workarea that can't be read via kvm(3).
 1.13 15-Jul-2011  he branches: 1.13.52; 1.13.54;
Track the changes to tulipvar.h -- use the recently introduced
tlp_chip_name() to get the chip name for aprint output.
 1.12 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.11 17-Apr-2009  tsutsui branches: 1.11.4; 1.11.6; 1.11.8;
Split device_t/softc, use aprint_*().
 1.10 28-Apr-2008  martin branches: 1.10.8; 1.10.14; 1.10.18;
Remove clause 3 and 4 from TNF licenses
 1.9 11-Dec-2005  christos branches: 1.9.74; 1.9.76; 1.9.78;
merge ktrace-lwp.
 1.8 17-Jul-2005  he Make tlp_idle() not be static, so that the newsmips version of the
driver can access that function again.

Approved by thorpej
 1.7 06-Feb-2005  tsutsui branches: 1.7.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.6 15-Jul-2003  lukem branches: 1.6.8; 1.6.10;
__KERNEL_RCSID()
 1.5 03-May-2003  wiz branches: 1.5.2;
DMA, not dma nor Dma.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 14-Nov-2001  thorpej branches: 1.2.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.1 12-Oct-2000  onoe branches: 1.1.2; 1.1.6; 1.1.8;
Tulip driver for NWB-5852A, which is an APbus board with DEC-21140A chip.
without MII. It supports 100BaseTX only. Half duplex/Full duplex can
be specified manually, but there are no auto negotiation functionality.

XXX: It takes 34 seconds before sending/receiving packets on the wire
after initial setup. It is obviously a bug because the board
just works fine on NEWS-OS, but I cannot find what's wrong...
Once it starts working, it seems there are no problems.
 1.1.8.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.1.6.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.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 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.
 1.1.2.1 12-Oct-2000  bouyer file if_tlp_ap.c was added on branch thorpej_scsipi on 2000-11-20 20:17:17 +0000
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 14-Nov-2001  nathanw file if_tlp_ap.c was added on branch nathanw_sa on 2002-10-18 02:39:10 +0000
 1.5.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.6.10.1 12-Feb-2005  yamt sync with head.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.6.1 21-Jun-2006  yamt sync with head.
 1.9.78.2 04-May-2009  yamt sync with head.
 1.9.78.1 16-May-2008  yamt sync with head.
 1.9.76.1 18-May-2008  yamt sync with head.
 1.9.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.18.1 20-Jan-2010  matt Adjust things to the new world order.
 1.10.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.11.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.4.1 05-Mar-2011  rmind sync with head
 1.13.54.1 10-Jun-2019  christos Sync with HEAD
 1.13.52.1 20-Oct-2018  pgoyette Sync with head
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 14-Oct-2018  tsutsui branches: 1.12.14;
Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.11 30-Sep-2018  tsutsui Avoid reference of APbus workarea that can't be read via kvm(3).
 1.10 13-Oct-2012  tsutsui branches: 1.10.36; 1.10.38;
struct device * -> device_t, use device_xname() (from chs@)
 1.9 09-Apr-2008  tsutsui branches: 1.9.38; 1.9.48;
Split device_t/softc, with misc cleanup.
 1.8 04-Mar-2007  christos branches: 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 06-Feb-2005  tsutsui branches: 1.6.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.5 15-Jul-2003  lukem branches: 1.5.8; 1.5.10;
__KERNEL_RCSID()
 1.4 02-Oct-2002  thorpej branches: 1.4.6;
Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 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.1 15-Nov-2000  tsubai branches: 1.1.2; 1.1.6; 1.1.10;
Keyboard and mouse support for news5000.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.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.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 15-Nov-2000  bouyer file kb_ap.c was added on branch thorpej_scsipi on 2000-11-22 16:01:05 +0000
 1.4.6.5 06-Feb-2005  skrll Sync with HEAD.
 1.4.6.4 27-Jan-2005  skrll Adapt to branch.
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.10.1 12-Feb-2005  yamt sync with head.
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.6.6.2 03-Sep-2007  yamt sync with head.
 1.6.6.1 21-Jun-2006  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.38.1 30-Oct-2012  yamt sync with head
 1.10.38.1 10-Jun-2019  christos Sync with HEAD
 1.10.36.1 20-Oct-2018  pgoyette Sync with head
 1.12.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.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 29-Mar-2008  tsutsui branches: 1.8.2; 1.8.4;
Fix typo.
 1.7 29-Mar-2008  tsutsui Don't forget to initialize sc_dev.
 1.6 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.5 10-Jan-2008  tsutsui branches: 1.5.6;
- move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.56; 1.4.64;
merge ktrace-lwp.
 1.3 06-Feb-2005  tsutsui branches: 1.3.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.2 01-Nov-2003  tsutsui branches: 1.2.4; 1.2.10; 1.2.12;
Adapt MI mk48txx(4) changes. Tested on NWS-3470D (hb) and NWS-5000X (apbus).
 1.1 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.2.12.1 12-Feb-2005  yamt sync with head.
 1.2.10.1 29-Apr-2005  kent sync with -current
 1.2.4.5 06-Feb-2005  skrll Sync with HEAD.
 1.2.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2 03-Aug-2004  skrll Sync with HEAD
 1.2.4.1 01-Nov-2003  skrll file mkclock_ap.c was added on branch ktrace-lwp on 2004-08-03 10:38:28 +0000
 1.3.6.1 21-Jan-2008  yamt sync with head
 1.4.64.1 10-Jan-2008  bouyer Sync with HEAD
 1.4.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.50.1 23-Mar-2008  matt sync with HEAD
 1.5.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.5.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.8.4.1 16-May-2008  yamt sync with head.
 1.8.2.1 18-May-2008  yamt sync with head.
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 30-Sep-2018  tsutsui branches: 1.12.14;
Avoid reference of APbus workarea that can't be read via kvm(3).
 1.11 13-Oct-2012  tsutsui branches: 1.11.36; 1.11.38;
struct device * -> device_t, use device_xname() (from chs@)
 1.10 09-Apr-2008  tsutsui branches: 1.10.38; 1.10.48;
Split device_t/softc, with misc cleanup.
 1.9 04-Mar-2007  christos branches: 1.9.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8 12-Nov-2006  plunky branches: 1.8.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.7 11-Dec-2005  christos branches: 1.7.20; 1.7.22;
merge ktrace-lwp.
 1.6 06-Feb-2005  tsutsui branches: 1.6.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.5 15-Jul-2003  lukem branches: 1.5.8; 1.5.10;
__KERNEL_RCSID()
 1.4 02-Oct-2002  thorpej branches: 1.4.6;
Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 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.1 15-Nov-2000  tsubai branches: 1.1.2; 1.1.6; 1.1.10;
Keyboard and mouse support for news5000.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.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.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 15-Nov-2000  bouyer file ms_ap.c was added on branch thorpej_scsipi on 2000-11-22 16:01:05 +0000
 1.4.6.5 06-Feb-2005  skrll Sync with HEAD.
 1.4.6.4 27-Jan-2005  skrll Adapt to branch.
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.10.1 12-Feb-2005  yamt sync with head.
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.6.6.3 03-Sep-2007  yamt sync with head.
 1.6.6.2 30-Dec-2006  yamt sync with head.
 1.6.6.1 21-Jun-2006  yamt sync with head.
 1.7.22.1 10-Dec-2006  yamt sync with head.
 1.7.20.1 18-Nov-2006  ad Sync with head.
 1.8.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.38.1 30-Oct-2012  yamt sync with head
 1.11.38.1 10-Jun-2019  christos Sync with HEAD
 1.11.36.1 20-Oct-2018  pgoyette Sync with head
 1.12.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.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 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 14-Oct-2018  tsutsui branches: 1.20.14;
Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.19 30-Sep-2018  tsutsui Avoid reference of APbus workarea that can't be read via kvm(3).
 1.18 31-Mar-2017  msaitoh branches: 1.18.12; 1.18.14;
Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) with
snprintb(3) (in between NetBSD 5 and 6). Old bitmask_snprint(9) didn't add
0x" automatically for hexadecimal value, so old code used it with "0x%s".
 1.17 16-Dec-2008  christos branches: 1.17.24; 1.17.42; 1.17.46; 1.17.50;
replace bitmask_snprintf(9) with snprintb(3)
 1.16 09-Apr-2008  tsutsui branches: 1.16.4; 1.16.12;
Split device_t/softc, with misc cleanup.
 1.15 28-Feb-2007  thorpej branches: 1.15.40;
TRUE -> true, FALSE -> false
 1.14 11-Dec-2005  christos branches: 1.14.26;
merge ktrace-lwp.
 1.13 06-Feb-2005  tsutsui branches: 1.13.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.12 07-Dec-2004  thorpej branches: 1.12.2; 1.12.4;
Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 03-May-2003  wiz branches: 1.10.2;
DMA, not dma nor Dma.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 06-Mar-2002  tsutsui Set correct count in spifi_read_count().
 1.5 04-Oct-2001  wiz branches: 1.5.4;
Give `spurious' all the `u's it needs.
 1.4 26-Jul-2001  tsubai branches: 1.4.2;
Avoid panic when polling is used.
 1.3 26-Apr-2001  tsubai branches: 1.3.2;
Cosmetic changes.
 1.2 25-Apr-2001  bouyer 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.1 30-Oct-2000  tsubai branches: 1.1.2; 1.1.4;
NEWS5000 internal SCSI driver.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.4 29-Mar-2001  bouyer Pass compile-test on i386
 1.1.2.3 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 30-Oct-2000  bouyer file spifi.c was added on branch thorpej_scsipi on 2000-11-22 16:01:06 +0000
 1.3.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.3.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.4.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.5.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.4.1 04-Oct-2001  nathanw file spifi.c was added on branch nathanw_sa on 2002-04-01 07:41:39 +0000
 1.10.2.5 06-Feb-2005  skrll Sync with HEAD.
 1.10.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.4.1 12-Feb-2005  yamt sync with head.
 1.12.2.1 29-Apr-2005  kent sync with -current
 1.13.6.1 03-Sep-2007  yamt sync with head.
 1.14.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.15.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.16.4.1 04-May-2009  yamt sync with head.
 1.17.50.1 21-Apr-2017  bouyer Sync with HEAD
 1.17.46.1 26-Apr-2017  pgoyette Sync with HEAD
 1.17.42.1 28-Aug-2017  skrll Sync with HEAD
 1.17.24.1 03-Dec-2017  jdolecek update from HEAD
 1.18.14.1 10-Jun-2019  christos Sync with HEAD
 1.18.12.1 20-Oct-2018  pgoyette Sync with head
 1.20.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.21.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 27-Aug-2006  tsutsui Use uint32_t rather than int for spifi registers.
 1.1 30-Oct-2000  tsubai branches: 1.1.2; 1.1.42; 1.1.56; 1.1.60;
NEWS5000 internal SCSI driver.
 1.1.60.1 03-Sep-2006  yamt sync with head.
 1.1.56.1 09-Sep-2006  rpaulo sync with head
 1.1.42.1 30-Dec-2006  yamt sync with head.
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 30-Oct-2000  bouyer file spifireg.h was added on branch thorpej_scsipi on 2000-11-22 16:01:06 +0000
 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 21-Nov-2020  thorpej branches: 1.19.2;
malloc(9) -> kmem(9)
 1.18 21-Jul-2016  christos branches: 1.18.28;
Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c
 1.17 31-Jan-2014  tsutsui branches: 1.17.6; 1.17.10;
Add WSDISPLAYIO_LINEBYTES ioctl (for Xorg wsfb driver).
 1.16 15-May-2010  tsutsui branches: 1.16.8; 1.16.18; 1.16.22;
Set RI_NO_AUTO in ri_flg if init functions are invoked from cnattach.
Tested on NWS-3470D. xafb.c for NWS-5000 is untested.

XXX: isn't it better to have failsafe default than sprinkle RI_NO_AUTO
XXX: to avoid fatal silent hangup?
 1.15 09-Apr-2008  tsutsui branches: 1.15.4; 1.15.24; 1.15.26;
Split device_t/softc, with misc cleanup.
 1.14 04-Mar-2007  christos branches: 1.14.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 12-Apr-2006  jmmv branches: 1.13.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.12 24-Dec-2005  perry branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 03-Jun-2005  tsutsui branches: 1.10.2;
Appease gcc -Wcast-qual.
 1.9 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.8 01-Aug-2004  uch branches: 1.8.4; 1.8.6;
add NEWSMIPS_WSDISPLAYIO_GINFO ioctl to get frame buffer stride.
 1.7 13-Nov-2003  chs eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.2 17-Mar-2002  atatat branches: 1.2.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.1 06-Nov-2000  tsubai branches: 1.1.2; 1.1.6; 1.1.10;
"xa" frame buffer driver.
 1.1.10.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.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.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 06-Nov-2000  bouyer file xafb.c was added on branch thorpej_scsipi on 2000-11-22 16:01:06 +0000
 1.2.4.1 16-Jul-2002  gehenna catch up with -current.
 1.5.6.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.6.6 06-Feb-2005  skrll Sync with HEAD.
 1.5.6.5 27-Jan-2005  skrll Adapt to branch.
 1.5.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.2 05-Aug-2004  skrll Fix some merge mistakes.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.6.1 12-Feb-2005  yamt sync with head.
 1.8.4.1 29-Apr-2005  kent sync with -current
 1.10.2.2 03-Sep-2007  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.12.8.1 24-May-2006  yamt sync with head.
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.26.1 30-May-2010  rmind sync with head
 1.15.24.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.4.1 11-Aug-2010  yamt sync with head.
 1.16.22.1 18-May-2014  rmind sync with head
 1.16.18.2 03-Dec-2017  jdolecek update from HEAD
 1.16.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.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.17.10.1 26-Jul-2016  pgoyette Sync with HEAD
 1.17.6.1 05-Oct-2016  skrll Sync with HEAD
 1.18.28.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.19.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.32 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.31 24-Apr-2021  thorpej branches: 1.31.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.30 19-Oct-2018  tsutsui branches: 1.30.14;
Reorganize APbus zs(4) console handling.

- set sccport0a address on early startup and use it for cnputc and cngetc
- explicitly initialize zs chip in the cninit function so that zs console
can be used even if it is not initialized by PROM firmware

Tested on both news50000 and news4000.
 1.29 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.28 30-Sep-2018  tsutsui Avoid reference of APbus workarea that can't be read via kvm(3).
 1.27 26-Jun-2010  tsutsui branches: 1.27.58; 1.27.60;
Um, fix botch in previous.
 1.26 26-Jun-2010  tsutsui Pull a similar fix from sparc/dev/zs.c rev 1.119:
Establish interrupt handlers with proper softc per each zs device
rather than sharing them among all zs devices and searching softc
in handlers, to avoid possible recursive lock.
 1.25 28-Apr-2008  martin branches: 1.25.20; 1.25.22;
Remove clause 3 and 4 from TNF licenses
 1.24 29-Mar-2008  tsutsui branches: 1.24.2; 1.24.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.23 26-Nov-2007  ad branches: 1.23.14;
Use the softint API.
 1.22 09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.21 08-Mar-2007  he branches: 1.21.2; 1.21.18; 1.21.20; 1.21.24; 1.21.26;
Cast to char* before doing pointer arithmetic.
 1.20 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19 28-Mar-2006  thorpej branches: 1.19.14;
Use device_unit().
 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 06-Feb-2005  tsutsui branches: 1.17.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.16 15-Jul-2003  lukem branches: 1.16.8; 1.16.10;
__KERNEL_RCSID()
 1.15 25-May-2003  tsutsui branches: 1.15.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.14 09-May-2003  tsutsui Remove bogus comments.
 1.13 26-Apr-2003  tsutsui - Move some common declarations into z8530var.h.
- Fix struct consdev properly.
- Remove register declarations.
- some more KNF.
 1.12 19-Apr-2003  tsutsui TAB/space cleanup.
 1.11 11-Feb-2003  tsutsui Backout previous. <sys/lock.h> is pulled from <sys/tty.h>.
 1.10 10-Feb-2003  tsutsui MI z8530sc driver now requires <sys/lock.h>.
 1.9 28-Jan-2003  pk Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.8 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 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.5 12-Oct-2000  onoe branches: 1.5.2; 1.5.6; 1.5.10; 1.5.18;
change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
 1.4 06-Mar-2000  thorpej - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
 1.3 26-Dec-1999  tsubai Use software interrupt.
 1.2 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.5.18.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.5.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.5.10.1 17-Sep-2002  nathanw Catch up to -current.
 1.5.6.1 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.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.
 1.5.2.1 12-Oct-2000  bouyer file zs_ap.c was added on branch thorpej_scsipi on 2000-11-20 20:17:17 +0000
 1.15.2.4 06-Feb-2005  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.16.10.1 12-Feb-2005  yamt sync with head.
 1.16.8.1 29-Apr-2005  kent sync with -current
 1.17.6.4 07-Dec-2007  yamt sync with head
 1.17.6.3 15-Nov-2007  yamt sync with head.
 1.17.6.2 03-Sep-2007  yamt sync with head.
 1.17.6.1 21-Jun-2006  yamt sync with head.
 1.18.12.1 31-Mar-2006  tron Merge 2006-03-31 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 01-Apr-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.21.26.2 08-Dec-2007  mjf Sync with HEAD.
 1.21.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.21.24.1 13-Nov-2007  bouyer Sync with HEAD
 1.21.20.1 09-Jan-2008  matt sync with HEAD
 1.21.18.2 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.21.18.1 11-Nov-2007  joerg Sync with HEAD.
 1.21.2.1 03-Dec-2007  ad Sync with HEAD.
 1.23.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.23.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.24.4.2 11-Aug-2010  yamt sync with head.
 1.24.4.1 16-May-2008  yamt sync with head.
 1.24.2.1 18-May-2008  yamt sync with head.
 1.25.22.1 03-Jul-2010  rmind sync with head
 1.25.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.27.60.1 10-Jun-2019  christos Sync with HEAD
 1.27.58.1 20-Oct-2018  pgoyette Sync with head
 1.30.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.31.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 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.1 19-Feb-1998  thorpej branches: 1.1.32;
Make sure the compile directory is always there.
 1.1.32.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 21:12:22 +0000
 1.37 28-Oct-2023  tsutsui Specify -fno-unwind-tables to shrink kernel binaries.
 1.36 28-Oct-2023  tsutsui Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.
 1.35 01-Aug-2018  maxv branches: 1.35.4; 1.35.30;
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.34 14-Sep-2017  mrg branches: 1.34.2; 1.34.4;
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.33 21-Aug-2015  uebayasi 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.32 23-Aug-2014  dholland branches: 1.32.2;
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.31 20-Jul-2014  alnsn Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.30 17-Aug-2012  abs branches: 1.30.2; 1.30.12;
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.29 22-Nov-2011  tls 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.28 08-May-2010  mrg branches: 1.28.8;
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.27 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.26 17-Oct-2007  garbled branches: 1.26.20; 1.26.40; 1.26.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.25 18-Jul-2007  tsutsui branches: 1.25.6;
Add options COMPAT_40.
 1.24 27-Sep-2006  manu branches: 1.24.8; 1.24.16; 1.24.20; 1.24.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.23 26-Aug-2006  christos branches: 1.23.2; 1.23.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.22 05-Feb-2006  cube branches: 1.22.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.21 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.20 07-Dec-2005  tsutsui branches: 1.20.2; 1.20.4; 1.20.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.19 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.18 19-Aug-2005  christos 64 bit inode changes.
 1.17 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.16 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.15 18-Feb-2005  dsl branches: 1.15.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.14 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.13 21-Jan-2005  tsutsui branches: 1.13.2;
Add options COMPAT_20.
 1.12 10-Nov-2004  christos branches: 1.12.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.11 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.10 15-Mar-2004  rafal branches: 1.10.2;
Remove references to no-longer-existing options (MIPS3_L2CACHE_PRESENT and
MIPS3_5200).
 1.9 25-Oct-2003  simonb Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
 1.8 18-Sep-2002  lukem branches: 1.8.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.7 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.6 25-Apr-2002  atatat branches: 1.6.2; 1.6.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.5 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.4 27-Nov-2000  soren branches: 1.4.4; 1.4.8;
Removed increased BUFCACHE/BUFPAGES.
 1.3 15-Nov-2000  tsubai branches: 1.3.2;
Screen console works now.
 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 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.3.2.4 08-Dec-2000  bouyer Sync with HEAD.
 1.3.2.3 22-Nov-2000  bouyer Sync with HEAD.
 1.3.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.
 1.3.2.1 15-Nov-2000  bouyer file DEJIKO was added on branch thorpej_scsipi on 2000-11-20 20:17:17 +0000
 1.4.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.1 17-Apr-2002  nathanw Catch up to -current.
 1.4.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.4.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.4.1 01-Aug-2002  lukem Pull up revision 1.7 (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.6.2.1 15-Jul-2002  gehenna catch up with -current.
 1.8.6.9 11-Dec-2005  christos Sync with head.
 1.8.6.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.6.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.8.6.6 04-Feb-2005  skrll Sync with HEAD.
 1.8.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.8.6.4 14-Nov-2004  skrll Sync with HEAD.
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.2.1 15-Jul-2004  he Pull up revision 1.11 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.12.4.1 29-Apr-2005  kent sync with -current
 1.13.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.2.1 12-Feb-2005  yamt sync with head.
 1.15.6.3 03-Sep-2007  yamt sync with head.
 1.15.6.2 30-Dec-2006  yamt sync with head.
 1.15.6.1 21-Jun-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.20.2.1 18-Feb-2006  yamt sync with head.
 1.22.2.1 03-Sep-2006  yamt sync with head.
 1.23.4.1 22-Oct-2006  yamt sync with head
 1.23.2.1 18-Nov-2006  ad Sync with head.
 1.24.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.24.20.1 07-Aug-2007  matt Sync with HEAD.
 1.24.16.1 03-Oct-2007  garbled Sync with HEAD
 1.24.8.1 20-Aug-2007  ad Sync with HEAD.
 1.25.6.1 06-Nov-2007  matt sync with HEAD
 1.26.42.1 30-May-2010  rmind sync with head
 1.26.40.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.26.40.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.26.20.1 11-Aug-2010  yamt sync with head.
 1.28.8.2 30-Oct-2012  yamt sync with head
 1.28.8.1 17-Apr-2012  yamt sync with head
 1.30.12.1 10-Aug-2014  tls Rebase.
 1.30.2.2 03-Dec-2017  jdolecek update from HEAD
 1.30.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.2.1 22-Sep-2015  skrll Sync with HEAD
 1.34.4.1 10-Jun-2019  christos Sync with HEAD
 1.34.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.35.30.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #457):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/GENERIC: revision 1.145
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/WAPIKO: revision 1.51
sys/arch/newsmips/conf/INSTALL: revision 1.48
sys/arch/newsmips/conf/DEJIKO: revision 1.36
sys/arch/newsmips/conf/DEJIKO: revision 1.37

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.

Specify -fno-unwind-tables to shrink kernel binaries.
 1.35.4.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1759):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/DEJIKO: revision 1.36

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.
 1.146 04-Nov-2023  tsutsui Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)
Also add proper initialization on consinit() in NMB-253 case.

Worth to pull up to netbsd-10 and netbsd-9.
 1.145 28-Oct-2023  tsutsui Specify -fno-unwind-tables to shrink kernel binaries.
 1.144 28-Oct-2023  tsutsui Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.
 1.143 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.142 29-Sep-2022  riastradh branches: 1.142.4;
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.141 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.140 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.139 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.138 19-Jan-2020  thorpej Remove the strip(4) - Starmode Radio IP - pseudo-device driver. It is
long since obsolete.
 1.137 26-Apr-2019  sevan branches: 1.137.2; 1.137.4;
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.136 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.135 30-Sep-2018  tsutsui Enable DHCP boot for modern servers rather than ancient BOOTPARAM.
 1.134 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.133 23-Jan-2018  sevan branches: 1.133.2; 1.133.4;
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 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.131 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.130 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.129 16-Nov-2014  manu branches: 1.129.2; 1.129.12;
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 20-Jul-2014  alnsn branches: 1.125.2;
Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.124 30-Jun-2013  rmind branches: 1.124.4;
G/C PFIL_HOOKS from the kernel configs.
 1.123 05-Jun-2013  christos branches: 1.123.2;
remove obsolete networking options
 1.122 27-Apr-2013  christos the bogus number police
 1.121 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.120 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.119 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.118 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.117 17-Aug-2012  abs branches: 1.117.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.116 10-Mar-2012  joerg P1003_1B_SEMAPHORE is no longer optional.
 1.115 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.114 22-Nov-2011  tls branches: 1.114.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.113 30-Jun-2011  wiz branches: 1.113.2;
dependant -> dependent
 1.112 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.111 29-Apr-2010  chs branches: 1.111.2; 1.111.4;
enable TMPFS in all GENERICs that have MFS enabled.
 1.110 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.109 05-Dec-2009  pooka branches: 1.109.2; 1.109.4;
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.108 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.107 24-Jan-2009  mrg add COMPAT_50 to all the configs with COMPAT_40.
 1.106 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.104 10-Aug-2008  tls branches: 1.104.2;
Add accept filters to GENERIC kernels where they exist.
 1.103 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.102 31-Dec-2007  ad branches: 1.102.6; 1.102.10; 1.102.12; 1.102.16;
Remove systrace. Ok core@.
 1.101 04-Nov-2007  xtraeme branches: 1.101.2; 1.101.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.100 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.99 18-Jul-2007  tsutsui branches: 1.99.4; 1.99.6; 1.99.10;
Add options COMPAT_40.
 1.98 04-Jun-2007  martin branches: 1.98.2; 1.98.4;
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.97 11-Nov-2006  jmmv branches: 1.97.2; 1.97.8; 1.97.10; 1.97.16; 1.97.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.96 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.95 26-Aug-2006  christos branches: 1.95.2; 1.95.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.94 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.93 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.92 28-Jun-2006  liamjfoy branches: 1.92.2;
Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.91 28-Mar-2006  pavel branches: 1.91.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.90 05-Feb-2006  cube branches: 1.90.2; 1.90.4; 1.90.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.89 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.88 02-Feb-2006  reinoud branches: 1.88.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.87 09-Dec-2005  elad branches: 1.87.2; 1.87.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.86 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.85 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.84 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.83 19-Aug-2005  christos 64 bit inode changes.
 1.82 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.81 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.80 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.79 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.78 25-Jun-2005  rpaulo branches: 1.78.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.77 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.76 18-Feb-2005  dsl branches: 1.76.4;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.75 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.74 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.73 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.72 21-Jan-2005  tsutsui branches: 1.72.2;
Add options COMPAT_20.
 1.71 17-Jan-2005  cube 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.70 10-Nov-2004  christos branches: 1.70.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.69 04-Sep-2004  manu IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
 1.68 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.67 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.66 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.65 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.64 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.63 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.62 25-Oct-2003  tsutsui branches: 1.62.2;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.61 24-Oct-2003  tsutsui Add options COMPAT_16.
 1.60 21-May-2003  tsutsui branches: 1.60.2;
- Add some comments about hyper-bus and apbus devices.
- Sort some device entries.
- Use options<sparc><tab>
 1.59 10-May-2003  tsutsui Use wildcard for scsibus at sc0.
 1.58 26-Apr-2003  ragge Add pseudo-device ksyms.
 1.57 19-Apr-2003  tsutsui Enable options NTP, DDB and SCSIVERBOSE.
 1.56 10-Apr-2003  christos Bye Bye UCONSOLE
 1.55 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.54 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.53 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.52 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.51 25-Sep-2002  martti Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK"
 1.50 20-Sep-2002  martti Added (commented out) IPFILTER_DEFAULT_BLOCK.
 1.49 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.48 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.47 25-Apr-2002  atatat branches: 1.47.2; 1.47.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.46 14-Apr-2002  tsutsui Enable spifi SCSI.
 1.45 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.44 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.43 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.42 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.41 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.40 23-Nov-2001  atatat The bridge(4) pseudo-device no longer requires the port to
__HAVE_GENERIC_SOFT_INTERRUPTS, so add it back to all GENERIC configs.
 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 01-Sep-2001  atatat branches: 1.38.6;
Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS. bridge(4) doesn't compile there.
 1.37 01-Sep-2001  atatat Add bridge pseudo devices to GENERIC configs
 1.36 08-Jul-2001  abs branches: 1.36.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.35 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.34 19-Dec-2000  bouyer Add pseudo-device vlan
 1.33 15-Nov-2000  tsubai Screen console works now.
 1.32 13-Nov-2000  tsubai Switch to wscons.
 1.31 30-Oct-2000  tsubai Add dmac for spifi. (commented out)
 1.30 30-Oct-2000  tsubai Add spifi SCSI (commented out yet).
 1.29 12-Oct-2000  onoe add Tulip (tlp) at apbus
 1.28 04-Oct-2000  tsubai Add rnd.
 1.27 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.26 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.25 27-Jul-2000  mason Moving to a default of 64 PTYs.
 1.24 30-Jun-2000  itojun add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
 1.23 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.22 14-Jun-2000  veego branches: 1.22.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.21 19-Apr-2000  itojun branches: 1.21.2;
add stf pseudo interface (commented out due to possible security risks)
 1.20 29-Feb-2000  simonb Do the "<space><tab>" thing with the RAID_AUTOCONFIG option.
 1.19 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.18 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.17 23-Jan-2000  hubertf Add commented out "ident"-command
 1.16 23-Jan-2000  tsubai Use flags to determine PCLK rather than use unit number.
 1.15 20-Jan-2000  wrstuden Add overlay to kernel configs.
 1.14 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.13 17-Dec-1999  tsubai Add interrupt level locator and use it instead of hard-coding.
 1.12 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.11 15-Nov-1999  fvdl Add commented out option SOFTDEP to all GENERIC kernels.
 1.10 29-Jul-1999  augustss branches: 1.10.2; 1.10.8;
It's time to be COMPAT_14.
 1.9 20-Jul-1999  christos enable PPP_BSDCOMP, PPP_DEFLATE, PPP_FILTER, PFIL_HOOKS, IPFILTER_LOG
on the GENERIC kernels that had them commented out.
XXX: Please note, that not all the kernels have all the options defined!
 1.8 25-Nov-1998  hwr branches: 1.8.4; 1.8.6;
Add (commented out) 'gre' pseudo device line. Feedback is welcome.
Inspired by Klaus Klein.
 1.7 16-Nov-1998  oster Added a (commented out) configuration line for the RAIDframe device driver.
 1.6 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.5 05-Jun-1998  tsubai Add support for NWB-231A 4-port RS-232C card.
 1.4 30-Apr-1998  tsubai Comment out (unnecessary) "options EXEC_AOUT".
 1.3 18-Mar-1998  bouyer Add commented out "options FFS_EI"
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.8.6.1 02-Aug-1999  thorpej Update from trunk.
 1.8.4.1 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.10.8.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.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.10.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.10.2.2 22-Nov-2000  bouyer Sync with HEAD.
 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.
 1.21.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.22.2.3 01-May-2001  he Pull up revisions 1.28,1.34 (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.22.2.2 11-Aug-2000  mason Move to default of 64 PTYs in GENERIC kernel config.
Requested by mason, approved by jhawk.
 1.22.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.36.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.36.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.36.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.36.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.36.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.36.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.38.6.8 11-Dec-2002  thorpej Sync with HEAD.
 1.38.6.7 11-Nov-2002  nathanw Catch up to -current
 1.38.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.38.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.38.6.4 17-Apr-2002  nathanw Catch up to -current.
 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 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:26:55 +0000
 1.47.4.4 19-Jun-2003  msaitoh Pull up revision 1.59 (requested by tsutsui in ticket #1287):
Use wildcard for scsibus at sc0.
 1.47.4.3 19-Jun-2003  msaitoh Pull up revision 1.57 (requested by tsutsui in ticket #1285):
Enable options NTP, DDB and SCSIVERBOSE.
 1.47.4.2 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.47.4.1 01-Aug-2002  lukem Pull up revision 1.48 (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.47.2.1 15-Jul-2002  gehenna catch up with -current.
 1.60.2.10 11-Dec-2005  christos Sync with head.
 1.60.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.60.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.60.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.60.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.60.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.60.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.60.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.60.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.60.2.1 03-Aug-2004  skrll Sync with HEAD
 1.62.2.3 15-Jul-2004  he Pull up revision 1.68 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.62.2.2 02-Jul-2004  he Pull up revision 1.67 (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.62.2.1 30-Jun-2004  jdc Pull up revision 1.66 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.70.4.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.76.4.2 14-Aug-2005  riz Pull up revision 1.80 (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.76.4.1 18-Jul-2005  riz Pull up revision 1.79 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.78.2.5 21-Jan-2008  yamt sync with head
 1.78.2.4 15-Nov-2007  yamt sync with head.
 1.78.2.3 03-Sep-2007  yamt sync with head.
 1.78.2.2 30-Dec-2006  yamt sync with head.
 1.78.2.1 21-Jun-2006  yamt sync with head.
 1.87.4.1 09-Sep-2006  rpaulo sync with head
 1.87.2.1 18-Feb-2006  yamt sync with head.
 1.88.2.1 22-Apr-2006  simonb Sync with head.
 1.90.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.90.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.90.2.3 03-Sep-2006  yamt sync with head.
 1.90.2.2 11-Aug-2006  yamt sync with head
 1.90.2.1 01-Apr-2006  yamt sync with head.
 1.91.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.92.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.92.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.95.4.2 10-Dec-2006  yamt sync with head.
 1.95.4.1 22-Oct-2006  yamt sync with head
 1.95.2.1 18-Nov-2006  ad Sync with head.
 1.97.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.97.16.2 03-Oct-2007  garbled Sync with HEAD
 1.97.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.97.10.1 11-Jul-2007  mjf Sync with head.
 1.97.8.3 03-Dec-2007  ad Sync with HEAD.
 1.97.8.2 20-Aug-2007  ad Sync with HEAD.
 1.97.8.1 09-Jun-2007  ad Sync with head.
 1.97.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.98.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.98.2.1 07-Aug-2007  matt Sync with HEAD.
 1.99.10.1 13-Nov-2007  bouyer Sync with HEAD
 1.99.6.2 09-Jan-2008  matt sync with HEAD
 1.99.6.1 06-Nov-2007  matt sync with HEAD
 1.99.4.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.101.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.101.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.102.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.102.16.1 19-Oct-2008  haad Sync with HEAD.
 1.102.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.102.10.4 11-Aug-2010  yamt sync with head.
 1.102.10.3 11-Mar-2010  yamt sync with head
 1.102.10.2 19-Aug-2009  yamt sync with head.
 1.102.10.1 04-May-2009  yamt sync with head.
 1.102.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.102.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.104.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.104.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.109.4.2 21-Apr-2011  rmind sync with head
 1.109.4.1 30-May-2010  rmind sync with head
 1.109.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.109.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.111.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.111.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.113.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.113.2.2 30-Oct-2012  yamt sync with head
 1.113.2.1 17-Apr-2012  yamt sync with head
 1.114.2.2 11-Mar-2012  mrg sync to latest -current
 1.114.2.1 18-Feb-2012  mrg merge to -current.
 1.117.2.4 03-Dec-2017  jdolecek update from HEAD
 1.117.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.117.2.2 23-Jun-2013  tls resync from head
 1.117.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.123.2.1 28-Aug-2013  rmind sync with head
 1.124.4.1 10-Aug-2014  tls Rebase.
 1.125.2.2 18-Nov-2014  snj 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.129.12.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.129.2.1 28-Aug-2017  skrll Sync with HEAD
 1.133.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.133.4.1 10-Jun-2019  christos Sync with HEAD
 1.133.2.2 20-Oct-2018  pgoyette Sync with head
 1.133.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.137.4.1 25-Jan-2020  ad Sync with head.
 1.137.2.2 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1763):

sys/arch/newsmips/dev/fb.c: revision 1.34
sys/arch/newsmips/conf/GENERIC: revision 1.146
sys/arch/newsmips/conf/INSTALL: revision 1.49
sys/arch/newsmips/dev/fb.c: revision 1.30
sys/arch/newsmips/dev/fb.c: revision 1.31
sys/arch/newsmips/dev/fb.c: revision 1.32
sys/arch/newsmips/dev/fb.c: revision 1.33

Make local functions and variables static.

Use proper C99 exact-width integer types.

Use C99 designated struct initializers.

Remove trailing spaces and tab.

Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)

Also add proper initialization on consinit() in NMB-253 case.
 1.137.2.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1759):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/DEJIKO: revision 1.36

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.
 1.142.4.2 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #459):

sys/arch/newsmips/dev/fb.c: revision 1.34
sys/arch/newsmips/conf/GENERIC: revision 1.146
sys/arch/newsmips/conf/INSTALL: revision 1.49
sys/arch/newsmips/dev/fb.c: revision 1.30
sys/arch/newsmips/dev/fb.c: revision 1.31
sys/arch/newsmips/dev/fb.c: revision 1.32
sys/arch/newsmips/dev/fb.c: revision 1.33

Make local functions and variables static.

Use proper C99 exact-width integer types.

Use C99 designated struct initializers.

Remove trailing spaces and tab.

Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)

Also add proper initialization on consinit() in NMB-253 case.
 1.142.4.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #457):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/GENERIC: revision 1.145
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/WAPIKO: revision 1.51
sys/arch/newsmips/conf/INSTALL: revision 1.48
sys/arch/newsmips/conf/DEJIKO: revision 1.36
sys/arch/newsmips/conf/DEJIKO: revision 1.37

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.

Specify -fno-unwind-tables to shrink kernel binaries.
 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:14:27 +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.49 04-Nov-2023  tsutsui Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)
Also add proper initialization on consinit() in NMB-253 case.

Worth to pull up to netbsd-10 and netbsd-9.
 1.48 28-Oct-2023  tsutsui Specify -fno-unwind-tables to shrink kernel binaries.
 1.47 07-Feb-2019  mrg branches: 1.47.4; 1.47.30;
bump ramdisk sizes to cope with GCC 7 bloat.
 1.46 14-Sep-2017  mrg branches: 1.46.4;
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.45 22-Jul-2017  christos surf the bloat
 1.44 23-Aug-2014  dholland branches: 1.44.2;
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.43 10-Aug-2014  riz Bump the ramdisk size; the longer paths on the build cluster are
likely enough to put this over the edge.
 1.42 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.41 17-Aug-2012  abs branches: 1.41.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.40 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.39 22-Nov-2011  tls branches: 1.39.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.38 23-Nov-2010  hannken branches: 1.38.8;
Remove unused count from pseudo-device md.
 1.37 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.36 06-Feb-2009  jym branches: 1.36.4; 1.36.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.35 31-Jul-2008  simonb branches: 1.35.2;
Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.34 17-Oct-2007  garbled branches: 1.34.16; 1.34.20; 1.34.22; 1.34.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.33 18-Jul-2007  tsutsui branches: 1.33.6;
Add options COMPAT_40.
 1.32 29-Dec-2006  yamt branches: 1.32.6; 1.32.14; 1.32.16; 1.32.18;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.31 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.30 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.29 07-Dec-2005  tsutsui branches: 1.29.20; 1.29.22;
Remove obsolete options VNODE_OP_NOINLINE.
 1.28 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.27 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.26 19-Aug-2005  christos 64 bit inode changes.
 1.25 18-Feb-2005  dsl branches: 1.25.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.24 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.23 21-Jan-2005  tsutsui branches: 1.23.2;
Add options COMPAT_20.
 1.22 10-Nov-2004  christos branches: 1.22.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.21 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.20 25-Oct-2003  tsutsui branches: 1.20.2;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.19 24-Oct-2003  tsutsui Add options COMPAT_16.
 1.18 06-Sep-2003  itojun add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more. see tech-security
 1.17 10-May-2003  tsutsui branches: 1.17.2;
Use wildcard for scsibus at sc0.
 1.16 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.15 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.14 25-Apr-2002  atatat branches: 1.14.2; 1.14.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.13 14-Apr-2002  tsutsui Expand MEMORY_DISK_ROOT_SIZE to 2.5Mbytes.
 1.12 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.11 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.10 16-Mar-2002  tsutsui Use sony8x16 fonts instead of gallant12x22.
 1.9 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.8 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.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 01-Feb-2001  tsutsui branches: 1.6.4; 1.6.8;
Update for the install floppy:
- Add newer devices (wscons etc.)
- Add -mmemcpy to COPTS
- Reduce maxusers
- Remove KERNFS
- Disable some COMPAT_* options
- Add MEMORY_DISK_SERVER=0
- Enable options NFS_V2_ONLY and VNODE_OP_NOINLINE
 1.5 02-Oct-2000  abs branches: 1.5.2;
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.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 04-Mar-2000  tsubai INSTALL kernel config.
 1.5.2.3 11-Feb-2001  bouyer Sync with HEAD.
 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.
 1.5.2.1 02-Oct-2000  bouyer file INSTALL was added on branch thorpej_scsipi on 2000-11-20 20:17:18 +0000
 1.6.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.6 01-Aug-2002  nathanw Catch up to -current.
 1.6.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.6.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.6.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.6.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.6.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.6.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.4.1 19-Jun-2003  msaitoh Pull up revision 1.17 (requested by tsutsui in ticket #1287):
Use wildcard for scsibus at sc0.
 1.14.2.1 16-Jul-2002  gehenna catch up with -current.
 1.17.2.9 11-Dec-2005  christos Sync with head.
 1.17.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.17.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.17.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.17.2.4 14-Nov-2004  skrll Sync with HEAD.
 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.20.2.1 15-Jul-2004  he Pull up revision 1.21 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.22.4.1 29-Apr-2005  kent sync with -current
 1.23.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.23.2.1 12-Feb-2005  yamt sync with head.
 1.25.6.3 03-Sep-2007  yamt sync with head.
 1.25.6.2 30-Dec-2006  yamt sync with head.
 1.25.6.1 21-Jun-2006  yamt sync with head.
 1.29.22.1 22-Oct-2006  yamt sync with head
 1.29.20.2 12-Jan-2007  ad Sync with head.
 1.29.20.1 18-Nov-2006  ad Sync with head.
 1.32.18.1 15-Aug-2007  skrll Sync with HEAD.
 1.32.16.1 07-Aug-2007  matt Sync with HEAD.
 1.32.14.1 03-Oct-2007  garbled Sync with HEAD
 1.32.6.1 20-Aug-2007  ad Sync with HEAD.
 1.33.6.1 06-Nov-2007  matt sync with HEAD
 1.34.26.1 19-Oct-2008  haad Sync with HEAD.
 1.34.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.34.20.2 11-Aug-2010  yamt sync with head.
 1.34.20.1 04-May-2009  yamt sync with head.
 1.34.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.35.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.36.6.2 05-Mar-2011  rmind sync with head
 1.36.6.1 30-May-2010  rmind sync with head
 1.36.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.38.8.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.38.8.2 30-Oct-2012  yamt sync with head
 1.38.8.1 17-Apr-2012  yamt sync with head
 1.39.2.1 18-Feb-2012  mrg merge to -current.
 1.41.2.3 03-Dec-2017  jdolecek update from HEAD
 1.41.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41.2.1 23-Jun-2013  tls resync from head
 1.44.2.1 28-Aug-2017  skrll Sync with HEAD
 1.46.4.1 10-Jun-2019  christos Sync with HEAD
 1.47.30.2 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #459):

sys/arch/newsmips/dev/fb.c: revision 1.34
sys/arch/newsmips/conf/GENERIC: revision 1.146
sys/arch/newsmips/conf/INSTALL: revision 1.49
sys/arch/newsmips/dev/fb.c: revision 1.30
sys/arch/newsmips/dev/fb.c: revision 1.31
sys/arch/newsmips/dev/fb.c: revision 1.32
sys/arch/newsmips/dev/fb.c: revision 1.33

Make local functions and variables static.

Use proper C99 exact-width integer types.

Use C99 designated struct initializers.

Remove trailing spaces and tab.

Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)

Also add proper initialization on consinit() in NMB-253 case.
 1.47.30.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #457):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/GENERIC: revision 1.145
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/WAPIKO: revision 1.51
sys/arch/newsmips/conf/INSTALL: revision 1.48
sys/arch/newsmips/conf/DEJIKO: revision 1.36
sys/arch/newsmips/conf/DEJIKO: revision 1.37

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.

Specify -fno-unwind-tables to shrink kernel binaries.
 1.47.4.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1763):

sys/arch/newsmips/dev/fb.c: revision 1.34
sys/arch/newsmips/conf/GENERIC: revision 1.146
sys/arch/newsmips/conf/INSTALL: revision 1.49
sys/arch/newsmips/dev/fb.c: revision 1.30
sys/arch/newsmips/dev/fb.c: revision 1.31
sys/arch/newsmips/dev/fb.c: revision 1.32
sys/arch/newsmips/dev/fb.c: revision 1.33

Make local functions and variables static.

Use proper C99 exact-width integer types.

Use C99 designated struct initializers.

Remove trailing spaces and tab.

Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)

Also add proper initialization on consinit() in NMB-253 case.
 1.29 03-Dec-2000  matt Start using a Makefile.mips. Use a combination of makeoptions and
Makefile.sgimips.inc which has sgimips specific stuff.
 1.28 21-May-2000  soren Also share BE ldscripts.
 1.27 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.26 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.25 22-Mar-2000  onoe renamed the variable $NEWS to $NEWSMIPS.
 1.24 22-Mar-2000  onoe Use $S ($NEWS) for kern.ldscript instead of relative path
so that "build" directive or -b option of config(8) works.
 1.23 01-Feb-2000  tsutsui Revert STRIPPROG -> STRIP
 1.22 24-Jan-2000  tron Add "dependall" target for comfort.
 1.21 19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.20 17-Dec-1999  tsubai s/-G0/-G 0/
 1.19 26-Jul-1999  cgd branches: 1.19.2; 1.19.8;
be more efficient when doing the SYSTEM_LD_TAIL for -g kernels: don't
copy them just to strip them, use strip -o.
 1.18 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.17 08-Jul-1999  tsubai Don't make ECOFF kernel.
 1.16 25-Mar-1999  simonb branches: 1.16.4;
Change multiple spaces to tabs.
 1.15 15-Mar-1999  tsubai Fix mkdep ``cc: No input files'' error when SFILES is empty.
 1.14 12-Mar-1999  tsubai Don't remove .mdebug section.
 1.13 08-Mar-1999  tsubai Use objcopy to convert ELF kernel to ECOFF.
 1.12 15-Jan-1999  thorpej Some minor, mostly costmetic, changes to CPPFLAGS/CFLAGS.
 1.11 15-Jan-1999  castor add support for locore_mips[13].S
 1.10 08-Jan-1999  augustss Add -Wpointer-arith warning since `void *' arithmetic is not ANSI C.
 1.9 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.8 05-Sep-1998  lukem distclean is a synonym for cleandir
 1.7 21-Aug-1998  tsubai Add missing "-a" to mkdep line for locore_machdep.S.
 1.6 22-Jul-1998  tsubai Change from "-G 0" to "-G0" for egcs.
 1.5 31-May-1998  thorpej Specify a non-profiling C rule.
 1.4 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.3 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.2 03-Mar-1998  thorpej Make this work with DEBUG="-g"
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.16.4.1 02-Aug-1999  thorpej Update from trunk.
 1.19.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.2.2 08-Dec-2000  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.
 1.51 28-Oct-2023  tsutsui Specify -fno-unwind-tables to shrink kernel binaries.
 1.50 28-Oct-2023  tsutsui Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.
 1.49 01-Aug-2018  maxv branches: 1.49.4; 1.49.30;
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.48 14-Sep-2017  mrg branches: 1.48.2; 1.48.4;
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.47 21-Aug-2015  uebayasi 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.46 23-Aug-2014  dholland branches: 1.46.2;
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.45 20-Jul-2014  alnsn Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
 1.44 27-Apr-2013  christos branches: 1.44.8;
remove confusing numeric locators where they are unused.
 1.43 17-Aug-2012  abs branches: 1.43.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.42 22-Nov-2011  tls 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.41 08-May-2010  mrg branches: 1.41.8;
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.40 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.39 12-Aug-2009  matt branches: 1.39.2; 1.39.4;
Nuke a.out support for MIPS.
 1.38 17-Oct-2007  garbled branches: 1.38.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.37 18-Jul-2007  tsutsui branches: 1.37.6;
Add options COMPAT_40.
 1.36 27-Sep-2006  manu branches: 1.36.8; 1.36.16; 1.36.20; 1.36.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.35 26-Aug-2006  christos branches: 1.35.2; 1.35.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.34 05-Feb-2006  cube branches: 1.34.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.33 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.32 07-Dec-2005  tsutsui branches: 1.32.2; 1.32.4; 1.32.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.31 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.30 19-Aug-2005  christos 64 bit inode changes.
 1.29 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.28 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.27 18-Feb-2005  dsl branches: 1.27.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.26 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.25 21-Jan-2005  tsutsui branches: 1.25.2;
Add options COMPAT_20.
 1.24 10-Nov-2004  christos branches: 1.24.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.23 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.22 25-Oct-2003  simonb branches: 1.22.2;
Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
 1.21 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.20 10-Apr-2003  christos branches: 1.20.2;
Bye Bye UCONSOLE
 1.19 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.18 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.17 25-Apr-2002  atatat branches: 1.17.2; 1.17.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.16 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.15 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.14 04-Apr-2001  tsubai branches: 1.14.2; 1.14.8;
Add rnd.
 1.13 27-Nov-2000  soren branches: 1.13.2;
Removed increased BUFCACHE/BUFPAGES.
 1.12 13-Nov-2000  tsubai Switch to wscons.
 1.11 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.10 12-Feb-2000  thorpej Nuke NKMEMCLUSTERS.
 1.9 23-Jan-2000  tsubai Use flags to determine PCLK rather than use unit number.
 1.8 17-Dec-1999  tsubai Add interrupt level locator and use it instead of hard-coding.
 1.7 29-Jul-1999  augustss branches: 1.7.2; 1.7.8;
It's time to be COMPAT_14.
 1.6 16-Nov-1998  tsubai branches: 1.6.6;
Enable UVM by default.
 1.5 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.4 05-Jun-1998  tsubai Add support for NWB-231A 4-port RS-232C card.
 1.3 30-Apr-1998  tsubai Comment out (unnecessary) "options EXEC_AOUT".
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.6.6.1 02-Aug-1999  thorpej Update from trunk.
 1.7.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.7.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.7.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.7.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.
 1.13.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.14.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.14.8.4 20-Jun-2002  nathanw Catch up to -current.
 1.14.8.3 17-Apr-2002  nathanw Catch up to -current.
 1.14.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.8.1 04-Apr-2001  nathanw file WAPIKO was added on branch nathanw_sa on 2002-02-28 04:11:16 +0000
 1.14.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.14.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.14.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.17.4.1 01-Aug-2002  lukem Pull up revision 1.18 (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.17.2.1 15-Jul-2002  gehenna catch up with -current.
 1.20.2.9 11-Dec-2005  christos Sync with head.
 1.20.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.20.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.20.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.4 14-Nov-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.22.2.1 15-Jul-2004  he Pull up revision 1.23 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.24.4.1 29-Apr-2005  kent sync with -current
 1.25.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.25.2.1 12-Feb-2005  yamt sync with head.
 1.27.6.3 03-Sep-2007  yamt sync with head.
 1.27.6.2 30-Dec-2006  yamt sync with head.
 1.27.6.1 21-Jun-2006  yamt sync with head.
 1.32.6.1 22-Apr-2006  simonb Sync with head.
 1.32.4.1 09-Sep-2006  rpaulo sync with head
 1.32.2.1 18-Feb-2006  yamt sync with head.
 1.34.2.1 03-Sep-2006  yamt sync with head.
 1.35.4.1 22-Oct-2006  yamt sync with head
 1.35.2.1 18-Nov-2006  ad Sync with head.
 1.36.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.36.20.1 07-Aug-2007  matt Sync with HEAD.
 1.36.16.1 03-Oct-2007  garbled Sync with HEAD
 1.36.8.1 20-Aug-2007  ad Sync with HEAD.
 1.37.6.1 06-Nov-2007  matt sync with HEAD
 1.38.20.2 11-Aug-2010  yamt sync with head.
 1.38.20.1 19-Aug-2009  yamt sync with head.
 1.39.4.1 30-May-2010  rmind sync with head
 1.39.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.39.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.41.8.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.41.8.2 30-Oct-2012  yamt sync with head
 1.41.8.1 17-Apr-2012  yamt sync with head
 1.43.2.3 03-Dec-2017  jdolecek update from HEAD
 1.43.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.2.1 23-Jun-2013  tls resync from head
 1.44.8.1 10-Aug-2014  tls Rebase.
 1.46.2.1 22-Sep-2015  skrll Sync with HEAD
 1.48.4.1 10-Jun-2019  christos Sync with HEAD
 1.48.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.49.30.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #457):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/GENERIC: revision 1.145
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/WAPIKO: revision 1.51
sys/arch/newsmips/conf/INSTALL: revision 1.48
sys/arch/newsmips/conf/DEJIKO: revision 1.36
sys/arch/newsmips/conf/DEJIKO: revision 1.37

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.

Specify -fno-unwind-tables to shrink kernel binaries.
 1.49.4.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1759):

sys/arch/newsmips/conf/GENERIC: revision 1.144
sys/arch/newsmips/conf/WAPIKO: revision 1.50
sys/arch/newsmips/conf/DEJIKO: revision 1.36

Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun.
 1.31 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.30 20-Jul-2014  alnsn branches: 1.30.26; 1.30.28;
Include sljit files.
 1.29 02-Oct-2012  christos branches: 1.29.10;
move common/bus_dma/ -> dev/bus_dma/
 1.28 20-Feb-2011  matt branches: 1.28.4; 1.28.14;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.27 21-Aug-2009  thorpej branches: 1.27.4; 1.27.6; 1.27.8;
Use bus_dmamem_common.
 1.26 20-Feb-2008  drochner branches: 1.26.10; 1.26.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.25 11-Dec-2005  christos branches: 1.25.50;
merge ktrace-lwp.
 1.24 25-Oct-2003  tsutsui branches: 1.24.16;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.23 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.22 25-May-2003  tsutsui branches: 1.22.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.21 26-Oct-2002  jdolecek 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.20 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.19 16-Apr-2002  thorpej branches: 1.19.2;
* 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.18 13-Mar-2002  simonb All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
 1.17 25-Jan-2001  tsutsui branches: 1.17.4; 1.17.8;
Move NEWS keymap file into MI place to share with news68k.
 1.16 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.15 15-Nov-2000  tsubai Screen console works now.
 1.14 15-Nov-2000  tsubai Keyboard and mouse support for news5000.
 1.13 13-Nov-2000  tsubai Switch to wscons.
 1.12 06-Nov-2000  tsubai "xa" frame buffer driver.
 1.11 30-Oct-2000  tsubai NEWS5000 internal SCSI driver.
 1.10 29-Oct-2000  tsutsui Switch to MI md_root.c. Checked by booting INSTALL kernel.
 1.9 12-Oct-2000  onoe add Tulip (tlp) at apbus
 1.8 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.7 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.6 05-Dec-1999  tsubai Use dev/clock_subr.c.
 1.5 10-Nov-1999  tsubai Support md root for INSTALL.
 1.4 07-Jun-1999  thorpej branches: 1.4.2; 1.4.4; 1.4.8;
Only declare block major numbers for devices which can be the root device.
 1.3 21-Jul-1998  drochner branches: 1.3.10;
adapt to LANCE driver split
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.4.1 15-Nov-1999  fvdl Sync with -current
 1.4.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.4.2.2 22-Nov-2000  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.
 1.17.8.4 11-Nov-2002  nathanw Catch up to -current
 1.17.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.17.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.17.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.17.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.17.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.17.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.19.2.2 17-May-2002  gehenna Remove old block majors list.
 1.19.2.1 16-May-2002  gehenna Include the list of block/character major numbers.
 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.24.16.1 27-Feb-2008  yamt sync with head.
 1.25.50.1 23-Mar-2008  matt sync with HEAD
 1.26.28.1 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.26.10.1 16-Sep-2009  yamt sync with head
 1.27.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.27.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.27.4.1 05-Mar-2011  rmind sync with head
 1.28.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.28.4.1 30-Oct-2012  yamt sync with head
 1.29.10.1 10-Aug-2014  tls Rebase.
 1.30.28.1 10-Jun-2019  christos Sync with HEAD
 1.30.26.1 20-Oct-2018  pgoyette Sync with head
 1.2 27-Nov-2000  soren arch/mips is used now.
 1.1 18-Feb-1998  tsubai branches: 1.1.14;
Initial import of NetBSD/news.
 1.1.14.1 08-Dec-2000  bouyer Sync with HEAD.
 1.23 04-Apr-2020  jdolecek mark nsmb major obsolete
 1.22 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.21 30-Jun-2011  wiz branches: 1.21.54;
dependant -> dependent
 1.20 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.19 31-Dec-2007  ad branches: 1.19.6; 1.19.10; 1.19.16; 1.19.18;
Remove systrace. Ok core@.
 1.18 24-Nov-2006  wiz branches: 1.18.28; 1.18.34; 1.18.42;
s/independant/independent/, from Zafer.
 1.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 17-Sep-2005  yamt make VMSWAP optional again.
 1.15 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.14 30-Jul-2005  yamt defflag VMSWAP.
 1.13 10-May-2005  jdolecek branches: 1.13.2;
assign major for nsmb(4)
 1.12 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 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-Aug-2003  itojun create /dev/crypto
 1.6 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.5 25-Apr-2003  ragge branches: 1.5.2;
Add ksyms device major.
 1.4 04-Oct-2002  elric branches: 1.4.2;
assign majors for raw and cooked cgd's.
 1.3 14-Sep-2002  tsutsui branches: 1.3.2;
Add (missed) entries for md(4).
 1.2 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.1 16-May-2002  gehenna branches: 1.1.2;
file majors.newsmips was initially added on branch gehenna-devsw.
 1.1.2.3 15-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.3.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.3.2.1 14-Sep-2002  nathanw file majors.newsmips was added on branch nathanw_sa on 2002-09-17 21:16:16 +0000
 1.4.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.4.2.1 04-Oct-2002  jdolecek file majors.newsmips was added on branch kqueue on 2002-10-10 18:34:33 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.13.2.3 21-Jan-2008  yamt sync with head
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-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.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.18.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.28.1 09-Jan-2008  matt sync with HEAD
 1.19.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.19.10.1 04-May-2009  yamt sync with head.
 1.19.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.21.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.54.1 10-Jun-2019  christos Sync with HEAD
 1.19 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.18 30-Sep-2018  tsutsui Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).
Should be pulled up to netbsd-8.
 1.17 11-Dec-2005  christos branches: 1.17.158; 1.17.164; 1.17.166;
merge ktrace-lwp.
 1.16 17-Sep-2005  yamt include "conf/std".
 1.15 30-Aug-2003  chs branches: 1.15.16;
add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
 1.14 09-Dec-2002  simonb branches: 1.14.6;
Remove the explicit `makeoptions MACHINE_ARCH="mipse{b,l}"' for kernel
builds and use the endianness of the toolchain being used to determine
the endianness of the kernel.
 1.13 09-Dec-2001  atatat 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.12 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.11 23-Oct-2001  thorpej branches: 1.11.4;
For MIPS kernel Makefiles, don't set ENDIAN in std.${MACHINE}. Instead,
explicitly set MACHINE_ARCH to the appropriate thing. Makefile.mips will
then set all of the internal variables it needs to accordingly.
 1.10 03-Dec-2000  matt branches: 1.10.4;
Revert back to a machinearch (really cputype) of mips. Put ENDIAN back.
 1.9 03-Dec-2000  matt Change arch from mips to mipsel/mipseb as appropriate. Nuke the ENDIAN
makeoption. Key off MACHINE_ARCH for adding -EB/-EL to CFLAGS/AFLAGS/LD/
LINKFLAGS.
 1.8 03-Dec-2000  matt Start using a Makefile.mips. Use a combination of makeoptions and
Makefile.sgimips.inc which has sgimips specific stuff.
 1.7 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.6 15-Nov-1999  fvdl branches: 1.6.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.5 24-Mar-1999  mrg branches: 1.5.8; 1.5.14;
clean up kernel/config files files for machVM lossage.
 1.4 15-Feb-1999  hubertf RCS ID police
 1.3 16-Nov-1998  tsubai Enable UVM by default.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.5.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.8.2 08-Dec-2000  bouyer Sync with HEAD.
 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.
 1.6.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.10.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.11.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.11.4.1 23-Oct-2001  nathanw file std.newsmips was added on branch nathanw_sa on 2002-01-08 00:26:56 +0000
 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.15.16.1 21-Jun-2006  yamt sync with head.
 1.17.166.1 10-Jun-2019  christos Sync with HEAD
 1.17.164.1 20-Oct-2018  pgoyette Sync with head
 1.17.158.1 18-Nov-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1095):

sys/arch/newsmips/apbus/apbus.c: revision 1.23
sys/arch/newsmips/apbus/apbus_subr.c: revision 1.10
sys/arch/newsmips/apbus/apbusvar.h: revision 1.10
sys/arch/newsmips/conf/std.newsmips: revision 1.18

Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).

Should be pulled up to netbsd-8.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 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.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.10 13-Nov-2000  tsubai Switch to wscons.
 1.9 03-Nov-2000  tsutsui Call ttymalloc() to initialize struct tty in bmcnattach().
 1.8 02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.7 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.6 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.5 06-Mar-2000  thorpej - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
 1.4 15-Feb-1999  hubertf branches: 1.4.8;
RCS ID police
 1.3 21-Mar-1998  mycroft Eliminate uses of TS_WOPEN in hard-wired devices.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4.8.2 22-Nov-2000  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.
 1.6 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 09-May-2003  tsutsui branches: 1.4.2;
- Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.3 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 22-Dec-1999  tsubai branches: 1.1.6; 1.1.10; 1.1.14;
First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.1.14.1 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 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.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.
 1.1.6.1 22-Dec-1999  bouyer file clock_hb.c was added on branch thorpej_scsipi on 2000-11-20 20:17:19 +0000
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7 04-Nov-2023  tsutsui Use DELAY(9), not empty for() loop that could be optimized out.

No visible regression on NWS-3260 and NWS-3470.
 1.6 09-Apr-2008  tsutsui branches: 1.6.96; 1.6.122;
Split device_t/softc, with misc cleanup.
 1.5 11-Dec-2005  christos branches: 1.5.74;
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 31-May-2002  thorpej branches: 1.3.6;
Use __mips__ instead of mips.
 1.2 15-Feb-1999  hubertf branches: 1.2.22; 1.2.26; 1.2.34;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.34.1 15-Jul-2002  gehenna catch up with -current.
 1.2.26.1 20-Jun-2002  nathanw Catch up to -current.
 1.2.22.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.122.1 26-Nov-2023  bouyer Pull up following revision(s) (requested by tsutsui in ticket #462):
sys/arch/newsmips/dev/dmac_0448.h: revision 1.7
sys/arch/newsmips/dev/scsi_1185.c: revision 1.25
Use DELAY(9), not empty for() loop that could be optimized out.
No visible regression on NWS-3260 and NWS-3470.
 1.6.96.1 27-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1764):

sys/arch/newsmips/dev/dmac_0448.h: revision 1.7
sys/arch/newsmips/dev/scsi_1185.c: revision 1.25

Use DELAY(9), not empty for() loop that could be optimized out.
No visible regression on NWS-3260 and NWS-3470.
 1.34 04-Nov-2023  tsutsui Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)
Also add proper initialization on consinit() in NMB-253 case.

Worth to pull up to netbsd-10 and netbsd-9.
 1.33 28-Oct-2023  tsutsui Remove trailing spaces and tab.
 1.32 28-Oct-2023  tsutsui Use C99 designated struct initializers.
 1.31 28-Oct-2023  tsutsui Use proper C99 exact-width integer types.
 1.30 28-Oct-2023  tsutsui Make local functions and variables static.
 1.29 07-Aug-2021  thorpej branches: 1.29.6;
Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.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.27 21-Nov-2020  thorpej branches: 1.27.2;
malloc(9) -> kmem(9)
 1.26 31-Jan-2014  tsutsui branches: 1.26.34; 1.26.42;
Add WSDISPLAYIO_LINEBYTES ioctl (for Xorg wsfb driver).
 1.25 15-May-2010  tsutsui branches: 1.25.8; 1.25.18; 1.25.22;
Set RI_NO_AUTO in ri_flg if init functions are invoked from cnattach.
Tested on NWS-3470D. xafb.c for NWS-5000 is untested.

XXX: isn't it better to have failsafe default than sprinkle RI_NO_AUTO
XXX: to avoid fatal silent hangup?
 1.24 09-Apr-2008  tsutsui branches: 1.24.4; 1.24.24; 1.24.26;
Split device_t/softc, with misc cleanup.
 1.23 04-Mar-2007  christos branches: 1.23.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 12-Apr-2006  jmmv branches: 1.22.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.21 11-Dec-2005  christos branches: 1.21.4; 1.21.6; 1.21.8; 1.21.10; 1.21.12;
merge ktrace-lwp.
 1.20 03-Jun-2005  tsutsui branches: 1.20.2;
constify.
 1.19 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.18 07-Nov-2003  dsl branches: 1.18.8; 1.18.10;
default: to 1024x768 landscape if unknown geometry (avoids uninitialised vars)
 1.17 15-Jul-2003  lukem __KERNEL_RCSID()
 1.16 09-May-2003  tsutsui branches: 1.16.2;
- Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.15 19-Apr-2003  tsutsui TAB/space cleanup.
 1.14 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.11 31-May-2002  thorpej Statements must follow labels.
 1.10 17-Mar-2002  atatat branches: 1.10.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.9 03-Dec-2000  matt branches: 1.9.4; 1.9.8;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.8 15-Nov-2000  tsubai Fix an uninitialized variable reference.
 1.7 15-Nov-2000  tsubai Remove an unused variable.
 1.6 14-Nov-2000  tsubai Correct VRAM size.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 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.3 15-Feb-1999  hubertf branches: 1.3.8; 1.3.18;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.18.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.3.8.3 08-Dec-2000  bouyer Sync with HEAD.
 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.
 1.9.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.9.8.3 01-Aug-2002  nathanw Catch up to -current.
 1.9.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.9.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.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.9.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.4.2 16-Jul-2002  gehenna catch up with -current.
 1.10.4.1 15-Jul-2002  gehenna catch up with -current.
 1.16.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.5 06-Feb-2005  skrll Sync with HEAD.
 1.16.2.4 27-Jan-2005  skrll Adapt to 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.18.10.1 12-Feb-2005  yamt sync with head.
 1.18.8.1 29-Apr-2005  kent sync with -current
 1.20.2.2 03-Sep-2007  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.21.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.21.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.21.8.1 24-May-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.22.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.24.26.1 30-May-2010  rmind sync with head
 1.24.24.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.24.4.1 11-Aug-2010  yamt sync with head.
 1.25.22.1 18-May-2014  rmind sync with head
 1.25.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.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.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.26.34.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1763):

sys/arch/newsmips/dev/fb.c: revision 1.34
sys/arch/newsmips/conf/GENERIC: revision 1.146
sys/arch/newsmips/conf/INSTALL: revision 1.49
sys/arch/newsmips/dev/fb.c: revision 1.30
sys/arch/newsmips/dev/fb.c: revision 1.31
sys/arch/newsmips/dev/fb.c: revision 1.32
sys/arch/newsmips/dev/fb.c: revision 1.33

Make local functions and variables static.

Use proper C99 exact-width integer types.

Use C99 designated struct initializers.

Remove trailing spaces and tab.

Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)

Also add proper initialization on consinit() in NMB-253 case.
 1.27.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.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.29.6.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #459):

sys/arch/newsmips/dev/fb.c: revision 1.34
sys/arch/newsmips/conf/GENERIC: revision 1.146
sys/arch/newsmips/conf/INSTALL: revision 1.49
sys/arch/newsmips/dev/fb.c: revision 1.30
sys/arch/newsmips/dev/fb.c: revision 1.31
sys/arch/newsmips/dev/fb.c: revision 1.32
sys/arch/newsmips/dev/fb.c: revision 1.33

Make local functions and variables static.

Use proper C99 exact-width integer types.

Use C99 designated struct initializers.

Remove trailing spaces and tab.

Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.

Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)

Also add proper initialization on consinit() in NMB-253 case.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 23-Jan-2000  tsubai Don't need to declare badaddr().
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.7 13-Nov-2000  tsubai Switch to wscons.
 1.6 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.5 27-May-2000  thorpej sleep() -> tsleep()
 1.4 04-Dec-1999  ragge CL* discarding.
 1.3 15-Feb-1999  hubertf branches: 1.3.8; 1.3.14;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.6 13-Nov-2000  tsubai Switch to wscons.
 1.5 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.4 21-Aug-1998  tsubai branches: 1.4.12;
Change vm_offset_t to [pv]addr_t.
 1.3 30-Apr-1998  thorpej Pass vslock() and vsunlock() a proc *, rather than implicitly operating
on curproc.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4.12.2 22-Nov-2000  bouyer Sync with HEAD.
 1.4.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.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 23-Jan-2000  tsubai Don't need to declare badaddr().
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 04-Dec-1999  ragge CL* discarding.
 1.2 15-Feb-1999  hubertf branches: 1.2.8; 1.2.14;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.8.2 22-Nov-2000  bouyer Sync with HEAD.
 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.
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.1 22-Nov-2000  bouyer 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 21-Nov-2020  thorpej branches: 1.21.2;
malloc(9) -> kmem(9)
 1.20 10-Nov-2019  chs branches: 1.20.8;
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.19 20-Feb-2011  matt branches: 1.19.56;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.18 09-Apr-2008  tsutsui branches: 1.18.22; 1.18.26; 1.18.32; 1.18.34;
Split device_t/softc, with misc cleanup.
 1.17 11-Dec-2005  christos branches: 1.17.74;
merge ktrace-lwp.
 1.16 26-Aug-2005  drochner s/locdesc_t/int/g
 1.15 30-Jun-2005  drochner branches: 1.15.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.14 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.13 15-Jul-2003  lukem branches: 1.13.8; 1.13.10;
__KERNEL_RCSID()
 1.12 10-May-2003  tsutsui branches: 1.12.2;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.11 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 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 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.6 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.5 03-Dec-2000  matt branches: 1.5.4; 1.5.8;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.4 17-Dec-1999  tsubai Implement hb_intr_establish().
 1.3 11-Jul-1999  tsubai branches: 1.3.2; 1.3.8;
Cleanup.
 1.2 05-Jun-1998  tsubai branches: 1.2.10;
Add support for NWB-231A 4-port RS-232C card.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.10.1 02-Aug-1999  thorpej Update from trunk.
 1.3.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.
 1.5.8.2 03-Jan-2003  thorpej Sync with HEAD.
 1.5.8.1 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.1 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.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.4 06-Feb-2005  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.13.10.1 12-Feb-2005  yamt sync with head.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.17.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.34.1 05-Mar-2011  bouyer Sync with HEAD
 1.18.32.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.26.1 05-Mar-2011  rmind sync with head
 1.18.22.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.19.56.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.20.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.21.2.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.21.2.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.21.2.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.21.2.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.21.2.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.21.2.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.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 14-May-2008  tsutsui Normalize my licenses.
 1.2 10-May-2003  tsutsui branches: 1.2.104; 1.2.106; 1.2.108; 1.2.110;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.1 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.2.110.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2.108.1 16-May-2008  yamt sync with head.
 1.2.106.1 18-May-2008  yamt sync with head.
 1.2.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.18 19-Jan-2010  pooka 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.17 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.16 04-Apr-2008  tsutsui branches: 1.16.2; 1.16.4;
Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.15 24-Dec-2005  perry branches: 1.15.74;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 06-Feb-2005  tsutsui branches: 1.13.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.12 15-Jul-2003  lukem branches: 1.12.8; 1.12.10;
__KERNEL_RCSID()
 1.11 10-May-2003  tsutsui branches: 1.11.2;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.10 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 30-May-2001  mrg branches: 1.7.2; 1.7.8;
use _KERNEL_OPT
 1.6 23-Jan-2000  tsubai branches: 1.6.6;
Fix wrong usage of cf_unit.
 1.5 17-Dec-1999  tsubai Add interrupt level locator and use it instead of hard-coding.
 1.4 17-Dec-1999  tsubai Use hb_intr_establish().
 1.3 21-Jul-1998  drochner branches: 1.3.14; 1.3.20;
adapt to LANCE driver split
 1.2 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.20.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.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.
 1.6.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.7.8.1 30-May-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-10-18 02:39:12 +0000
 1.7.2.1 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.4 06-Feb-2005  skrll Sync with HEAD.
 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.12.10.1 12-Feb-2005  yamt sync with head.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.13.6.1 21-Jun-2006  yamt sync with head.
 1.15.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.2 11-Mar-2010  yamt sync with head
 1.16.4.1 16-May-2008  yamt sync with head.
 1.16.2.1 18-May-2008  yamt sync with head.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 18-Dec-1999  tsubai Use hb_intr_establish().
 1.3 15-Feb-1999  hubertf branches: 1.3.8; 1.3.14;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 27-May-2000  thorpej sleep() -> tsleep()
 1.3 26-Dec-1998  tsubai branches: 1.3.8;
Make configurable with no frame buffer.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 26-Dec-1998  tsubai branches: 1.4.8;
Make configurable with no frame buffer.
 1.3 01-Jun-1998  tsubai Change "extern var;" --> "extern int var;" and so on. (for egcs -Wall)
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4.8.1 22-Nov-2000  bouyer Sync with HEAD.
 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 13-Oct-2012  tsutsui branches: 1.13.52;
struct device * -> device_t, use device_xname() (from chs@)
 1.12 09-Apr-2008  tsutsui branches: 1.12.38; 1.12.48;
Split device_t/softc, with misc cleanup.
 1.11 04-Mar-2007  christos branches: 1.11.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 11-Dec-2005  christos branches: 1.10.26;
merge ktrace-lwp.
 1.9 03-Jun-2005  tsutsui branches: 1.9.2;
Appease gcc -Wcast-qual.
 1.8 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.7 15-Jul-2003  lukem branches: 1.7.8; 1.7.10;
__KERNEL_RCSID()
 1.6 10-May-2003  tsutsui branches: 1.6.2;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.5 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 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.1 13-Nov-2000  tsubai branches: 1.1.2; 1.1.6; 1.1.10;
Switch to wscons.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.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.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 13-Nov-2000  bouyer file kb_hb.c was added on branch thorpej_scsipi on 2000-11-22 16:01:12 +0000
 1.6.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.5 06-Feb-2005  skrll Sync with HEAD.
 1.6.2.4 27-Jan-2005  skrll Adapt to branch.
 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.7.10.1 12-Feb-2005  yamt sync with head.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.9.2.2 03-Sep-2007  yamt sync with head.
 1.9.2.1 21-Jun-2006  yamt sync with head.
 1.10.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.38.1 30-Oct-2012  yamt sync with head
 1.13.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.14.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 13-Nov-2000  tsubai Switch to wscons.
 1.6 24-Mar-2000  soren Fix typo.
 1.5 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.4 18-Dec-1999  tsubai Use hb_intr_establish().
 1.3 15-Feb-1999  hubertf branches: 1.3.8; 1.3.14;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 29-Mar-2008  tsutsui branches: 1.7.2; 1.7.4;
Don't forget to initialize sc_dev.
 1.6 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.5 10-Jan-2008  tsutsui branches: 1.5.6;
- move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.56; 1.4.64;
merge ktrace-lwp.
 1.3 06-Feb-2005  tsutsui branches: 1.3.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.2 01-Nov-2003  tsutsui branches: 1.2.4; 1.2.10; 1.2.12;
Adapt MI mk48txx(4) changes. Tested on NWS-3470D (hb) and NWS-5000X (apbus).
 1.1 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.2.12.1 12-Feb-2005  yamt sync with head.
 1.2.10.1 29-Apr-2005  kent sync with -current
 1.2.4.5 06-Feb-2005  skrll Sync with HEAD.
 1.2.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2 03-Aug-2004  skrll Sync with HEAD
 1.2.4.1 01-Nov-2003  skrll file mkclock_hb.c was added on branch ktrace-lwp on 2004-08-03 10:38:29 +0000
 1.3.6.1 21-Jan-2008  yamt sync with head
 1.4.64.1 10-Jan-2008  bouyer Sync with HEAD
 1.4.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.50.1 23-Mar-2008  matt sync with HEAD
 1.5.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.5.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.7.4.1 16-May-2008  yamt sync with head.
 1.7.2.1 18-May-2008  yamt sync with head.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 18-Dec-1999  tsubai Use hb_intr_establish().
 1.3 26-Dec-1998  tsubai branches: 1.3.8; 1.3.14;
Make configurable with no frame buffer.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.16 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.15 24-Apr-2021  thorpej branches: 1.15.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.14 13-Oct-2012  tsutsui branches: 1.14.52;
struct device * -> device_t, use device_xname() (from chs@)
 1.13 09-Apr-2008  tsutsui branches: 1.13.38; 1.13.48;
Split device_t/softc, with misc cleanup.
 1.12 04-Mar-2007  christos branches: 1.12.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 12-Nov-2006  plunky branches: 1.11.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.10 11-Dec-2005  christos branches: 1.10.20; 1.10.22;
merge ktrace-lwp.
 1.9 06-Feb-2005  tsutsui branches: 1.9.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.8 15-Jul-2003  lukem branches: 1.8.8; 1.8.10;
__KERNEL_RCSID()
 1.7 10-May-2003  tsutsui branches: 1.7.2;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.6 10-May-2003  tsutsui Add a cast missed in the previous.
 1.5 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 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.1 13-Nov-2000  tsubai branches: 1.1.2; 1.1.6; 1.1.10;
Switch to wscons.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.6.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.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.2.1 13-Nov-2000  bouyer file ms_hb.c was added on branch thorpej_scsipi on 2000-11-22 16:01:13 +0000
 1.7.2.5 06-Feb-2005  skrll Sync with HEAD.
 1.7.2.4 27-Jan-2005  skrll Adapt to branch.
 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.10.1 12-Feb-2005  yamt sync with head.
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.9.6.3 03-Sep-2007  yamt sync with head.
 1.9.6.2 30-Dec-2006  yamt sync with head.
 1.9.6.1 21-Jun-2006  yamt sync with head.
 1.10.22.1 10-Dec-2006  yamt sync with head.
 1.10.20.1 18-Nov-2006  ad Sync with head.
 1.11.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.38.1 30-Oct-2012  yamt sync with head
 1.14.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.15.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.3 25-Jan-2001  tsutsui Move NEWS keymap file into MI place to share with news68k.
 1.2 20-Nov-2000  tsutsui branches: 1.2.2;
Fix swapped keycode for '[' and ']'.
 1.1 13-Nov-2000  tsubai Switch to wscons.
 1.2.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.2.1 20-Nov-2000  bouyer file newskeymap.c was added on branch thorpej_scsipi on 2000-11-22 16:01:14 +0000
 1.34 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.33 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.32 24-Apr-2021  thorpej branches: 1.32.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.31 09-Apr-2008  tsutsui branches: 1.31.106;
Split device_t/softc, with misc cleanup.
 1.30 04-Mar-2007  christos branches: 1.30.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.29 18-Feb-2007  tsutsui Add a missing break, which causes bogus debug messages on
check condition during device probe.
 1.28 11-Dec-2005  christos branches: 1.28.24; 1.28.26;
merge ktrace-lwp.
 1.27 06-Feb-2005  tsutsui branches: 1.27.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.26 18-Sep-2004  mycroft branches: 1.26.4; 1.26.6;
We don't need to handle the "cold" flag here.
 1.25 15-Jul-2003  lukem __KERNEL_RCSID()
 1.24 10-May-2003  tsutsui branches: 1.24.2;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.23 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.22 03-May-2003  wiz DMA, not dma nor Dma.
 1.21 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.20 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.19 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.18 14-Nov-2001  thorpej branches: 1.18.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.17 25-Apr-2001  bouyer branches: 1.17.2; 1.17.6;
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.16 03-Dec-2000  matt branches: 1.16.2;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.15 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.14 18-Dec-1999  tsubai Move dma_intr() to here.
 1.13 17-Dec-1999  tsubai Add interrupt level locator and use it instead of hard-coding.
 1.12 17-Dec-1999  tsubai Use hb_intr_establish().
 1.11 30-Sep-1999  thorpej branches: 1.11.2; 1.11.8;
Update for SCSIPI changes.
 1.10 17-Sep-1999  thorpej Centralize the declaration and clearing of `cold'.
 1.9 05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.8 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.7 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.6 21-Aug-1998  tsubai Change vm_offset_t to [pv]addr_t.
 1.5 21-Aug-1998  tsubai Correctly initialize scb struct.
 1.4 10-Jun-1998  tsubai Move static variables to struct softc.
Remove unused struct members.
 1.3 01-Jun-1998  tsubai Change "extern var;" --> "extern int var;" and so on. (for egcs -Wall)
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.11.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.2.4 29-Mar-2001  bouyer Pass compile-test on i386
 1.11.2.3 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 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.
 1.16.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.17.6.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.17.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.17.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.18.2.1 14-Nov-2001  nathanw file sc_wrap.c was added on branch nathanw_sa on 2002-10-18 02:39:12 +0000
 1.24.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.6.1 12-Feb-2005  yamt sync with head.
 1.26.4.1 29-Apr-2005  kent sync with -current
 1.27.6.2 03-Sep-2007  yamt sync with head.
 1.27.6.1 26-Feb-2007  yamt sync with head.
 1.28.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.28.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.28.24.1 24-Feb-2007  bouyer Pull up following revision(s) (requested by tsutsui in ticket #461):
sys/arch/newsmips/dev/sc_wrap.c: revision 1.29
Add a missing break, which causes bogus debug messages on
check condition during device probe.
 1.30.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.31.106.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.32.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.7 09-Apr-2008  tsutsui Split device_t/softc, with misc cleanup.
 1.6 11-Dec-2005  christos branches: 1.6.74;
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 19-Apr-2003  tsutsui branches: 1.4.2;
TAB/space cleanup.
 1.3 31-May-2002  thorpej Use __mips__ instead of mips.
 1.2 15-Feb-1999  hubertf branches: 1.2.22; 1.2.26; 1.2.34;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.34.1 15-Jul-2002  gehenna catch up with -current.
 1.2.26.1 20-Jun-2002  nathanw Catch up to -current.
 1.2.22.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.27 05-Jul-2024  andvar s/vender/vendor/ in comments, log message and fw ohci register property.
 1.26 09-Feb-2024  andvar branches: 1.26.2;
fix spelling mistakes, mainly in comments and log messages.
 1.25 04-Nov-2023  tsutsui Use DELAY(9), not empty for() loop that could be optimized out.

No visible regression on NWS-3260 and NWS-3470.
 1.24 24-Jun-2023  msaitoh Fix typo in comment.
 1.23 21-Jul-2016  christos branches: 1.23.20; 1.23.46;
Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c
 1.22 26-Mar-2016  martin branches: 1.22.2;
David Binderman in PR port-newsmips/51014:
Move initialization of remain_cnt up to the declaration.
XXX the #ifdef here does not make much sense to me, but I know nothing
about the hardware. I'd guess it could be removed or inverted and #error'd
instead.
 1.21 24-Mar-2014  christos branches: 1.21.6;
- fix unused
- use cpu_{g,s}etmodel
 1.20 20-Feb-2011  matt branches: 1.20.4; 1.20.14; 1.20.18;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.19 09-Apr-2008  tsutsui branches: 1.19.22; 1.19.26; 1.19.32; 1.19.34;
Split device_t/softc, with misc cleanup.
 1.18 11-Dec-2005  christos branches: 1.18.74;
merge ktrace-lwp.
 1.17 03-Jun-2005  tsutsui Rename val -> __val in macros to appease gcc -Wshadow.
 1.16 22-May-2005  christos No 0x in front of %p...
 1.15 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.14 13-Feb-2004  wiz branches: 1.14.8; 1.14.10;
Uppercase CPU, plural is CPUs.
 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 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 19-Apr-2003  tsutsui branches: 1.11.2;
TAB/space cleanup.
 1.10 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.9 31-May-2002  thorpej Use __mips__ instead of mips.
 1.8 14-Nov-2001  thorpej branches: 1.8.2; 1.8.10;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.7 16-Sep-2001  wiz branches: 1.7.2;
Grammar improvements in comments.
 1.6 16-Sep-2001  wiz Spell 'occurred' with two 'r's.
 1.5 21-Aug-1998  tsubai branches: 1.5.24; 1.5.26;
Change vm_offset_t to [pv]addr_t.
 1.4 10-Jun-1998  tsubai Move static variables to struct softc.
Remove unused struct members.
 1.3 05-Jun-1998  tsubai Remove excessive cache flush.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.5.26.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.26.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.24.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.2.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.8.10.1 15-Jul-2002  gehenna catch up with -current.
 1.8.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.8.2.1 14-Nov-2001  nathanw file scsi_1185.c was added on branch nathanw_sa on 2002-06-20 03:40:14 +0000
 1.11.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.14.10.1 12-Feb-2005  yamt sync with head.
 1.14.8.1 29-Apr-2005  kent sync with -current
 1.18.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.34.1 05-Mar-2011  bouyer Sync with HEAD
 1.19.32.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.26.1 05-Mar-2011  rmind sync with head
 1.19.22.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.20.18.1 18-May-2014  rmind sync with head
 1.20.14.2 03-Dec-2017  jdolecek update from HEAD
 1.20.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.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.21.6.2 05-Oct-2016  skrll Sync with HEAD
 1.21.6.1 22-Apr-2016  skrll Sync with HEAD
 1.22.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.23.46.1 26-Nov-2023  bouyer Pull up following revision(s) (requested by tsutsui in ticket #462):
sys/arch/newsmips/dev/dmac_0448.h: revision 1.7
sys/arch/newsmips/dev/scsi_1185.c: revision 1.25
Use DELAY(9), not empty for() loop that could be optimized out.
No visible regression on NWS-3260 and NWS-3470.
 1.23.20.1 27-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1764):

sys/arch/newsmips/dev/dmac_0448.h: revision 1.7
sys/arch/newsmips/dev/scsi_1185.c: revision 1.25

Use DELAY(9), not empty for() loop that could be optimized out.
No visible regression on NWS-3260 and NWS-3470.
 1.26.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 21-Aug-1998  tsubai No longer used.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.14 12-Jun-2022  andvar fix few typos in comments.
 1.13 05-Jan-2022  andvar fix typos, mainly s/comand/command/
 1.12 09-Apr-2008  tsutsui Split device_t/softc, with misc cleanup.
 1.11 04-Mar-2007  christos branches: 1.11.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 11-Dec-2005  christos branches: 1.10.26;
merge ktrace-lwp.
 1.9 07-Aug-2003  agc branches: 1.9.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 25-May-2003  tsutsui branches: 1.8.2;
Use splbio to block SCSI interrupts.
 1.7 31-May-2002  thorpej Use __mips__ instead of mips.
 1.6 26-Apr-2001  tsubai branches: 1.6.2; 1.6.8; 1.6.16;
Cosmetic changes.
 1.5 25-Apr-2001  bouyer 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.4 03-Dec-2000  matt branches: 1.4.2;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.3 19-Nov-1998  thorpej branches: 1.3.10;
Adapt to the new scsipi_adapter interface.
 1.2 10-Jun-1998  tsubai Move static variables to struct softc.
Remove unused struct members.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.10.2 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 1.3.10.1 08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.6.16.1 15-Jul-2002  gehenna catch up with -current.
 1.6.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.8.1 26-Apr-2001  nathanw file scsireg.h was added on branch nathanw_sa on 2002-06-20 03:40:15 +0000
 1.6.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.1 03-Sep-2007  yamt sync with head.
 1.10.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 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.3 01-Jun-1998  tsubai branches: 1.3.14;
Change "extern var;" --> "extern int var;" and so on. (for egcs -Wall)
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.3.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.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.4 13-Nov-2000  tsubai Switch to wscons.
 1.3 01-Jun-1998  tsubai branches: 1.3.14;
Change "extern var;" --> "extern int var;" and so on. (for egcs -Wall)
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.1 22-Nov-2000  bouyer Sync with HEAD.
 1.3 13-Nov-2000  tsubai Switch to wscons.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 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.3 15-Feb-1999  hubertf branches: 1.3.8;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.28 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.27 28-Jul-2012  matt Fix -fno-common fallout.
 1.26 26-Jun-2010  tsutsui branches: 1.26.8;
Pull a similar fix from sparc/dev/zs.c rev 1.119:
Establish interrupt handlers with proper softc per each zs device
rather than sharing them among all zs devices and searching softc
in handlers, to avoid possible recursive lock.
 1.25 13-Jun-2008  cegger branches: 1.25.16; 1.25.18;
use device_lookup_private to get softc
 1.24 28-Apr-2008  martin branches: 1.24.2; 1.24.4;
Remove clause 3 and 4 from TNF licenses
 1.23 29-Mar-2008  tsutsui branches: 1.23.2; 1.23.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.22 26-Nov-2007  ad branches: 1.22.14;
Use the softint API.
 1.21 11-Dec-2005  christos branches: 1.21.30; 1.21.48; 1.21.50; 1.21.56;
merge ktrace-lwp.
 1.20 06-Feb-2005  tsutsui branches: 1.20.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.19 15-Jul-2003  lukem branches: 1.19.8; 1.19.10;
__KERNEL_RCSID()
 1.18 25-May-2003  tsutsui branches: 1.18.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.17 26-Apr-2003  tsutsui - Move some common declarations into z8530var.h.
- Fix struct consdev properly.
- Remove register declarations.
- some more KNF.
 1.16 11-Feb-2003  tsutsui Backout previous. <sys/lock.h> is pulled from <sys/tty.h>.
 1.15 10-Feb-2003  tsutsui MI z8530sc driver now requires <sys/lock.h>.
 1.14 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 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 14-Apr-2000  tsubai branches: 1.12.8; 1.12.12; 1.12.20;
Adapt cpu_intr change.
 1.11 26-Dec-1999  tsubai Use software interrupt.
 1.10 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.9 17-Dec-1999  tsubai Add interrupt level locator and use it instead of hard-coding.
 1.8 17-Dec-1999  tsubai Use hb_intr_establish().
 1.7 27-Mar-1999  wrstuden branches: 1.7.8; 1.7.14;
Add pps support. Only enable pps if CLOCAL & !MDMBUF.
 1.6 11-Feb-1999  mycroft Minor cleanup.
Make the initializer for BAUDLO depend on PCLK directly; it was incorrect on
some ports where PCLK is not 4.9152MHz.
XXX Is the default value actually used?
 1.5 03-Feb-1999  mycroft Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
 1.4 21-Nov-1998  tsubai Flush write buffer in ZS_DELAY().
 1.3 21-Aug-1998  tsubai Add #ifdef DDB around Debugger();
 1.2 05-Jun-1998  tsubai Add support for NWB-231A 4-port RS-232C card.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.7.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.12.20.1 19-May-2002  gehenna Remove hard-coded major.
 1.12.12.2 03-Jan-2003  thorpej Sync with HEAD.
 1.12.12.1 17-Sep-2002  nathanw Catch up to -current.
 1.12.8.1 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.4 06-Feb-2005  skrll Sync with HEAD.
 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.10.1 12-Feb-2005  yamt sync with head.
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.20.6.1 07-Dec-2007  yamt sync with head
 1.21.56.1 08-Dec-2007  mjf Sync with HEAD.
 1.21.50.1 09-Jan-2008  matt sync with HEAD
 1.21.48.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.21.30.1 03-Dec-2007  ad Sync with HEAD.
 1.22.14.3 29-Jun-2008  mjf Sync with HEAD.
 1.22.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.22.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.23.4.3 11-Aug-2010  yamt sync with head.
 1.23.4.2 04-May-2009  yamt sync with head.
 1.23.4.1 16-May-2008  yamt sync with head.
 1.23.2.2 17-Jun-2008  yamt sync with head.
 1.23.2.1 18-May-2008  yamt sync with head.
 1.24.4.1 18-Jun-2008  simonb Sync with head.
 1.24.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.25.18.1 03-Jul-2010  rmind sync with head
 1.25.16.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.26.8.1 30-Oct-2012  yamt sync with head
 1.30 25-Oct-2023  tsutsui Don't use aprint_error(9) for a normal attach message.

Found on testing NetBSD/newsmips 9.3 on NWS-3260 sent from
ryo@'s belongings.
 1.29 07-Aug-2021  thorpej branches: 1.29.6;
Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.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.27 21-Jul-2016  christos branches: 1.27.20; 1.27.30;
Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c
 1.26 26-Jun-2010  tsutsui branches: 1.26.18; 1.26.36; 1.26.40;
Pull a similar fix from sparc/dev/zs.c rev 1.119:
Establish interrupt handlers with proper softc per each zs device
rather than sharing them among all zs devices and searching softc
in handlers, to avoid possible recursive lock.
 1.25 28-Apr-2008  martin branches: 1.25.20; 1.25.22;
Remove clause 3 and 4 from TNF licenses
 1.24 29-Mar-2008  tsutsui branches: 1.24.2; 1.24.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.23 26-Nov-2007  ad branches: 1.23.14;
Use the softint API.
 1.22 09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.21 29-Mar-2006  thorpej branches: 1.21.18; 1.21.36; 1.21.38; 1.21.42; 1.21.44;
Use device_cfdata().
 1.20 28-Mar-2006  thorpej Use device_unit().
 1.19 11-Dec-2005  christos branches: 1.19.4; 1.19.6; 1.19.8; 1.19.10; 1.19.12;
merge ktrace-lwp.
 1.18 06-Feb-2005  tsutsui branches: 1.18.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.17 15-Jul-2003  lukem branches: 1.17.8; 1.17.10;
__KERNEL_RCSID()
 1.16 25-May-2003  tsutsui branches: 1.16.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.15 10-May-2003  tsutsui - Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.14 10-May-2003  tsutsui Call zshard() twice in zshard_hb() interrupt handler for workaround
otherwise news3400 sometimes losts zs interrupts.

This should fix "serial console hiccups on sysinst" problem
reported by Mauricio <raub at kudria.com> on port-newsmips.
 1.13 09-May-2003  tsutsui Remove bogus comments.
 1.12 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.11 26-Apr-2003  tsutsui - Move some common declarations into z8530var.h.
- Fix struct consdev properly.
- Remove register declarations.
- some more KNF.
 1.10 11-Feb-2003  tsutsui Backout previous. <sys/lock.h> is pulled from <sys/tty.h>.
 1.9 10-Feb-2003  tsutsui MI z8530sc driver now requires <sys/lock.h>.
 1.8 28-Jan-2003  pk Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.7 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 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.4 06-Mar-2000  thorpej branches: 1.4.6; 1.4.10; 1.4.14; 1.4.22; 1.4.24;
- Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
 1.3 23-Jan-2000  tsubai Use flags to determine PCLK rather than use unit number.
 1.2 26-Dec-1999  tsubai Use software interrupt.
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.4.24.1 24-Jun-2003  grant Pull up revision 1.14 (requested by tsutsui in ticket #1286):

Call zshard() twice in zshard_hb() interrupt handler for workaround
otherwise news3400 sometimes losts zs interrupts.

This should fix "serial console hiccups on sysinst" problem
reported by Mauricio <raub at kudria.com> on port-newsmips.
 1.4.22.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.4.14.2 18-Oct-2002  nathanw Catch up to -current.
 1.4.14.1 17-Sep-2002  nathanw Catch up to -current.
 1.4.10.1 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.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.
 1.4.6.1 06-Mar-2000  bouyer file zs_hb.c was added on branch thorpej_scsipi on 2000-11-20 20:17:22 +0000
 1.16.2.4 06-Feb-2005  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.17.10.1 12-Feb-2005  yamt sync with head.
 1.17.8.1 29-Apr-2005  kent sync with -current
 1.18.6.3 07-Dec-2007  yamt sync with head
 1.18.6.2 15-Nov-2007  yamt sync with head.
 1.18.6.1 21-Jun-2006  yamt sync with head.
 1.19.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.19.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.19.8.1 01-Apr-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.21.44.2 08-Dec-2007  mjf Sync with HEAD.
 1.21.44.1 19-Nov-2007  mjf Sync with HEAD.
 1.21.42.1 13-Nov-2007  bouyer Sync with HEAD
 1.21.38.1 09-Jan-2008  matt sync with HEAD
 1.21.36.2 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.21.36.1 11-Nov-2007  joerg Sync with HEAD.
 1.21.18.1 03-Dec-2007  ad Sync with HEAD.
 1.23.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.23.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.24.4.2 11-Aug-2010  yamt sync with head.
 1.24.4.1 16-May-2008  yamt sync with head.
 1.24.2.1 18-May-2008  yamt sync with head.
 1.25.22.1 03-Jul-2010  rmind sync with head
 1.25.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.26.40.1 26-Jul-2016  pgoyette Sync with HEAD
 1.26.36.1 05-Oct-2016  skrll Sync with HEAD
 1.26.18.1 03-Dec-2017  jdolecek update from HEAD
 1.27.30.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.20.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1760):

sys/arch/newsmips/dev/zs_hb.c: revision 1.30

Don't use aprint_error(9) for a normal attach message.
 1.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.29.6.1 05-Nov-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #456):

sys/arch/newsmips/dev/zs_hb.c: revision 1.30

Don't use aprint_error(9) for a normal attach message.
 1.39 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.38 12-Jul-2018  maxv branches: 1.38.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.37 21-Dec-2015  christos branches: 1.37.16; 1.37.18;
Add mips fenv.h (From FreeBSD)
 1.36 23-Jul-2014  alnsn branches: 1.36.4;
Rename sljitarch.h to sljit_machdep.h.
 1.35 25-Nov-2012  alnsn branches: 1.35.10;
Add sljitarch.h to all mips machines.
 1.34 17-Jul-2011  joerg branches: 1.34.2; 1.34.12;
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.33 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.32 18-Feb-2007  tsutsui branches: 1.32.46;
Install mutex.h and rwlock.h.
 1.31 26-Jul-2006  drochner branches: 1.31.10;
don't install <machine/db_machdep.h>, this is kernel only
 1.30 11-Dec-2005  christos branches: 1.30.4; 1.30.8;
merge ktrace-lwp.
 1.29 01-Aug-2004  uch branches: 1.29.12;
add NEWSMIPS_WSDISPLAYIO_GINFO ioctl to get frame buffer stride.
 1.28 08-May-2004  kleink Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.27 18-Jan-2003  thorpej branches: 1.27.2;
Merge the nathanw_sa branch.
 1.26 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.25 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.24 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.23 11-Jul-2002  jdolecek do not install apbus.h, apcall.h, romcall.h
 1.22 15-Apr-2001  kleink branches: 1.22.2; 1.22.8; 1.22.16; 1.22.18;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.21 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.20 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.19 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.18 13-Nov-2000  tsubai branches: 1.18.2;
No longer used.
 1.17 26-Jun-2000  kleink Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.16 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.15 30-Mar-2000  soren Add asm.h like other ports.
 1.14 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.13 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.12 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.11 09-Nov-1999  kleink Per discussion on tech-toolchain, remove MIPS-specific <machine/elf.h> header;
all the information is available from <sys/exec_elf.h>.
 1.10 30-Aug-1999  mrg branches: 1.10.2; 1.10.4; 1.10.8;
install ieee.h
 1.9 08-Jul-1999  tsubai Define ROM monitor interfaces.
 1.8 30-Mar-1999  soda branches: 1.8.4;
regdef.h
 1.7 13-Mar-1999  drochner g/c regdef.h
 1.6 17-Feb-1999  tsubai Use mips/varargs.h.
 1.5 12-Feb-1999  tsubai Add missing backslash.
 1.4 31-Jan-1999  castor Remove genpubasym.cf stuff
 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 15-Jan-1999  castor allow generated kernel includes and support mips pubassym.cf mechanism
 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.8.4.1 02-Aug-1999  thorpej Update from trunk.
 1.10.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.4.1 15-Nov-1999  fvdl Sync with -current
 1.10.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.10.2.2 22-Nov-2000  bouyer Sync with HEAD.
 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.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.22.18.1 11-Jul-2002  thorpej pullup-1-6 ticket #479 (jdolecek).

Original log message:
do not install apbus.h, apcall.h, romcall.h
 1.22.16.3 31-Aug-2002  gehenna catch up with -current.
 1.22.16.2 16-Jul-2002  gehenna catch up with -current.
 1.22.16.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.22.8.6 11-Dec-2002  thorpej Sync with HEAD.
 1.22.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.22.8.4 13-Aug-2002  nathanw Catch up to -current.
 1.22.8.3 01-Aug-2002  nathanw Catch up to -current.
 1.22.8.2 17-Nov-2001  wdk mcontext support for MIPS based ports.
 1.22.8.1 15-Apr-2001  wdk file Makefile was added on branch nathanw_sa on 2001-11-17 23:12:10 +0000
 1.22.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.22.2.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.27.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.27.2.2 05-Aug-2004  skrll Fix some merge mistakes.
 1.27.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.12.2 26-Feb-2007  yamt sync with head.
 1.29.12.1 30-Dec-2006  yamt sync with head.
 1.30.8.1 11-Aug-2006  yamt sync with head
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.31.10.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.32.46.1 19-Aug-2009  yamt sync with head.
 1.34.12.3 03-Dec-2017  jdolecek update from HEAD
 1.34.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34.12.1 25-Feb-2013  tls resync with head
 1.34.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.35.10.1 10-Aug-2014  tls Rebase.
 1.36.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.37.18.1 10-Jun-2019  christos Sync with HEAD
 1.37.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.38.36.1 02-Aug-2025  perseant Sync with HEAD
 1.9 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.8 11-Dec-2005  christos branches: 1.8.164; 1.8.166;
merge ktrace-lwp.
 1.7 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.6 18-Oct-2000  onoe branches: 1.6.24;
Move APbus dependent unmapped DMA address stuff from bus.c to apbus.c
Support DMA mapping table with NEWSMIPS_DMAMAP_MAPTBL flag for APbus
(MAPTBL is not tested yet).
 1.5 12-Oct-2000  onoe Add address for free running 1MHz 1counter.
Add registers for APbus I/F gatearray.
 1.4 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.3 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.6.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.24.1 03-Aug-2004  skrll Sync with HEAD
 1.8.166.1 10-Jun-2019  christos Sync with HEAD
 1.8.164.1 20-Oct-2018  pgoyette Sync with head
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.1 18-Feb-1998  tsubai branches: 1.1.154; 1.1.168;
Initial import of NetBSD/news.
 1.1.168.1 24-Oct-2010  jym Sync with HEAD
 1.1.154.1 19-Aug-2009  yamt sync with head.
 1.7 19-Oct-2018  tsutsui Reorganize APbus zs(4) console handling.

- set sccport0a address on early startup and use it for cnputc and cngetc
- explicitly initialize zs chip in the cninit function so that zs console
can be used even if it is not initialized by PROM firmware

Tested on both news50000 and news4000.
 1.6 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.5 11-Dec-2005  christos branches: 1.5.164; 1.5.166;
merge ktrace-lwp.
 1.4 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.3 03-Dec-2000  matt branches: 1.3.24; 1.3.32; 1.3.34;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.2 23-Dec-1999  tsubai branches: 1.2.6;
* Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2.6.3 08-Dec-2000  bouyer 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.
 1.2.6.1 23-Dec-1999  bouyer file apbus.h was added on branch thorpej_scsipi on 2000-11-20 20:17:23 +0000
 1.3.34.1 12-Feb-2005  yamt sync with head.
 1.3.32.1 29-Apr-2005  kent sync with -current
 1.3.24.1 06-Feb-2005  skrll Sync with HEAD.
 1.5.166.1 10-Jun-2019  christos Sync with HEAD
 1.5.164.1 20-Oct-2018  pgoyette Sync with head
 1.3 13-Apr-2002  tsutsui Add some ioctl() definitions to eject floppy.
 1.2 23-Dec-1999  tsubai branches: 1.2.6; 1.2.10; 1.2.14;
* Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2.14.1 17-Apr-2002  nathanw Catch up to -current.
 1.2.10.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.
 1.2.6.1 23-Dec-1999  bouyer file apcall.h was added on branch thorpej_scsipi on 2000-11-20 20:17:23 +0000
 1.1 30-Mar-2000  soren branches: 1.1.6;
Add asm.h like other ports.
 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.
 1.1.6.1 30-Mar-2000  bouyer file asm.h was added on branch thorpej_scsipi on 2000-11-20 20:17:23 +0000
 1.9 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.8 22-Mar-2003  simonb Fix a grammatical nit.
 1.7 09-Oct-2002  jdolecek make ca_name of struct confargs const
 1.6 17-Dec-1999  tsubai branches: 1.6.8; 1.6.12;
Add interrupt level locator and use it instead of hard-coding.
 1.5 17-Dec-1999  tsubai Implement hb_intr_establish().
 1.4 17-Oct-1999  tsubai branches: 1.4.2;
Rearrange splxxx (from pmax). Closes PR 8445.
 1.3 06-Oct-1998  thorpej branches: 1.3.12;
configure() prototype is in <sys/device.h>
 1.2 05-Jun-1998  tsubai Add support for NWB-231A 4-port RS-232C card.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.6.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.1 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 11-Dec-2005  christos merge ktrace-lwp.
 1.3 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.2 24-Mar-2004  drochner branches: 1.2.8; 1.2.10;
remove license clauses 3 and 4 from my cpoyright notices
 1.1 18-Dec-1999  tsubai branches: 1.1.2; 1.1.8; 1.1.32;
Introduce bootinfo.
 1.1.32.4 06-Feb-2005  skrll Sync with HEAD.
 1.1.32.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.32.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.32.1 03-Aug-2004  skrll Sync with HEAD
 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.
 1.1.8.1 18-Dec-1999  bouyer file bootinfo.h was added on branch thorpej_scsipi on 2000-11-20 20:17:24 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.10.1 12-Feb-2005  yamt sync with head.
 1.2.8.1 29-Apr-2005  kent sync with -current
 1.3 12-Aug-2009  matt Nuke a.out support for MIPS.
 1.2 04-Sep-2001  simonb branches: 1.2.6; 1.2.128; 1.2.142;
Remove comment duplicated in <mips/bsd-aout.h>.
 1.1 18-Feb-1998  tsubai branches: 1.1.28;
Initial import of NetBSD/news.
 1.1.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.142.1 24-Oct-2010  jym Sync with HEAD
 1.2.128.1 19-Aug-2009  yamt sync with head.
 1.2.6.2 04-Sep-2001  simonb Remove comment duplicated in <mips/bsd-aout.h>.
 1.2.6.1 04-Sep-2001  simonb file bsd-aout.h was added on branch nathanw_sa on 2001-09-04 07:36:12 +0000
 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.23 23-Jan-2021  christos Remove cargo-culted '#if 0' code that was designed to produce a
compile-time error if any of the bus_space_*_8 functions was used,
but was documented that it produces a link-time error.
 1.22 02-Apr-2020  msaitoh branches: 1.22.4;
s/impliment/implement/ in comment.
 1.21 23-Sep-2019  skrll Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.20 12-Feb-2012  matt branches: 1.20.48;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.19 28-Apr-2008  martin branches: 1.19.34; 1.19.38;
Remove clause 3 and 4 from TNF licenses
 1.18 04-Mar-2007  christos branches: 1.18.40; 1.18.42; 1.18.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 21-Feb-2007  mrg add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to. this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
 1.16 26-May-2006  tsutsui branches: 1.16.12;
Tweak bus_space_barrier(9) macro to appease
"left-hand operand of comma expression has no effect"
warnings by gcc4.
 1.15 01-Mar-2006  yamt branches: 1.15.2; 1.15.8;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.14 16-Feb-2006  perry 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.13 24-Dec-2005  perry branches: 1.13.2; 1.13.4; 1.13.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 09-Mar-2005  matt branches: 1.11.4;
Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.10 06-Feb-2005  tsutsui one more u_intNN_t -> uintNN_t
 1.9 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.8 15-Jun-2003  fvdl branches: 1.8.2; 1.8.10; 1.8.12;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.7 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.6 17-Mar-2002  simonb Make sure that private DMA flags don't overlap with standard DMA flags;
start these at 0x10000 to leave room for an increase in the latter.
 1.5 14-Nov-2001  thorpej branches: 1.5.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.4 19-Jul-2001  thorpej branches: 1.4.4;
Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
 1.3 07-Mar-2001  thorpej branches: 1.3.2;
Add the BUS_DMA_STREAMING flag.
 1.2 18-Oct-2000  onoe branches: 1.2.2; 1.2.4;
Move APbus dependent unmapped DMA address stuff from bus.c to apbus.c
Support DMA mapping table with NEWSMIPS_DMAMAP_MAPTBL flag for APbus
(MAPTBL is not tested yet).
 1.1 12-Oct-2000  onoe Bus I/O and DMA access macros/routines.
 1.2.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.2.3 12-Mar-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.
 1.2.2.1 18-Oct-2000  bouyer file bus.h was added on branch thorpej_scsipi on 2000-11-20 20:17:24 +0000
 1.3.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 03-Aug-2001  lukem update to -current
 1.4.4.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.5.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.2.1 14-Nov-2001  nathanw file bus.h was added on branch nathanw_sa on 2002-04-01 07:41:42 +0000
 1.8.12.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.12.1 12-Feb-2005  yamt sync with head.
 1.8.10.1 29-Apr-2005  kent sync with -current
 1.8.2.2 01-Apr-2005  skrll Sync with HEAD.
 1.8.2.1 06-Feb-2005  skrll Sync with HEAD.
 1.11.4.3 03-Sep-2007  yamt sync with head.
 1.11.4.2 26-Feb-2007  yamt sync with head.
 1.11.4.1 21-Jun-2006  yamt sync with head.
 1.13.6.2 01-Jun-2006  kardel 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.13.2.2 18-Feb-2006  yamt _dm_proc -> _dm_vmspace.
 1.13.2.1 18-Feb-2006  yamt sync with head.
 1.15.8.1 19-Jun-2006  chap Sync with head.
 1.15.2.1 26-Jun-2006  yamt sync with head.
 1.16.12.2 12-Mar-2007  rmind Sync with HEAD.
 1.16.12.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.18.44.1 16-May-2008  yamt sync with head.
 1.18.42.1 18-May-2008  yamt sync with head.
 1.18.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.38.1 18-Feb-2012  mrg merge to -current.
 1.19.34.1 17-Apr-2012  yamt sync with head
 1.20.48.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.20.48.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.22.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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 27-Feb-2002  christos branches: 1.6.8;
- define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.5 13-Nov-2000  tsubai branches: 1.5.4; 1.5.8;
Switch to wscons.
 1.4 15-Feb-1999  hubertf branches: 1.4.8;
RCS ID police
 1.3 13-Nov-1998  oster Updating of bdev's and cdev's to support RAIDframe.
 1.2 10-Oct-1998  thorpej Add scsibus entry points to the cdevsw[].
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.5.8.2 17-Sep-2002  nathanw Catch up to -current.
 1.5.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.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.5.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6.8.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.17 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.16 09-May-2003  tsutsui branches: 1.16.192; 1.16.194;
- Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.15 26-Apr-2003  tsutsui - Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.
 1.14 20-Sep-2001  tsutsui branches: 1.14.4;
bootloader requires systype values so change
#ifdef _KERNEL -> #if defined(_KERNEL) || defined(_STANDALONE)
 1.13 16-Sep-2001  tsutsui Wrap some declarations with #ifdef _KERNEL and #ifndef _LOCORE .
 1.12 04-Sep-2001  simonb branches: 1.12.2;
May as well include <mips/cpuregs.h> in <mips/cpu.h> once rather than
in every MIPS port's <machine/cpu.h>.
 1.11 04-Sep-2001  simonb Centralise struct cpu_info declaration and related info to <mips/cpu.h>.
 1.10 30-May-2001  mrg branches: 1.10.2;
use _KERNEL_OPT
 1.9 30-May-2000  tsubai branches: 1.9.4;
Add cpu_number().
 1.8 26-May-2000  thorpej branches: 1.8.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.7 14-Apr-2000  tsubai Adapt cpu_intr change.
 1.6 24-Mar-2000  soren Revert previous.
 1.5 24-Mar-2000  soren Move sysctl definitions from arch/mips to arch/foo.
 1.4 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.3 16-Jan-1999  nisimura branches: 1.3.8;
- Add two macros to deal with a recent change in mips/trap.c.
 1.2 26-Mar-1998  tsubai Add MIPS_INT_MASK_FPU definition and remove unnecessary code.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.8.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.14.4.2 20-Sep-2001  tsutsui bootloader requires systype values so change
#ifdef _KERNEL -> #if defined(_KERNEL) || defined(_STANDALONE)
 1.14.4.1 20-Sep-2001  tsutsui file cpu.h was added on branch nathanw_sa on 2001-09-20 12:29:49 +0000
 1.16.194.1 10-Jun-2019  christos Sync with HEAD
 1.16.192.1 20-Oct-2018  pgoyette Sync with head
 1.1 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.4 09-Jul-2011  matt Default to DB_ELF_SYMBOLS and DB_ELFSIZE 32
 1.3 04-Sep-2001  simonb branches: 1.3.6;
Standardise the format of MIPS' <machine/db_machdep.h>.
 1.2 26-Mar-1999  tsubai branches: 1.2.22;
Define DB_ELF_SYMBOLS to compile.
(currently /boot doesn't preserve symbols.)
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.6.2 04-Sep-2001  simonb Standardise the format of MIPS' <machine/db_machdep.h>.
 1.3.6.1 04-Sep-2001  simonb file db_machdep.h was added on branch nathanw_sa on 2001-09-04 07:43:31 +0000
 1.2 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.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2 08-Mar-1999  tsubai Use mips/ecoff_machdep.h.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2 09-Nov-1999  kleink Per discussion on tech-toolchain, remove MIPS-specific <machine/elf.h> header;
all the information is available from <sys/exec_elf.h>.
 1.1 18-Feb-1998  tsubai branches: 1.1.14; 1.1.16; 1.1.20;
Initial import of NetBSD/news.
 1.1.20.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.16.1 15-Nov-1999  fvdl Sync with -current
 1.1.14.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.2 25-Oct-1999  kleink branches: 1.2.136; 1.2.154;
Update to match new SVR4-style definition names in <sys/exec_elf.h>.
 1.1 18-Feb-1998  tsubai branches: 1.1.14; 1.1.16; 1.1.18;
Initial import of NetBSD/news.
 1.1.18.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.16.1 15-Nov-1999  fvdl Sync with -current
 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.
 1.2.154.1 22-Aug-2009  matt Move ELF{32,64}_MACHDEP_ENDIANNESS to <mips/elf_machdep.h>
 1.2.136.1 11-Mar-2010  yamt sync with head
 1.4 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.3 16-Mar-2000  mycroft Foolish consistency. Mainly, always use underscores and sys/endian.h.
 1.2 24-Jan-1999  mycroft branches: 1.2.8;
Format consistency.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 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.
 1.1.6.1 17-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:17:25 +0000
 1.1 21-Dec-2015  christos branches: 1.1.2; 1.1.18;
Add mips fenv.h (From FreeBSD)
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:33 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:39 +0000
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3 13-Nov-2000  tsubai No longer used.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.2 30-Aug-1999  mycroft A foolish consistency.
 1.1 29-Aug-1999  mycroft Add ieee.h.
 1.3 04-Sep-2001  simonb branches: 1.3.6;
Clean up.
 1.2 15-Feb-1999  hubertf branches: 1.2.22;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.6.2 04-Sep-2001  simonb Clean up.
 1.3.6.1 04-Sep-2001  simonb file ieeefp.h was added on branch nathanw_sa on 2001-09-04 06:26:20 +0000
 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:41 +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:54:22 +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:15 +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:54:22 +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:10 +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:54:22 +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:59 +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:54:22 +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.
 1.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 20:17:25 +0000
 1.27 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.26 21-Jul-2016  christos branches: 1.26.14; 1.26.16;
Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c
 1.25 20-Feb-2011  matt branches: 1.25.14; 1.25.32; 1.25.36;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.24 10-Apr-2009  tsutsui branches: 1.24.4; 1.24.6; 1.24.8;
Include <sys/evcnt.h> instead of <sys/device.h> for struct evcnt
to avoid recursive dependency.
 1.23 28-Apr-2008  martin branches: 1.23.8; 1.23.14; 1.23.18;
Remove clause 3 and 4 from TNF licenses
 1.22 03-Dec-2007  ad branches: 1.22.14; 1.22.16; 1.22.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.21 17-Oct-2007  garbled branches: 1.21.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.20 17-Jun-2007  tsutsui branches: 1.20.8; 1.20.10;
Move declaretions of _spl*() and _{clr,set}softintr() functions
(which are in mips/locore.S) into <mips/locore.h>
from various MD files.
 1.19 16-Feb-2007  ad branches: 1.19.6; 1.19.8; 1.19.14;
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.18 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.17 11-Dec-2005  christos branches: 1.17.20; 1.17.22;
merge ktrace-lwp.
 1.16 06-Feb-2005  tsutsui branches: 1.16.6;
Change u_int -> uint32_t, u_char,char -> uint8_t where appropriate.
 1.15 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.14 25-Oct-2003  tsutsui branches: 1.14.8; 1.14.10;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.13 25-May-2003  tsutsui branches: 1.13.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.12 10-May-2003  tsutsui - Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.11 13-Apr-2001  thorpej branches: 1.11.8;
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.10 14-Jan-2001  thorpej branches: 1.10.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.9 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.8 21-Aug-2000  thorpej Make sure we provide splsched() as described in spl(9).
 1.7 14-Apr-2000  tsubai Adapt cpu_intr change.
 1.6 31-Dec-1999  tsubai Add zs softint definition. (I forgot to commit this...)
 1.5 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.4 17-Oct-1999  tsubai branches: 1.4.2;
Rearrange splxxx (from pmax). Closes PR 8445.
 1.3 05-Aug-1999  thorpej branches: 1.3.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.2 26-Aug-1998  tsubai Add MD DELAY and spl routines to fit Nisimura's change.
 1.1 08-Jun-1998  tsubai Introduce newsmips_intr_t for intrcnt[].
 1.3.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 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.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.2 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.11.8.1 13-Apr-2001  thorpej file intr.h was added on branch nathanw_sa on 2001-04-13 23:30:03 +0000
 1.13.2.4 06-Feb-2005  skrll Sync with HEAD.
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.10.1 12-Feb-2005  yamt sync with head.
 1.14.8.1 29-Apr-2005  kent sync with -current
 1.16.6.4 07-Dec-2007  yamt sync with head
 1.16.6.3 03-Sep-2007  yamt sync with head.
 1.16.6.2 26-Feb-2007  yamt sync with head.
 1.16.6.1 30-Dec-2006  yamt sync with head.
 1.17.22.2 22-Sep-2006  yamt fix softintr for following ports. (hopefully)
hpcmips
evbmips
algor
arc
ews4800mips
newsmips
 1.17.22.1 21-Sep-2006  yamt - implement splraiseipl for algor, arc, ews4800mips, hpcmips, and newsmips.
- tweak evbmips version to match with others.
XXX i think these ought to be merged.
 1.17.20.1 12-Jan-2007  ad Sync with head.
 1.19.14.1 26-Jun-2007  garbled Sync with HEAD.
 1.19.8.1 11-Jul-2007  mjf Sync with head.
 1.19.6.2 03-Dec-2007  ad Sync with HEAD.
 1.19.6.1 15-Jul-2007  ad Sync with head.
 1.20.10.2 09-Jan-2008  matt sync with HEAD
 1.20.10.1 06-Nov-2007  matt sync with HEAD
 1.20.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.21.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.22.18.2 04-May-2009  yamt sync with head.
 1.22.18.1 16-May-2008  yamt sync with head.
 1.22.16.1 18-May-2008  yamt sync with head.
 1.22.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.18.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.23.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.24.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.24.4.1 05-Mar-2011  rmind sync with head
 1.25.36.1 26-Jul-2016  pgoyette Sync with HEAD
 1.25.32.1 05-Oct-2016  skrll Sync with HEAD
 1.25.14.1 03-Dec-2017  jdolecek update from HEAD
 1.26.16.1 10-Jun-2019  christos Sync with HEAD
 1.26.14.1 20-Oct-2018  pgoyette Sync with head
 1.1 19-Feb-1998  thorpej Use the generic NetBSD/mips crash dump code.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3 13-Nov-2000  tsubai No longer used.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.2 31-Aug-2001  simonb branches: 1.2.6;
G/C the unused kernel-only CLK_TCK #define.

XXX: does include/time.h still need <machine/limits.h>?
 1.1 18-Feb-1998  tsubai branches: 1.1.28;
Initial import of NetBSD/news.
 1.1.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.2 31-Aug-2001  simonb G/C the unused kernel-only CLK_TCK #define.

XXX: does include/time.h still need <machine/limits.h>?
 1.2.6.1 31-Aug-2001  simonb file limits.h was added on branch nathanw_sa on 2001-08-31 03:46:04 +0000
 1.5 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.4 28-Apr-2008  martin branches: 1.4.44; 1.4.60;
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 08-Jul-1999  tsubai branches: 1.1.2; 1.1.18; 1.1.20;
Forgot to add this...
 1.1.20.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.18.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.1.2.1 08-Jul-1999  thorpej file loadfile_machdep.h was added on branch chs-ubc2 on 1999-08-02 19:58:23 +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:48 +0000
 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.60.1 10-Aug-2014  tls Rebase.
 1.4.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 31-Aug-2001  simonb branches: 1.2.6;
Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
 1.1 29-Apr-2000  thorpej branches: 1.1.6; 1.1.10;
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.10.1 13-Sep-2001  thorpej Update the kqueue branch to 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.
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:17:25 +0000
 1.2.6.2 31-Aug-2001  simonb Remove an unneeded comment; ``sync'' with other "just include <mips/foo.h>"
files.
 1.2.6.1 31-Aug-2001  simonb file lock.h was added on branch nathanw_sa on 2001-08-31 03:53:24 +0000
 1.2 05-Jun-2002  simonb Simplify include files that just include <mips/locore.h>.
 1.1 18-Feb-1998  tsubai branches: 1.1.28; 1.1.32; 1.1.40;
Initial import of NetBSD/news.
 1.1.40.1 15-Jul-2002  gehenna catch up with -current.
 1.1.32.1 20-Jun-2002  nathanw Catch up to -current.
 1.1.28.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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:58 +0000
 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 15-Feb-1999  hubertf branches: 1.2.42;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.42.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.42.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.42.1 03-Aug-2004  skrll Sync with HEAD
 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.
 1.1.6.1 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 20:17:25 +0000
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 17-Nov-2001  wdk branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 17-Nov-2001  wdk mcontext support for MIPS based ports.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3 13-Nov-2000  tsubai No longer used.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.1 22-Nov-2000  bouyer 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:07:40 +0000
 1.22 07-Jan-2019  jdolecek move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports

also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
 1.21 18-Mar-2011  tsutsui branches: 1.21.54; 1.21.56;
- include <mips/mips_param.h> after MACHINE is defined
- remove redundant comment
 1.20 06-Mar-2011  he Now that MACHINE is defined in user-land in either
mips/include/mips_param.h or powerpc/include/param.h, stop
trying to re-define it in the port-specific param.h files
when _KERNEL isn't defined.
 1.19 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.18 14-Dec-2009  matt branches: 1.18.4; 1.18.6; 1.18.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.17 13-Aug-2009  matt Move MID_MACHINE to <mips/mips_param.h> and use local values so we don't
need to include exec_aout.h
 1.16 17-Oct-2007  garbled branches: 1.16.20; 1.16.38;
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.15 17-Jul-2007  he branches: 1.15.10;
Patterned after sgimips, move include of <machine/intr.h> to only be done
when _KERNEL is defined and _LOCORE isn't. Fixes build problem in the
extent regression test.
 1.14 26-Sep-2006  tsutsui branches: 1.14.8; 1.14.16;
Protect from multiple inclusion.
 1.13 27-Aug-2006  tsutsui branches: 1.13.2; 1.13.4;
Replace DELAY(9) macro with inline version which uses an asm statement
otherwise gcc4 will omit it completely on optimization.

XXX: some other mips ports have the same problem.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.8;
merge ktrace-lwp.
 1.11 06-Feb-2005  tsutsui branches: 1.11.6;
- remove __P()
- use do{}while(0) and remove register decl for DELAY() macro
 1.10 07-Aug-2003  agc branches: 1.10.8; 1.10.10;
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-Feb-2002  simonb branches: 1.9.16;
Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.8 30-May-2001  mrg branches: 1.8.2; 1.8.8;
use _KERNEL_OPT
 1.7 30-Jun-2000  itojun branches: 1.7.2;
raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
 1.6 04-Dec-1999  ragge branches: 1.6.4;
CL* discarding.
 1.5 09-Feb-1999  tv branches: 1.5.8; 1.5.14;
Split the "mips" MACHINE_ARCH for 1.4. newsmips is "mipseb"; pmax is
"mipsel".
 1.4 26-Aug-1998  tsubai Add MD DELAY and spl routines to fit Nisimura's change.
 1.3 29-Apr-1998  thorpej Pull in opt_gateway.h as appropriate.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.5.14.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.14.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.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.
 1.6.4.1 23-Jul-2000  itojun pullup from main trunc (approved by releng-1-5)

raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.

1.1 -> 1.2 syssrc/sys/arch/amigappc/include/param.h
1.13 -> 1.14 syssrc/sys/arch/arc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/arm26/include/param.h
1.17 -> 1.18 syssrc/sys/arch/arm32/include/param.h
1.6 -> 1.7 syssrc/sys/arch/bebox/include/param.h
1.4 -> 1.5 syssrc/sys/arch/cobalt/include/param.h
1.4 -> 1.5 syssrc/sys/arch/evbsh3/include/param.h
1.2 -> 1.3 syssrc/sys/arch/hpcmips/include/param.h
1.40 -> 1.41 syssrc/sys/arch/i386/include/param.h
1.7 -> 1.8 syssrc/sys/arch/m68k/include/param.h
1.9 -> 1.10 syssrc/sys/arch/macppc/include/param.h
1.4 -> 1.5 syssrc/sys/arch/mmeye/include/param.h
1.6 -> 1.7 syssrc/sys/arch/newsmips/include/param.h
1.7 -> 1.8 syssrc/sys/arch/ofppc/include/param.h
1.23 -> 1.24 syssrc/sys/arch/pc532/include/param.h
1.32 -> 1.33 syssrc/sys/arch/pmax/include/param.h
1.7 -> 1.8 syssrc/sys/arch/powerpc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/prep/include/param.h
1.1 -> 1.2 syssrc/sys/arch/sgimips/include/param.h
1.3 -> 1.4 syssrc/sys/arch/sh3/include/param.h
1.44 -> 1.45 syssrc/sys/arch/sparc/include/param.h
1.21 -> 1.22 syssrc/sys/arch/sparc64/include/param.h
1.43 -> 1.44 syssrc/sys/arch/vax/include/param.h
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.8.8.1 30-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-02-28 04:11:16 +0000
 1.8.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.9.16.4 06-Feb-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.10.1 12-Feb-2005  yamt sync with head.
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.11.6.2 03-Sep-2007  yamt sync with head.
 1.11.6.1 30-Dec-2006  yamt sync with head.
 1.12.8.1 03-Sep-2006  yamt sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.4.1 22-Oct-2006  yamt sync with head
 1.13.2.1 18-Nov-2006  ad Sync with head.
 1.14.16.1 03-Oct-2007  garbled Sync with HEAD
 1.14.8.1 20-Aug-2007  ad Sync with HEAD.
 1.15.10.1 06-Nov-2007  matt sync with HEAD
 1.16.38.1 22-Aug-2009  matt Move MACHINE_ARCH definition to <mips/mips_param.h>
Move mbuf related defines to <mips/mips_param.h>
 1.16.20.2 11-Mar-2010  yamt sync with head
 1.16.20.1 19-Aug-2009  yamt sync with head.
 1.18.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.2 21-Apr-2011  rmind sync with head
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.21.56.1 10-Jun-2019  christos Sync with HEAD
 1.21.54.1 18-Jan-2019  pgoyette Synch with HEAD
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2 13-Sep-2000  nisimura Nuke unused obscure #define's.
 1.1 18-Feb-1998  tsubai branches: 1.1.14;
Initial import of NetBSD/news.
 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.
 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:38:18 +0000
 1.1.4.2 31-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-31 13:45:31 +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:18:36 +0000
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3 30-Mar-1999  soda regdef.h is back
 1.2 13-Mar-1999  drochner g/c regdef.h
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3 09-Sep-2001  simonb branches: 1.3.4;
Clean up and standardise across MIPS ports.
 1.2 04-Mar-1998  thorpej branches: 1.2.26; 1.2.28;
Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.26.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.4.2 09-Sep-2001  simonb Clean up and standardise across MIPS ports.
 1.3.4.1 09-Sep-2001  simonb file reloc.h was added on branch nathanw_sa on 2001-09-09 04:20:28 +0000
 1.2 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.1 06-Jun-2000  soren branches: 1.1.4; 1.1.6;
Add rnd(4) glue for the MIPS3 cycle counter.
 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.
 1.1.6.1 06-Jun-2000  bouyer file rnd.h was added on branch thorpej_scsipi on 2000-11-20 20:17:26 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 06-Jun-2000  minoura file rnd.h was added on branch minoura-xpg4dl on 2000-06-22 17:01:56 +0000
 1.3 13-Apr-2002  tsutsui Add some ioctl() definitions to eject floppy.
 1.2 13-Apr-2002  tsutsui Rename halt() -> rom_halt(), and declare it in romcall.h.
 1.1 08-Jul-1999  tsubai branches: 1.1.2; 1.1.18; 1.1.22;
Define ROM monitor interfaces.
 1.1.22.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.18.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.1.2.1 08-Jul-1999  thorpej file romcall.h was added on branch chs-ubc2 on 1999-08-02 19:58:23 +0000
 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:07:40 +0000
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 23-Jul-2014  alnsn branches: 1.1.2; 1.1.6;
Rename sljitarch.h to sljit_machdep.h.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:16 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-earlyentropy on 2014-08-10 06:54:04 +0000
 1.2 23-Jul-2014  alnsn Rename sljitarch.h to sljit_machdep.h.
 1.1 25-Nov-2012  alnsn branches: 1.1.2; 1.1.6; 1.1.14;
Add sljitarch.h to all mips machines.
 1.1.14.1 10-Aug-2014  tls Rebase.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 25-Nov-2012  tls file sljitarch.h was added on branch tls-maxphys on 2013-02-25 00:28:52 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 25-Nov-2012  yamt file sljitarch.h was added on branch yamt-pagecache on 2013-01-16 05:33:01 +0000
 1.3 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.2 22-Jan-1999  mycroft Use mips/stdarg.h.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.13 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.12 20-Jan-2008  joerg branches: 1.12.110; 1.12.112;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.11 17-Oct-2007  garbled branches: 1.11.2; 1.11.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.10 14-Jul-2007  ad branches: 1.10.10;
Generic soft interrupts are mandatory.
 1.9 13-Sep-2006  tsutsui branches: 1.9.10; 1.9.18;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.
 1.8 04-Sep-2006  tsutsui branches: 1.8.2;
Switch newsmips to MI todr.
 1.7 25-May-2003  tsutsui branches: 1.7.18; 1.7.32; 1.7.36;
Remove __BROKEN_CONFIG_UNIT_USAGE.
It seems fixed long ago.
 1.6 25-May-2003  tsutsui Add MI softintr(9) support with common mips/softintr.c.
 1.5 05-Aug-2002  simonb Use a __HAVE_BOOTINFO_H define to check for bootinfo support instead of
speading port names in arch-dependant code.
 1.4 05-Mar-2002  simonb branches: 1.4.6;
Provide a L2 cache configuration function.
 1.3 28-Feb-2002  simonb Use "#define<tab>".
 1.2 05-Feb-2000  cgd branches: 1.2.8; 1.2.12;
add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
 1.1 18-Feb-1998  tsubai branches: 1.1.14;
Initial import of NetBSD/news.
 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.
 1.2.12.2 13-Aug-2002  nathanw Catch up to -current.
 1.2.12.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.8.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.6.1 31-Aug-2002  gehenna catch up with -current.
 1.7.36.1 14-Sep-2006  yamt sync with head.
 1.7.32.1 09-Sep-2006  rpaulo sync with head
 1.7.18.3 21-Jan-2008  yamt sync with head
 1.7.18.2 03-Sep-2007  yamt sync with head.
 1.7.18.1 30-Dec-2006  yamt sync with head.
 1.8.2.1 18-Nov-2006  ad Sync with head.
 1.9.18.1 03-Oct-2007  garbled Sync with HEAD
 1.9.10.1 15-Jul-2007  ad Sync with head.
 1.10.10.2 23-Mar-2008  matt sync with HEAD
 1.10.10.1 06-Nov-2007  matt sync with HEAD
 1.11.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.11.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.112.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.110.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 17-Feb-1999  tsubai Use mips/varargs.h.
 1.2 15-Feb-1999  hubertf RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4 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.3 17-Feb-1999  tsubai Use mips/varargs.h.
 1.2 15-Feb-1999  hubertf RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.5 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.4 01-Dec-2000  tsutsui branches: 1.4.130; 1.4.148;
Remove unused pcbb() macro.
 1.3 08-Jul-1998  thorpej branches: 1.3.10; 1.3.14;
Define one page free list, and put all pages on it.
 1.2 25-Feb-1998  thorpej NEWS has one physical memory segment.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.14.1 08-Dec-2000  bouyer Sync with HEAD.
 1.3.10.1 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.4.148.1 11-Dec-2009  matt Use the default set of VM_FREELISTs in <mips/vmparam.h> but allow them to
be overridden (for pmax).
 1.4.130.1 11-Mar-2010  yamt sync with head
 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:38:29 +0000
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 05-Nov-2005  tsutsui branches: 1.1.2;
Add empty <machine/wired_map.h> for the MI mips/wired_map.c.
 1.1.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.1 05-Nov-2005  skrll file wired_map.h was added on branch ktrace-lwp on 2005-11-10 13:57:57 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file wired_map.h was added on branch yamt-lazymbuf on 2006-06-21 14:54:11 +0000
 1.3 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.2 11-Dec-2005  christos branches: 1.2.122; 1.2.142;
merge ktrace-lwp.
 1.1 01-Aug-2004  uch branches: 1.1.2;
add NEWSMIPS_WSDISPLAYIO_GINFO ioctl to get frame buffer stride.
 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 01-Aug-2004  skrll file wsconsio.h was added on branch ktrace-lwp on 2004-08-03 10:38:29 +0000
 1.2.142.1 22-Sep-2015  skrll Sync with HEAD
 1.2.122.1 03-Dec-2017  jdolecek update from HEAD
 1.12 28-Jul-2012  matt Fix -fno-common fallout.
 1.11 26-Jun-2010  tsutsui branches: 1.11.8;
Um, fix botch in previous.
 1.10 29-Mar-2008  tsutsui branches: 1.10.4; 1.10.24; 1.10.26;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.9 07-Nov-2007  ad branches: 1.9.14;
Merge tty changes from the vmlocking branch.
 1.8 11-Dec-2005  christos branches: 1.8.30; 1.8.48; 1.8.50; 1.8.54; 1.8.56;
merge ktrace-lwp.
 1.7 06-Feb-2005  tsutsui branches: 1.7.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.6 07-Aug-2003  agc branches: 1.6.8; 1.6.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 25-May-2003  tsutsui branches: 1.5.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.4 26-Apr-2003  tsutsui - Move some common declarations into z8530var.h.
- Fix struct consdev properly.
- Remove register declarations.
- some more KNF.
 1.3 03-Dec-2000  matt Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.2 01-Jun-1998  tsubai branches: 1.2.14;
Change "extern var;" --> "extern int var;" and so on. (for egcs -Wall)
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.14.1 08-Dec-2000  bouyer Sync with HEAD.
 1.5.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.6.10.1 12-Feb-2005  yamt sync with head.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.6.1 15-Nov-2007  yamt sync with head.
 1.8.56.1 19-Nov-2007  mjf Sync with HEAD.
 1.8.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.8.50.1 08-Nov-2007  matt sync with -HEAD
 1.8.48.1 11-Nov-2007  joerg Sync with HEAD.
 1.8.30.2 03-Dec-2007  ad Sync with HEAD.
 1.8.30.1 03-Dec-2007  ad Sync with HEAD.
 1.9.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.26.1 03-Jul-2010  rmind sync with head
 1.10.24.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.4.1 11-Aug-2010  yamt sync with head.
 1.11.8.1 30-Oct-2012  yamt sync with head
 1.39 22-Jun-2017  flxd spelling (DEC called it "TURBOchannel")
 1.38 24-Mar-2014  christos branches: 1.38.6;
- fix unused
- use cpu_{g,s}etmodel
 1.37 13-Oct-2012  tsutsui branches: 1.37.2;
struct device * -> device_t, use device_xname() (from chs@)
 1.36 29-Jul-2012  mlelstv branches: 1.36.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.35 09-Mar-2011  tsutsui branches: 1.35.4; 1.35.10;
Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).
 1.34 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.33 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.32 16-Feb-2008  he branches: 1.32.28; 1.32.32; 1.32.38; 1.32.40;
Reinstate an accidentally removed #if test, so that this builds again.
 1.31 12-Feb-2008  joerg Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
 1.30 05-Dec-2007  tsutsui Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro.
 1.29 03-Dec-2007  ad branches: 1.29.2;
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.28 17-Oct-2007  garbled branches: 1.28.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.27 03-Jul-2007  tsutsui branches: 1.27.8; 1.27.10;
Print NEWS model name right after copyright and version
as other mips ports.
 1.26 11-Dec-2005  christos branches: 1.26.30; 1.26.32; 1.26.38;
merge ktrace-lwp.
 1.25 03-Jun-2005  tsutsui branches: 1.25.2;
Fix config_rootfound() arg.
 1.24 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.23 23-Oct-2004  thorpej branches: 1.23.4; 1.23.6;
Centralize the declaration of booted_device and booted_partition.
 1.22 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 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 15-Jul-2003  lukem __KERNEL_RCSID()
 1.19 18-Jun-2003  drochner branches: 1.19.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.18 14-Jun-2003  tsutsui Make this compile with no scsibus.
 1.17 25-May-2003  tsutsui Add MI softintr(9) support with common mips/softintr.c.
 1.16 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.15 16-May-2002  thorpej Don't access a scsipi channel's periph table directly; use
scsipi_lookup_periph().
 1.14 25-Apr-2001  bouyer branches: 1.14.2; 1.14.8; 1.14.16;
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.13 01-Jun-2000  matt branches: 1.13.4;
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.12 01-Jun-2000  matt Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
 1.11 22-Dec-1999  tsubai branches: 1.11.2;
First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.10 06-Dec-1999  tsubai Enable BUSERR interrupt before autoconfiguration.
 1.9 17-Oct-1999  tsubai branches: 1.9.2;
Rearrange splxxx (from pmax). Closes PR 8445.
 1.8 17-Sep-1999  thorpej branches: 1.8.2;
Centralize the declaration and clearing of `cold'.
 1.7 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.6 23-Aug-1999  thorpej Garbage-collect reference to <sys/dmap.h>.
 1.5 08-Jul-1999  tsubai Add one more bootdev check.
 1.4 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.3 03-Sep-1998  tsubai branches: 1.3.8;
* Remove nam2blk.
* Clean up a bit.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.8.2 02-Aug-1999  thorpej Update from trunk.
 1.3.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.8.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.2 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 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.
 1.11.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.13.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.16.1 30-May-2002  gehenna Catch up with -current.
 1.14.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.14.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.14.8.1 25-Apr-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-06-20 03:40:16 +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 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.19.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.5 06-Feb-2005  skrll Sync with HEAD.
 1.19.2.4 02-Nov-2004  skrll Sync with HEAD.
 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.23.6.1 12-Feb-2005  yamt sync with head.
 1.23.4.1 29-Apr-2005  kent sync with -current
 1.25.2.3 27-Feb-2008  yamt sync with head.
 1.25.2.2 07-Dec-2007  yamt sync with head
 1.25.2.1 03-Sep-2007  yamt sync with head.
 1.26.38.1 03-Oct-2007  garbled Sync with HEAD
 1.26.32.1 11-Jul-2007  mjf Sync with head.
 1.26.30.2 03-Dec-2007  ad Sync with HEAD.
 1.26.30.1 15-Jul-2007  ad Sync with head.
 1.27.10.3 23-Mar-2008  matt sync with HEAD
 1.27.10.2 09-Jan-2008  matt sync with HEAD
 1.27.10.1 06-Nov-2007  matt sync with HEAD
 1.27.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.28.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.28.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.29.2.1 08-Dec-2007  ad Sync with head.
 1.32.40.2 05-Mar-2011  bouyer Sync with HEAD
 1.32.40.1 17-Feb-2011  bouyer Sync with HEAD
 1.32.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.32.32.2 21-Apr-2011  rmind sync with head
 1.32.32.1 05-Mar-2011  rmind sync with head
 1.32.28.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.35.10.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.35.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.35.4.1 30-Oct-2012  yamt sync with head
 1.36.2.3 03-Dec-2017  jdolecek update from HEAD
 1.36.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.37.2.1 18-May-2014  rmind sync with head
 1.38.6.1 28-Aug-2017  skrll Sync with HEAD
 1.38 26-Jul-2022  andvar s/functin/function/ in copy pasted comment.
 1.37 22-Jan-2022  skrll Ensure bus_dmatag_subregion is called with an inclusive max_addr
everywhere.
 1.36 22-Jan-2022  skrll Trailing whitespace
 1.35 05-Dec-2021  msaitoh s/invlid/invalid/ in comment.
 1.34 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.33 11-Jun-2015  matt branches: 1.33.30;
Add struct pmap_limits and pm_{min,max}addr from uvm/pmap/map.h and use it to
store avail_start, avail_end, virtual_start, and virtual_end.
Remove iospace and let emips just bump pmap_limits.virtual_start to get the
VA space it needs.
pmap_segtab.c is almost identical to uvm/pmap/pmap_segtab.c now. It won't
be long until we switch to the uvm/pmap one.
 1.32 02-Oct-2012  christos branches: 1.32.14;
move common/bus_dma/ -> dev/bus_dma/
 1.31 20-Feb-2011  matt branches: 1.31.4; 1.31.14;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.30 14-Dec-2009  matt branches: 1.30.4; 1.30.6; 1.30.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.29 21-Aug-2009  thorpej Use bus_dmamem_common.
 1.28 04-Jun-2008  ad branches: 1.28.16;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.27 28-Apr-2008  martin branches: 1.27.2;
Remove clause 3 and 4 from TNF licenses
 1.26 08-Mar-2007  he branches: 1.26.40; 1.26.42; 1.26.44;
Cast to char*, not void* before doing pointer arithmetic.
 1.25 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 16-Apr-2006  tsutsui branches: 1.24.14;
Mising -> Mixing
 1.23 01-Mar-2006  yamt branches: 1.23.2; 1.23.4; 1.23.6;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.22 11-Dec-2005  christos branches: 1.22.2; 1.22.4; 1.22.6;
merge ktrace-lwp.
 1.21 24-Nov-2005  yamt bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
 1.20 01-Apr-2005  yamt branches: 1.20.2; 1.20.8;
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.19 09-Mar-2005  matt Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.18 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.17 28-Nov-2004  thorpej branches: 1.17.4; 1.17.6;
bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
 1.16 16-Sep-2004  rumble Correct a few comment typos that have propagated through the
tree.
 1.15 15-Jul-2003  lukem __KERNEL_RCSID()
 1.14 29-Jun-2003  fvdl branches: 1.14.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.13 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.12 19-Apr-2003  tsutsui TAB/space cleanup.
 1.11 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.10 02-Jun-2002  drochner move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
 1.9 14-Nov-2001  thorpej branches: 1.9.2; 1.9.10;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.8 10-Sep-2001  chris branches: 1.8.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.7 26-May-2001  chs branches: 1.7.2; 1.7.4;
replace vm_page_t with struct vm_page *.
 1.6 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.5 21-Mar-2001  soren s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message.
 1.4 03-Dec-2000  matt branches: 1.4.2;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.3 18-Oct-2000  onoe branches: 1.3.2;
Move APbus dependent unmapped DMA address stuff from bus.c to apbus.c
Support DMA mapping table with NEWSMIPS_DMAMAP_MAPTBL flag for APbus
(MAPTBL is not tested yet).
 1.2 12-Oct-2000  tsubai Remove a '^G'.
 1.1 12-Oct-2000  onoe Bus I/O and DMA access macros/routines.
 1.3.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.3.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.
 1.3.2.1 18-Oct-2000  bouyer file bus.c was added on branch thorpej_scsipi on 2000-11-20 20:17:27 +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.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.8.2.2 13-Nov-2001  thorpej Don't forget to actually fill in _dm_proc.
 1.8.2.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.9.10.1 15-Jul-2002  gehenna catch up with -current.
 1.9.2.4 02-Jul-2002  nathanw curlwp back to curproc; curproc is the correct type here.
 1.9.2.3 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.9.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.9.2.1 14-Nov-2001  nathanw file bus.c was added on branch nathanw_sa on 2002-06-20 03:40:16 +0000
 1.14.2.9 11-Dec-2005  christos Sync with head.
 1.14.2.8 01-Apr-2005  skrll Sync with HEAD.
 1.14.2.7 19-Feb-2005  skrll Don't deref a NULL struct lwp *. This shouldn't happen, but...
 1.14.2.6 06-Feb-2005  skrll Sync with HEAD.
 1.14.2.5 18-Dec-2004  skrll Sync with HEAD.
 1.14.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.2 03-Aug-2004  skrll Sync with HEAD
 1.14.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.17.6.3 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.17.6.2 12-Feb-2005  yamt sync with head.
 1.17.6.1 11-Feb-2005  yamt use new apis.
 1.17.4.1 29-Apr-2005  kent sync with -current
 1.20.8.1 29-Nov-2005  yamt sync with head.
 1.20.2.2 03-Sep-2007  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.22.6.1 22-Apr-2006  simonb Sync with head.
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.22.2.2 18-Feb-2006  yamt _dm_proc -> _dm_vmspace.
 1.22.2.1 18-Feb-2006  yamt adapt the rest of MD code.
 1.23.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.23.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.2.1 24-May-2006  yamt sync with head.
 1.24.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.44.4 11-Mar-2010  yamt sync with head
 1.26.44.3 16-Sep-2009  yamt sync with head
 1.26.44.2 04-May-2009  yamt sync with head.
 1.26.44.1 16-May-2008  yamt sync with head.
 1.26.42.2 17-Jun-2008  yamt sync with head.
 1.26.42.1 18-May-2008  yamt sync with head.
 1.26.40.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.26.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.28.16.3 20-Jan-2010  matt Adjust things to the new world order.
 1.28.16.2 14-Jan-2010  matt Deal with various changes with avail_end and avail_start, etc.
 1.28.16.1 26-Aug-2009  matt Fixup (all but mipsco) to deal the new realities in mipsland.
 1.30.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.30.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.30.4.1 05-Mar-2011  rmind sync with head
 1.31.14.2 03-Dec-2017  jdolecek update from HEAD
 1.31.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.4.1 30-Oct-2012  yamt sync with head
 1.32.14.1 22-Sep-2015  skrll Sync with HEAD
 1.33.30.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.16 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.15 04-Sep-2006  tsutsui branches: 1.15.78; 1.15.82; 1.15.88; 1.15.90;
Switch newsmips to MI todr.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8;
merge ktrace-lwp.
 1.13 05-Jun-2005  he branches: 1.13.2;
Revert previous and fix the todr_gettime() / todr_settime() problem
differently, simply by removing the now unneccessary cast.
 1.12 03-Jun-2005  tsutsui workaround for volatile struct timeval time vs todr_*() arg mismatch.
 1.11 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.10 25-Oct-2003  tsutsui branches: 1.10.8; 1.10.10;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 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 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 29-Jul-2000  tsubai branches: 1.7.24;
Fix printf format string. (recently SECDAY changed from unsigned long to int)
 1.6 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.5 05-Dec-1999  tsubai Use dev/clock_subr.c.
 1.4 11-Jul-1999  tsubai branches: 1.4.2; 1.4.8;
Cleanup.
 1.3 15-Feb-1999  hubertf branches: 1.3.4;
RCS ID police
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.3.4.1 02-Aug-1999  thorpej Update from trunk.
 1.4.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.7.24.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.24.4 06-Feb-2005  skrll Sync with HEAD.
 1.7.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.24.1 03-Aug-2004  skrll Sync with HEAD
 1.10.10.1 12-Feb-2005  yamt sync with head.
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.13.2.1 30-Dec-2006  yamt sync with head.
 1.14.8.1 14-Sep-2006  yamt sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.90.1 05-Mar-2011  bouyer Sync with HEAD
 1.15.88.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.82.1 05-Mar-2011  rmind sync with head
 1.15.78.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.5 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 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 05-Dec-1999  tsubai branches: 1.3.28;
Use dev/clock_subr.c.
 1.2 15-Feb-1999  hubertf branches: 1.2.8; 1.2.14;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.3.28.1 03-Aug-2004  skrll Sync with HEAD
 1.2 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.1 22-Dec-1999  tsubai branches: 1.1.6; 1.1.30;
First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.1.30.1 03-Aug-2004  skrll 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.
 1.1.6.1 22-Dec-1999  bouyer file clockvar.h was added on branch thorpej_scsipi on 2000-11-20 20:17:27 +0000
 1.13 26-Oct-2002  jdolecek 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.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 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.10 17-Jun-2002  christos MD systrace gluons.
 1.9 12-Jan-2002  manu branches: 1.9.8;
Added clockctl
 1.8 13-Nov-2000  tsubai branches: 1.8.4; 1.8.8;
Switch to wscons.
 1.7 16-Apr-2000  tsutsui Include "zstty.h" instead of "zsc.h".
 1.6 14-Apr-2000  tsutsui - Fix comments. (NEWS have Zilog 8530, not Intel 82530)
- Fix cdev_tty_init() arg on newsmips (NZSC -> NZSTTY)
 1.5 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.4 26-Dec-1998  tsubai branches: 1.4.8;
Make configurable with no frame buffer.
 1.3 13-Nov-1998  oster Updating of bdev's and cdev's to support RAIDframe.
 1.2 10-Oct-1998  thorpej Add scsibus entry points to the cdevsw[].
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4.8.2 22-Nov-2000  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.
 1.8.8.5 11-Nov-2002  nathanw Catch up to -current
 1.8.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.8.8.3 01-Aug-2002  nathanw Catch up to -current.
 1.8.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.8.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.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.8.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.9.8.3 21-Jul-2002  gehenna catch up with -current.
 1.9.8.2 15-Jul-2002  gehenna catch up with -current.
 1.9.8.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.13 03-Mar-2022  riastradh mips: Use device_set_private for cpuN on older ports.

Specifically, for those that don't use cpu_attach_common of
mips_subr.c.
 1.12 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.11 11-Dec-2005  christos branches: 1.11.96; 1.11.100; 1.11.106; 1.11.108;
merge ktrace-lwp.
 1.10 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.9 15-Jul-2003  lukem branches: 1.9.8; 1.9.10;
__KERNEL_RCSID()
 1.8 02-Oct-2002  thorpej branches: 1.8.6;
Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 14-Nov-2001  thorpej branches: 1.6.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.5 26-Jul-2001  tsubai branches: 1.5.4;
Make this compile w/o -DMIPS3.
 1.4 27-Jun-2001  nisimura branches: 1.4.2;
Do a straight and simple cpu identification in cpu_attach().
 1.3 19-Feb-2000  mycroft Use the prefix printed before cpuattach() is called.
 1.2 06-Dec-1999  tsubai Insert '\n'.
 1.1 18-Feb-1998  tsubai branches: 1.1.14; 1.1.20;
Initial import of NetBSD/news.
 1.1.20.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 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.
 1.4.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.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.5.4.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.6.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.1 14-Nov-2001  nathanw file cpu.c was added on branch nathanw_sa on 2002-10-18 02:39:12 +0000
 1.8.6.4 06-Feb-2005  skrll Sync with HEAD.
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.10.1 12-Feb-2005  yamt sync with head.
 1.9.8.1 29-Apr-2005  kent sync with -current
 1.11.108.1 05-Mar-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.11.96.2 23-Dec-2011  matt Change usage to cpu_identify(self, NULL);
 1.11.96.1 13-Jan-2010  matt Deal with new cpu_identity()
 1.14 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.13 28-Jul-2012  matt branches: 1.13.38; 1.13.40;
Fix -fno-common fallout.
 1.12 08-Feb-2011  rmind branches: 1.12.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.11 11-Dec-2005  christos branches: 1.11.100; 1.11.106; 1.11.108;
merge ktrace-lwp.
 1.10 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.9 07-Aug-2003  agc branches: 1.9.8; 1.9.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 19-Apr-2003  tsutsui branches: 1.7.2;
Fix unexpected fallthrough in switch statement.

This should fix boot failure of the INSTALL kernel
on news3400 with serial console.
 1.6 15-Nov-2000  tsubai branches: 1.6.18;
Screen console works now.
 1.5 13-Nov-2000  tsubai Switch to wscons.
 1.4 12-Oct-2000  onoe Do not access graphic console if probing framebuffer fails for NWS-3400.
Use serial console instead regardless the dipsw.
 1.3 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2 26-Dec-1998  tsubai branches: 1.2.8;
Make configurable with no frame buffer.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.8.2 22-Nov-2000  bouyer Sync with HEAD.
 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.
 1.6.18.1 16-Jun-2003  grant Pull up revision 1.7 (requested by tsutsui in ticket #1276):

Fix unexpected fallthrough in switch statement.

This should fix boot failure of the INSTALL kernel
on news3400 with serial console.
 1.7.2.4 06-Feb-2005  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.9.10.1 12-Feb-2005  yamt sync with head.
 1.9.8.1 29-Apr-2005  kent sync with -current
 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.4.1 30-Oct-2012  yamt sync with head
 1.13.40.1 10-Jun-2019  christos Sync with HEAD
 1.13.38.1 20-Oct-2018  pgoyette Sync with head
 1.29 03-Apr-2019  christos centralize setdisklabel(9)
 1.28 02-Jan-2008  ad branches: 1.28.98;
Merge vmlocking2 to head.
 1.27 17-Oct-2007  garbled branches: 1.27.2; 1.27.4; 1.27.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.26 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.25 08-Mar-2007  he branches: 1.25.2; 1.25.10; 1.25.18; 1.25.20; 1.25.22;
Cast to char* to be able to do pointer arithmetic.
 1.24 25-Nov-2006  scw branches: 1.24.4;
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.23 05-Nov-2006  elad XXX: use KAUTH_DEVICE_RAWIO_PASSTHRU for direct disk access here.
 1.22 11-Sep-2006  he branches: 1.22.2;
Add required includes for kauth. Fix the newly added kauth call
so that it builds.
 1.21 08-Sep-2006  elad First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
security model, called "bsd44". This is the default (and only) model we
have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

* There's a sample overlay model, sitting on-top of "bsd44", for
fast experimenting with tweaking just a subset of an existing model.

This is pretty cool because it's *really* straightforward to do stuff
you had to use ugly hacks for until now...

* And of course, documentation describing how to do the above for quick
reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

- Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
- Checks 'securelevel' directly,
- Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)
 1.20 11-Dec-2005  christos branches: 1.20.8; 1.20.20;
merge ktrace-lwp.
 1.19 03-Jun-2005  tsutsui branches: 1.19.2;
constify.
 1.18 25-May-2005  tsutsui Sync with news68k:
- use MAKEDISKDEV() macro
- make readdisklabel(9) return more usable default label
- some cosmetics
 1.17 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.16 07-Aug-2003  agc branches: 1.16.8; 1.16.10;
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-Jul-2003  lukem __KERNEL_RCSID()
 1.14 10-May-2003  thorpej branches: 1.14.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.13 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.12 18-Apr-2003  tsutsui Revert part of previous. sdstrategy() no longer calls
bounds_check_with_label() for RAW_PART.
 1.11 30-Mar-2003  tsutsui Sync with news68k/disksubr.c rev 1.11-1.13:
- Fix -Wsign-compare warnings.
- Drop trailing white space.
- Since current sdstrategy() calls bounds_check_with_label() implicitly,
allow overwriting disklabel for RAW_PART in bounds_check_with_label().
- Also allow overwriting disklabel even for !RAW_PART if securelevel == 0
so that installboot(8) can write bootblock against 'a' partition.
- labelsector is at top of RAW_PART, not 'a' partition.
 1.10 05-Mar-2002  simonb Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
 1.9 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.8 20-Nov-2000  chs branches: 1.8.2; 1.8.4; 1.8.8;
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.7 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.6 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.5 30-Mar-2000  tsutsui Remove register declarations.
 1.4 07-Mar-2000  tsutsui - Remove unnecessary prototype declaration of readdisklabel().
- Use DISKPART/DISKMINOR/DISKUNIT instead of dkpart/dkminor/dkunit.
 1.3 18-Jan-2000  thorpej Use b_cylinder as defined in sys/buf.h
 1.2 01-Jun-1998  tsubai branches: 1.2.14; 1.2.20;
Change "extern var;" --> "extern int var;" and so on. (for egcs -Wall)
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.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.2.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.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.
 1.8.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.8.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.8.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.14.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.4 06-Feb-2005  skrll Sync with HEAD.
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.10.1 12-Feb-2005  yamt sync with head.
 1.16.8.1 29-Apr-2005  kent sync with -current
 1.19.2.4 21-Jan-2008  yamt sync with head
 1.19.2.3 27-Oct-2007  yamt sync with head.
 1.19.2.2 03-Sep-2007  yamt sync with head.
 1.19.2.1 30-Dec-2006  yamt sync with head.
 1.20.20.2 12-Jan-2007  ad Sync with head.
 1.20.20.1 18-Nov-2006  ad Sync with head.
 1.20.8.1 14-Sep-2006  yamt sync with head.
 1.22.2.1 10-Dec-2006  yamt sync with head.
 1.24.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.25.22.1 14-Oct-2007  yamt sync with head.
 1.25.20.2 09-Jan-2008  matt sync with HEAD
 1.25.20.1 06-Nov-2007  matt sync with HEAD
 1.25.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.25.10.1 16-Oct-2007  garbled Sync with HEAD
 1.25.2.1 09-Oct-2007  ad Sync with head.
 1.27.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.27.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.27.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.28.98.1 10-Jun-2019  christos Sync with HEAD
 1.16 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.15 17-Dec-2009  matt branches: 1.15.4; 1.15.6; 1.15.8;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)
 1.14 11-Dec-2005  christos branches: 1.14.78; 1.14.96;
merge ktrace-lwp.
 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 09-Jun-2003  simonb branches: 1.12.2;
Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.
 1.11 25-May-2003  tsutsui Remove unused cpu_spl? functions.
 1.10 25-May-2003  tsutsui Add MI softintr(9) support with common mips/softintr.c.
 1.9 26-Apr-2003  tsutsui Add a nop for delay slot to fix asm warning.
 1.8 01-Jun-2002  simonb Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.
 1.7 22-Dec-1999  tsubai branches: 1.7.8; 1.7.12; 1.7.20;
First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.6 05-Aug-1999  thorpej branches: 1.6.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.5 20-Jun-1999  tsubai Make this compile.
 1.4 11-Sep-1998  jonathan branches: 1.4.8;
Add splx_end label to splx(), for stack traceback code.
 1.3 26-Aug-1998  tsubai Add MD DELAY and spl routines to fit Nisimura's change.
 1.2 08-Jun-1998  tsubai Adjust intrnames.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.4.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.6.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.
 1.7.20.1 15-Jul-2002  gehenna catch up with -current.
 1.7.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.7.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.14.96.1 14-Jan-2010  matt Deal with various changes with avail_end and avail_start, etc.
 1.14.78.1 11-Mar-2010  yamt sync with head
 1.15.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.15.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.123 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.122 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.121 19-Oct-2018  tsutsui Reorganize APbus zs(4) console handling.

- set sccport0a address on early startup and use it for cnputc and cngetc
- explicitly initialize zs chip in the cninit function so that zs console
can be used even if it is not initialized by PROM firmware

Tested on both news50000 and news4000.
 1.120 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.119 22-Dec-2016  cherry branches: 1.119.14; 1.119.16;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.118 21-Jul-2016  christos Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c
 1.117 30-Jun-2015  matt branches: 1.117.2;
Use cpu_startup_common()
 1.116 24-Nov-2014  christos branches: 1.116.2;
avoid shadowing a new global.
 1.115 24-Mar-2014  christos - fix unused
- use cpu_{g,s}etmodel
 1.114 28-Jul-2012  matt branches: 1.114.2; 1.114.4;
Fix -fno-common fallout.
 1.113 09-Mar-2011  tsutsui branches: 1.113.4;
Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).
 1.112 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.111 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.110 20-Dec-2010  matt branches: 1.110.2; 1.110.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.109 02-Mar-2010  pooka branches: 1.109.2;
Remove fs_mfs.h from users because it is now unnecessary and don't
generate fs_mfs.h anymore.
 1.108 08-Feb-2010  joerg 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.107 17-Dec-2009  matt branches: 1.107.2;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)
 1.106 14-Dec-2009  matt Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.105 27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.104 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.103 11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.102 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.101 30-Nov-2008  martin branches: 1.101.4;
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.100 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.99 11-Nov-2008  dyoung It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
 1.98 02-Jul-2008  ad branches: 1.98.2; 1.98.4; 1.98.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.97 03-Dec-2007  ad branches: 1.97.14; 1.97.18; 1.97.20; 1.97.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.96 17-Oct-2007  garbled branches: 1.96.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.95 03-Jul-2007  tsutsui branches: 1.95.8; 1.95.10;
Use C99 initializers.
 1.94 03-Jul-2007  tsutsui No need to clear BSS if running kernel is loaded by the native bootloader.
 1.93 03-Jul-2007  tsutsui Print NEWS model name right after copyright and version
as other mips ports.
 1.92 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.91 08-Mar-2007  he branches: 1.91.2; 1.91.4; 1.91.10;
Change local variables kernend and v to char*, since they are used
for pointer arithmetic.
 1.90 05-Mar-2007  dogcow semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.
 1.89 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.88 28-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.87 09-Feb-2007  ad branches: 1.87.2;
Merge newlock2 to head.
 1.86 24-Jan-2007  hubertf 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.85 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.84 13-Sep-2006  tsutsui branches: 1.84.2;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.
 1.83 09-Apr-2006  tsutsui branches: 1.83.8;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.
 1.82 11-Dec-2005  christos branches: 1.82.4; 1.82.6; 1.82.8; 1.82.10; 1.82.12;
merge ktrace-lwp.
 1.81 25-Apr-2005  lukem branches: 1.81.2;
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.80 06-Feb-2005  tsutsui Oops, backout previous. They are actually needed there.
 1.79 06-Feb-2005  tsutsui Remove function decls which are in <machine/intr.h>
 1.78 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.77 13-Feb-2004  wiz branches: 1.77.8; 1.77.10;
Uppercase CPU, plural is CPUs.
 1.76 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.75 23-Nov-2003  taca Move initialization of `ssym' and `esym' to inside of
#if NKSYMS || defined(DDB) || defined(LKM) ... #endif.

Now GENERIC and INSTALL kernel can be compiled again.
 1.74 23-Nov-2003  tsutsui Suppress uninitialized warnings.
 1.73 26-Oct-2003  tsutsui Cast through (void *) to appease gcc3. (now it's also warned on mipseb)
 1.72 25-Oct-2003  tsutsui Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 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 25-May-2003  tsutsui branches: 1.70.2;
Add MI softintr(9) support with common mips/softintr.c.
 1.69 26-Apr-2003  tsutsui - Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.
 1.68 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.67 19-Apr-2003  tsutsui - remove obsolete #if 0'ed out code
- remove some leading/trailing spaces
 1.66 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.65 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.64 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.63 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.62 04-Aug-2002  gmcgarry Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.

For now, only pmax implements CPU_BOOTED_KERNEL. Need to revisit.
 1.61 05-Mar-2002  simonb branches: 1.61.6;
Provide a L2 cache configuration function.
 1.60 14-Nov-2001  thorpej branches: 1.60.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.59 10-Sep-2001  chris branches: 1.59.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.58 02-Jun-2001  chs branches: 1.58.2; 1.58.4;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.57 24-Apr-2001  thorpej Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().
 1.56 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.55 23-Apr-2001  thorpej Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.
 1.54 22-Apr-2001  thorpej Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.
 1.53 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.52 05-Feb-2001  tsutsui branches: 1.52.2;
Remove obsolete cpu_exec_ecoff_hook().
 1.51 22-Jan-2001  jdolecek Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
 1.50 15-Jan-2001  thorpej Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.49 27-Nov-2000  soren Consistently use pmap_steal_memory() to allocate USPACE.
 1.48 13-Oct-2000  tsutsui Make this compile without "options news5000".
 1.47 12-Oct-2000  onoe Support scsi boot device for NWS-5000.
Support NWS-3700, which is very similar with NWS-3400.
Do not depend on modelid of idrom, which is useless in most cases.
 1.46 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.45 29-Jul-2000  jdolecek g/c RB_DFLTROOT

I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.
 1.44 14-Jul-2000  jeffs Use cpu_intr() definition from mips/cpu.h instead of local one.
 1.43 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.42 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.41 26-May-2000  thorpej branches: 1.41.4;
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.40 14-Apr-2000  tsubai Adapt cpu_intr change.
 1.39 25-Mar-2000  nisimura Make sure proc0 PCB has spl0 condition in CP0 status register field.

cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them. This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.
 1.38 03-Mar-2000  nisimura Make clearer a bit how proc0's USPACE is intialized.
 1.37 19-Jan-2000  thorpej Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.36 19-Jan-2000  msaitoh check whether tv_usec >= 1000000
 1.35 26-Dec-1999  tsubai Use software interrupt.
 1.34 23-Dec-1999  tsubai Remove 2 more unnecessary debugging codes.
 1.33 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.32 18-Dec-1999  tsubai Introduce bootinfo.
 1.31 04-Dec-1999  ragge CL* discarding.
 1.30 17-Sep-1999  thorpej branches: 1.30.2; 1.30.8;
Centralize the declaration and clearing of `cold'.
 1.29 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.28 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.27 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.26 18-May-1999  nisimura - Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S
 1.25 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.24 01-Apr-1999  thorpej branches: 1.24.2;
Don't call configure() from cpu_startup().
 1.23 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.22 26-Mar-1999  tsubai <mips/db_machdep.h> --> <machine/db_machdep.h>
 1.21 26-Mar-1999  thorpej Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages. So, mb_map wasn't actually being used. Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.
 1.20 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.19 01-Feb-1999  nisimura - Nuke USPACE for now-defunct 'nullproc' pcb (8KB saving).
 1.18 09-Jan-1999  thorpej Garbage-collect `mbutl'.
 1.17 26-Dec-1998  tsubai Make configurable with no frame buffer.
 1.16 28-Sep-1998  erh This should need opt_execfmt.h.
 1.15 21-Aug-1998  tsubai Change vm_offset_t to [pv]addr_t.
 1.14 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.13 04-Jul-1998  jonathan defopt DDB.
 1.12 08-Jun-1998  tsubai Introduce newsmips_intr_t for intrcnt[].
 1.11 07-Jun-1998  tsubai Add support for powerdown.
 1.10 03-May-1998  tsubai Add UVM support.
 1.9 01-May-1998  tsubai Fix a typo.
 1.8 30-Apr-1998  tsubai Add NWS-3401's systype.
 1.7 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.6 25-Feb-1998  thorpej Use allocsys(), mips_init_msgbuf(), and mips_init_proc0(), plus small
changes for MACHINE_NEW_NONCONTIG.
 1.5 23-Feb-1998  thorpej Set the VM page size after clearing the BSS segment.
 1.4 19-Feb-1998  thorpej Use the generic NetBSD/mips crash dump code.
 1.3 19-Feb-1998  thorpej Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
 1.2 19-Feb-1998  thorpej Include MFS option header.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.24.2.1 16-Apr-1999  chs branches: 1.24.2.1.2;
pull up 1.24 -> 1.25:
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.24.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.30.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.30.2.6 23-Apr-2001  bouyer Sync with HEAD.
 1.30.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.30.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.30.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.30.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.30.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.
 1.41.4.2 13-Aug-2000  jdolecek pullup from trunk (approved by thorpej):
retire RB_DFLTROOT, it's no longer used

revisions pulled up:
arch/i386/stand/lib/netbsd_opts.c 1.3
arch/i386/stand/biosboot/main.c 1.23
arch/i386/stand/dosboot/main.c 1.15
arch/i386/stand/netboot/main.c 1.6
arch/arc/arc/machdep.c 1.42
arch/bebox/stand/boot/boot.c 1.11
arch/hpcmips/hpcmips/machdep.c 1.32
arch/newsmips/newsmips/machdep.c 1.45
arch/pc532/stand/boot/boot.c 1.2
arch/pmax/pmax/machdep.c 1.178
arch/prep/stand/boot/boot.c 1.2
arch/sparc/sparc/autoconf.c 1.141
arch/sparc64/sparc64/autoconf.c 1.38
arch/x68k/stand/loadbsd/loadbsd.c 1.5
arch/mvme68k/stand/libsa/parse_args.c 1.6
compat/osf1/osf1_cvt.c 1.9
sys/reboot.h 1.17
 1.41.4.1 19-Jul-2000  jeffs Pull up cpu_intr() prototype + platform dependent machdeps.
(approved by thorepj).
 1.52.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.52.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.58.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.58.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.58.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.58.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.58.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.58.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.59.2.1 13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.60.2.8 18-Oct-2002  nathanw Catch up to -current.
 1.60.2.7 05-Oct-2002  gmcgarry LWPify
 1.60.2.6 27-Aug-2002  nathanw Catch up to -current.
 1.60.2.5 13-Aug-2002  nathanw Catch up to -current.
 1.60.2.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.60.2.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.60.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.60.2.1 14-Nov-2001  nathanw file machdep.c was added on branch nathanw_sa on 2002-04-01 07:41:43 +0000
 1.61.6.1 31-Aug-2002  gehenna catch up with -current.
 1.70.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.70.2.4 06-Feb-2005  skrll Sync with HEAD.
 1.70.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.70.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.70.2.1 03-Aug-2004  skrll Sync with HEAD
 1.77.10.1 12-Feb-2005  yamt sync with head.
 1.77.8.1 29-Apr-2005  kent sync with -current
 1.81.2.5 07-Dec-2007  yamt sync with head
 1.81.2.4 03-Sep-2007  yamt sync with head.
 1.81.2.3 26-Feb-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.82.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.82.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.82.8.2 14-Sep-2006  yamt sync with head.
 1.82.8.1 11-Apr-2006  yamt sync with head
 1.82.6.1 22-Apr-2006  simonb Sync with head.
 1.82.4.1 09-Sep-2006  rpaulo sync with head
 1.83.8.4 01-Feb-2007  ad Sync with head.
 1.83.8.3 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.83.8.2 12-Jan-2007  ad Sync with head.
 1.83.8.1 18-Nov-2006  ad Sync with head.
 1.84.2.1 22-Sep-2006  yamt fix softintr for following ports. (hopefully)
hpcmips
evbmips
algor
arc
ews4800mips
newsmips
 1.87.2.2 18-Apr-2007  ad - Further adaptations to MIPS for the yamt-idlelwp branch.
- Make curlwp a register variable on MIPS.
 1.87.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.91.10.2 03-Oct-2007  garbled Sync with HEAD
 1.91.10.1 22-May-2007  matt Update to HEAD.
 1.91.4.1 11-Jul-2007  mjf Sync with head.
 1.91.2.3 03-Dec-2007  ad Sync with HEAD.
 1.91.2.2 15-Jul-2007  ad Sync with head.
 1.91.2.1 27-May-2007  ad Sync with head.
 1.95.10.2 09-Jan-2008  matt sync with HEAD
 1.95.10.1 06-Nov-2007  matt sync with HEAD
 1.95.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.96.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.97.22.1 03-Jul-2008  simonb Sync with head.
 1.97.20.3 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.97.20.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.97.20.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.97.18.3 11-Mar-2010  yamt sync with head
 1.97.18.2 19-Aug-2009  yamt sync with head.
 1.97.18.1 04-May-2009  yamt sync with head.
 1.97.14.2 17-Jan-2009  mjf Sync with HEAD.
 1.97.14.1 02-Jul-2008  mjf Sync with HEAD.
 1.98.10.7 14-Feb-2012  matt mem_cluster_cnt on mips is now a u_int.
 1.98.10.6 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.98.10.5 21-Mar-2010  cliff mips_vector_init now takes an argument to specify splsw.
NULL specifies use the default 'std_splsw'
 1.98.10.4 05-Feb-2010  matt Change to deal with new method of invoking softints. Remove mips/softintr.c
from config files. Fix SYMTAB_SPACE for WGT62V43
 1.98.10.3 01-Feb-2010  matt fix fallout from frame/trapframe merger.
 1.98.10.2 20-Jan-2010  matt Adjust things to the new world order.
 1.98.10.1 07-Sep-2009  matt Deal with pcb_context being a label_t
 1.98.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.98.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.98.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.101.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.107.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.109.2.2 21-Apr-2011  rmind sync with head
 1.109.2.1 05-Mar-2011  rmind sync with head
 1.110.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.110.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.110.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.113.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.113.4.1 30-Oct-2012  yamt sync with head
 1.114.4.1 18-May-2014  rmind sync with head
 1.114.2.2 03-Dec-2017  jdolecek update from HEAD
 1.114.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.116.2.3 05-Feb-2017  skrll Sync with HEAD
 1.116.2.2 05-Oct-2016  skrll Sync with HEAD
 1.116.2.1 22-Sep-2015  skrll Sync with HEAD
 1.117.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.117.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.119.16.1 10-Jun-2019  christos Sync with HEAD
 1.119.14.1 20-Oct-2018  pgoyette Sync with head
 1.7 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.6 11-Dec-2005  christos branches: 1.6.164; 1.6.166;
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 31-May-2002  thorpej branches: 1.4.6;
Use __mips__ instead of mips.
 1.3 22-Dec-1999  tsubai branches: 1.3.8; 1.3.12; 1.3.20;
First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2 15-Feb-1999  hubertf branches: 1.2.8;
RCS ID police
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 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.
 1.3.20.1 15-Jul-2002  gehenna catch up with -current.
 1.3.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.3.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.6.166.1 10-Jun-2019  christos Sync with HEAD
 1.6.164.1 20-Oct-2018  pgoyette Sync with head
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.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.11 09-Apr-2008  tsutsui branches: 1.11.106;
Split device_t/softc, with misc cleanup.
 1.10 11-Dec-2005  christos branches: 1.10.74;
merge ktrace-lwp.
 1.9 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.8 15-Jul-2003  lukem branches: 1.8.8; 1.8.10;
__KERNEL_RCSID()
 1.7 09-May-2003  tsutsui branches: 1.7.2;
- Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 23-Jan-2000  tsubai branches: 1.4.8; 1.4.12;
Fix cf_unit usage.
 1.3 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.2 09-Jun-1998  tsubai branches: 1.2.14;
Remove unused variables.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.2.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.
 1.4.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.1 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.4 06-Feb-2005  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.10.1 12-Feb-2005  yamt sync with head.
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.10.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.106.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.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 29-Oct-2000  tsutsui branches: 1.2.2;
Switch to MI md_root.c. Checked by booting INSTALL kernel.
 1.1 10-Nov-1999  tsubai branches: 1.1.2; 1.1.4;
Support md root for INSTALL.
 1.1.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.2.2 15-Nov-1999  fvdl Sync with -current
 1.1.2.1 10-Nov-1999  fvdl file md_root.c was added on branch fvdl-softdep on 1999-11-15 00:38:49 +0000
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 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.
 1.25 14-Nov-2016  maya actually correct tyop now...
 1.24 14-Nov-2016  maya correct nofitication tpyo in comments.

from miod
 1.23 24-Mar-2014  christos branches: 1.23.6; 1.23.10;
- fix unused
- use cpu_{g,s}etmodel
 1.22 10-Mar-2011  tsutsui branches: 1.22.4; 1.22.14; 1.22.18;
Set correct struct clockframe .intr value for hardclock(9).
 1.21 09-Mar-2011  tsutsui Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).
 1.20 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.19 03-Dec-2007  ad branches: 1.19.36; 1.19.40; 1.19.46; 1.19.48;
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 27-Aug-2006  tsutsui branches: 1.18.12; 1.18.30; 1.18.32; 1.18.38;
Avoid unneeded sign extension.
 1.17 27-Aug-2006  tsutsui Make badaddr_flag volatile to avoid unintended optimization by gcc4.
Now GENERIC compiled by gcc4 works on NWS-3470D.

XXX: Is this gcc4 optimization bug, or volitile is required in this case?
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.8;
merge ktrace-lwp.
 1.15 06-Feb-2005  tsutsui branches: 1.15.6;
Change u_int -> uint32_t, u_char,char -> uint8_t where appropriate.
 1.14 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.13 25-Oct-2003  tsutsui branches: 1.13.8; 1.13.10;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 10-May-2003  tsutsui branches: 1.11.2;
- Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.10 09-May-2003  tsutsui - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
 1.9 09-May-2003  tsutsui Rename some variables for readability.
 1.8 26-Apr-2003  tsutsui Remove one more register declaration.
 1.7 26-Apr-2003  tsutsui - Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.
 1.6 19-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.5 07-Jul-2002  gmcgarry Don't invoke MachFPInterrupt() if we're using SOFTFLOAT.
 1.4 03-Dec-2000  matt branches: 1.4.4; 1.4.8; 1.4.16;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.3 29-Jul-2000  tsubai branches: 1.3.2;
Set hostid.
 1.2 14-Apr-2000  tsubai Adapt cpu_intr change.
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.3.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.3.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.
 1.3.2.1 29-Jul-2000  bouyer file news3400.c was added on branch thorpej_scsipi on 2000-11-20 20:17:32 +0000
 1.4.16.1 16-Jul-2002  gehenna catch up with -current.
 1.4.8.2 01-Aug-2002  nathanw Catch up to -current.
 1.4.8.1 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.4.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.2.4 06-Feb-2005  skrll Sync with HEAD.
 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.10.1 12-Feb-2005  yamt sync with head.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.6.2 07-Dec-2007  yamt sync with head
 1.15.6.1 30-Dec-2006  yamt sync with head.
 1.16.8.1 03-Sep-2006  yamt sync with head.
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.18.38.1 08-Dec-2007  mjf Sync with HEAD.
 1.18.32.1 09-Jan-2008  matt sync with HEAD
 1.18.30.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.18.12.1 03-Dec-2007  ad Sync with HEAD.
 1.19.48.1 05-Mar-2011  bouyer Sync with HEAD
 1.19.46.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.40.2 21-Apr-2011  rmind sync with head
 1.19.40.1 05-Mar-2011  rmind sync with head
 1.19.36.2 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.19.36.1 01-Feb-2010  matt fix fallout from frame/trapframe merger.
 1.22.18.1 18-May-2014  rmind sync with head
 1.22.14.2 03-Dec-2017  jdolecek update from HEAD
 1.22.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.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.23.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.23.6.1 05-Dec-2016  skrll Sync with HEAD
 1.2 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.1 14-Oct-2018  tsutsui branches: 1.1.2; 1.1.6;
Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 14-Oct-2018  christos file news4000.c was added on branch phil-wifi on 2019-06-10 22:06:35 +0000
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 14-Oct-2018  pgoyette file news4000.c was added on branch pgoyette-compat on 2018-10-20 06:58:29 +0000
 1.23 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.22 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.21 21-Jul-2016  christos branches: 1.21.14; 1.21.16;
Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c
 1.20 10-Mar-2011  tsutsui branches: 1.20.14; 1.20.32; 1.20.36;
Set correct struct clockframe .intr value for hardclock(9).
 1.19 09-Mar-2011  tsutsui Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).
 1.18 20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.17 03-Dec-2007  ad branches: 1.17.36; 1.17.40; 1.17.46; 1.17.48;
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.16 13-Sep-2006  tsutsui branches: 1.16.10; 1.16.28; 1.16.30; 1.16.36;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.
 1.15 11-Dec-2005  christos branches: 1.15.8; 1.15.20;
merge ktrace-lwp.
 1.14 06-Feb-2005  tsutsui branches: 1.14.6;
Change u_int -> uint32_t, u_char,char -> uint8_t where appropriate.
 1.13 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.12 25-Oct-2003  tsutsui branches: 1.12.8; 1.12.10;
Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 10-May-2003  tsutsui branches: 1.10.2;
Rename apbus_intr_call() -> apbus_intr_dispatch().
 1.9 26-Apr-2003  tsutsui - Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.
 1.8 27-Apr-2001  tsutsui branches: 1.8.8;
Reset FDC in news5000_init() to avoid spurious interrupts
after booting from floppy (since we don't have fdc driver yet).
 1.7 03-Dec-2000  matt branches: 1.7.2;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.6 12-Oct-2000  onoe branches: 1.6.2;
Use 1MHz freerun counter for microtime().
Show address for bus error, and DMA address error.
should be panic, but only printf for now.
 1.5 29-Jul-2000  tsubai Set hostid.
 1.4 14-Apr-2000  tsubai Adapt cpu_intr change.
 1.3 23-Dec-1999  tsubai Fix typo.
 1.2 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.6.2.3 08-Dec-2000  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.
 1.6.2.1 12-Oct-2000  bouyer file news5000.c was added on branch thorpej_scsipi on 2000-11-20 20:17:32 +0000
 1.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.8.8.2 27-Apr-2001  tsutsui Reset FDC in news5000_init() to avoid spurious interrupts
after booting from floppy (since we don't have fdc driver yet).
 1.8.8.1 27-Apr-2001  tsutsui file news5000.c was added on branch nathanw_sa on 2001-04-27 12:55:52 +0000
 1.10.2.4 06-Feb-2005  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 12-Feb-2005  yamt sync with head.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.14.6.2 07-Dec-2007  yamt sync with head
 1.14.6.1 30-Dec-2006  yamt sync with head.
 1.15.20.1 18-Nov-2006  ad Sync with head.
 1.15.8.1 14-Sep-2006  yamt sync with head.
 1.16.36.1 08-Dec-2007  mjf Sync with HEAD.
 1.16.30.1 09-Jan-2008  matt sync with HEAD
 1.16.28.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.16.10.1 03-Dec-2007  ad Sync with HEAD.
 1.17.48.1 05-Mar-2011  bouyer Sync with HEAD
 1.17.46.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.40.2 21-Apr-2011  rmind sync with head
 1.17.40.1 05-Mar-2011  rmind sync with head
 1.17.36.1 29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.20.36.1 26-Jul-2016  pgoyette Sync with HEAD
 1.20.32.1 05-Oct-2016  skrll Sync with HEAD
 1.20.14.1 03-Dec-2017  jdolecek update from HEAD
 1.21.16.1 10-Jun-2019  christos Sync with HEAD
 1.21.14.1 20-Oct-2018  pgoyette Sync with head
 1.9 22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.8 18-Dec-1999  tsubai Use hb_intr_establish().
 1.7 17-Dec-1999  tsubai Use hb_intr_establish().
 1.6 17-Oct-1999  tsubai branches: 1.6.2;
Rearrange splxxx (from pmax). Closes PR 8445.
 1.5 25-Jun-1998  thorpej branches: 1.5.14;
defopt KTRACE
 1.4 08-Jun-1998  tsubai Introduce newsmips_intr_t for intrcnt[].
 1.3 26-Mar-1998  tsubai Add MIPS_INT_MASK_FPU definition and remove unnecessary code.
 1.2 04-Mar-1998  thorpej Rename NetBSD/news to NetBSD/newsmips.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.5.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.3 13-Mar-2002  simonb All the mips ports had an identical procfs_machdep.c, so use a common
file under arch/mips/mips.
 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:50 +0000
 1.2.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2 08-Jun-1998  tsubai Not used.
 1.1 18-Feb-1998  tsubai Initial import of NetBSD/news.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 12-Dec-2003  jmc Needs a .WAIT before doing boot/bootxx
 1.3 20-May-2002  lukem branches: 1.3.8;
Update to <sys/bootblock.h>'s shared_bbinfo.
(From Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>)
 1.2 17-Dec-1999  tsubai branches: 1.2.8; 1.2.12; 1.2.20;
Move common objects and libraries to common/.
 1.1 08-Jul-1999  tsubai branches: 1.1.2; 1.1.8;
Add NetBSD/newsmips native boot loader.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.
 1.2.20.1 30-May-2002  gehenna Catch up with -current.
 1.2.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.2.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.10 08-Apr-2017  christos centralize vers.c building for standalone programs.
 1.9 21-Jul-2016  christos branches: 1.9.2;
add NOPIE
 1.8 12-Jan-2014  tsutsui branches: 1.8.6; 1.8.10;
Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.7 22-Jan-2011  joerg branches: 1.7.4; 1.7.14; 1.7.18;
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.6 29-Jun-2006  lukem branches: 1.6.84; 1.6.90; 1.6.92;
support MAKEVERBOSE
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8; 1.5.16;
merge ktrace-lwp.
 1.4 26-Oct-2003  lukem branches: 1.4.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.3 08-Oct-2003  simonb Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
 1.2 18-Apr-2002  tsutsui branches: 1.2.10;
Add version strings by newvers_stand.sh to secondary boot.
 1.1 08-Jul-1999  tsubai branches: 1.1.16; 1.1.20;
Add NetBSD/newsmips native boot loader.
 1.1.20.1 20-Jun-2002  nathanw Catch up to -current.
 1.1.16.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.10.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.5.8.1 11-Aug-2006  yamt sync with head
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.92.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.90.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.84.1 05-Mar-2011  rmind sync with head
 1.7.18.1 18-May-2014  rmind sync with head
 1.7.14.2 03-Dec-2017  jdolecek update from HEAD
 1.7.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.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.8.10.2 26-Apr-2017  pgoyette Sync with HEAD
 1.8.10.1 26-Jul-2016  pgoyette Sync with HEAD
 1.8.6.2 28-Aug-2017  skrll Sync with HEAD
 1.8.6.1 05-Oct-2016  skrll Sync with HEAD
 1.9.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.23 30-Sep-2018  tsutsui Switch bootloader to using DHCP rather than BOOTPARAM.

Also bump version.
 1.22 17-Dec-2009  matt branches: 1.22.62; 1.22.64;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)
 1.21 16-Dec-2009  matt Fix various build with the 32bit mips ports after the mips64 merge.
 1.20 15-Apr-2009  tsutsui Use <bsd.klinks.mk> to create machine and ${MACHINE_ARCH} symlinks.
 1.19 12-Jan-2009  tsutsui branches: 1.19.2;
Enable prototype warning options.
 1.18 29-Jun-2006  lukem branches: 1.18.58; 1.18.62; 1.18.70;
support MAKEVERBOSE
 1.17 29-Jun-2006  lukem Rename LDFLAGS to LINKFLAGS, as the former is for CC not LD.
 1.16 18-Apr-2003  tsutsui branches: 1.16.18; 1.16.32; 1.16.36; 1.16.44;
- remove definitions of SIZE and STRIP which should be defined elsewhere
- use mips/conf/stand.ldscript so that objcopy -O binary works
 1.15 30-Mar-2003  tsutsui Use 32bit daddr_t.
 1.14 22-Nov-2002  tsutsui - Add -msoft-float and -ffreestanding to CFLAGS.
- Add -mno-abicalls to AFLAGS.
- Set WARNS?=1
 1.13 13-Apr-2002  tsutsui Add ustarfs support and changedisk_hook().
 1.12 13-Apr-2002  tsutsui Add -mmemcpy to CFLAGS.
 1.11 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.10 14-Nov-2001  tv branches: 1.10.2;
${MAKE} print-objdir -> ${PRINTOBJDIR}
 1.9 22-Sep-2001  tv objcopy -> ${OBJCOPY}; remove redundant definitions of OBJCOPY?= (it is
now in bsd.own.mk).
 1.8 01-Feb-2000  tsutsui branches: 1.8.6; 1.8.8;
Revert STRIPPROG -> STRIP
 1.7 19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.6 23-Dec-1999  tsubai Comment out -DBOOT_DEBUG.
 1.5 23-Dec-1999  tsubai Delete lines that I didn't intended to commit.
 1.4 22-Dec-1999  tsubai news5000 support.
 1.3 18-Dec-1999  tsubai Introduce bootinfo.
 1.2 17-Dec-1999  tsubai Move common objects and libraries to common/.
 1.1 08-Jul-1999  tsubai branches: 1.1.2; 1.1.8;
Add NetBSD/newsmips native boot loader.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.
 1.8.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.8.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.2.4 11-Dec-2002  thorpej Sync with HEAD.
 1.10.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.10.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.2.1 14-Nov-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:26:56 +0000
 1.16.44.1 13-Jul-2006  gdamore Merge from HEAD.
 1.16.36.1 11-Aug-2006  yamt sync with head
 1.16.32.1 09-Sep-2006  rpaulo sync with head
 1.16.18.1 30-Dec-2006  yamt sync with head.
 1.18.70.2 28-Apr-2009  skrll Sync with HEAD.
 1.18.70.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.62.2 11-Mar-2010  yamt sync with head
 1.18.62.1 04-May-2009  yamt sync with head.
 1.18.58.1 17-Jan-2009  mjf Sync with HEAD.
 1.19.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.64.1 10-Jun-2019  christos Sync with HEAD
 1.22.62.1 20-Oct-2018  pgoyette Sync with head
 1.21 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.20 26-Mar-2014  christos branches: 1.20.28; 1.20.30;
kill sprintf
 1.19 22-Jan-2011  joerg branches: 1.19.4; 1.19.14; 1.19.18;
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.18 25-Aug-2010  christos branches: 1.18.2; 1.18.4;
s/LOAD_NOTE/LOAD_BACKWARDS/
 1.17 20-Jan-2009  tsutsui branches: 1.17.4; 1.17.6;
Disable LOAD_NOTE on floppy boot. Fixes PR install/38943 on newsmips.
 1.16 11-Dec-2005  christos branches: 1.16.78; 1.16.86; 1.16.88;
merge ktrace-lwp.
 1.15 08-Feb-2005  he Remove a now-extraneous right parenthesis, after de-__P'ing.
 1.14 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.13 21-Nov-2003  tsutsui branches: 1.13.8; 1.13.10;
Revert previous DPRINTF changes since gcc3 properly removes text strings
in while(0) statements during optimization.
 1.12 22-Nov-2002  tsutsui branches: 1.12.6;
Add some prototype declarations.
 1.11 30-Apr-2002  tsutsui Make sure whole DPRINTF()s are actually disabled on normal build.
It seems compiler does not remove text strings in while(0) statement
on its optimization.
 1.10 18-Apr-2002  tsutsui Add version strings by newvers_stand.sh to secondary boot.
 1.9 13-Apr-2002  tsutsui Add getchar().
 1.8 13-Apr-2002  tsutsui bzero() -> memset()
 1.7 13-Apr-2002  tsutsui Rename halt() -> rom_halt(), and declare it in romcall.h.
 1.6 16-Jan-2002  tsutsui Fix a possible uninitialized variable found by new toolchain.
 1.5 12-Oct-2000  onoe branches: 1.5.4; 1.5.8;
Add support to boot on APbus machine (e.g. NWS-5000).
 1.4 23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.3 22-Dec-1999  tsubai news5000 support.
 1.2 18-Dec-1999  tsubai Introduce bootinfo.
 1.1 08-Jul-1999  tsubai branches: 1.1.2; 1.1.8;
Add NetBSD/newsmips native boot loader.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.
 1.5.8.4 11-Dec-2002  thorpej Sync with HEAD.
 1.5.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.5.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.5.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.6.5 09-Feb-2005  skrll Sync with HEAD.
 1.12.6.4 06-Feb-2005  skrll Sync with HEAD.
 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.13.10.1 12-Feb-2005  yamt sync with head.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.16.88.1 25-Jan-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #307):
sys/arch/newsmips/stand/boot/boot.c: revision 1.17
Disable LOAD_NOTE on floppy boot. Fixes PR install/38943 on newsmips.
 1.16.86.1 03-Mar-2009  skrll Sync with HEAD.
 1.16.78.2 09-Oct-2010  yamt sync with head
 1.16.78.1 04-May-2009  yamt sync with head.
 1.17.6.1 05-Mar-2011  rmind sync with head
 1.17.4.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.18.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.18.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.18.1 18-May-2014  rmind sync with head
 1.19.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.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.20.30.1 10-Jun-2019  christos Sync with HEAD
 1.20.28.1 20-Oct-2018  pgoyette Sync with head
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 31-Jan-2008  tsutsui branches: 1.5.6; 1.5.8; 1.5.10;
Account bi_size properly.
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.56;
merge ktrace-lwp.
 1.3 06-Feb-2005  tsutsui branches: 1.3.6;
Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.2 13-Apr-2002  tsutsui branches: 1.2.10; 1.2.18; 1.2.20;
bcopy() -> memcpy()
 1.1 18-Dec-1999  tsubai branches: 1.1.2; 1.1.8; 1.1.12; 1.1.16;
Introduce bootinfo.
 1.1.16.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.12.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.
 1.1.8.1 18-Dec-1999  bouyer file bootinfo.c was added on branch thorpej_scsipi on 2000-11-20 22:35:42 +0000
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.20.1 12-Feb-2005  yamt sync with head.
 1.2.18.1 29-Apr-2005  kent sync with -current
 1.2.10.1 06-Feb-2005  skrll Sync with HEAD.
 1.3.6.1 04-Feb-2008  yamt sync with head.
 1.4.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.50.1 23-Mar-2008  matt sync with HEAD
 1.5.10.1 16-May-2008  yamt sync with head.
 1.5.8.1 18-May-2008  yamt sync with head.
 1.5.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10 21-Feb-2008  tsutsui Use __arraycount().
 1.9 11-Dec-2005  christos branches: 1.9.50; 1.9.70;
merge ktrace-lwp.
 1.8 23-Jun-2005  junyoung branches: 1.8.2;
Use FS_OPS() macro.
 1.7 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.6 21-Nov-2003  tsutsui branches: 1.6.8; 1.6.10;
Revert previous DPRINTF changes since gcc3 properly removes text strings
in while(0) statements during optimization.
 1.5 22-Nov-2002  tsutsui branches: 1.5.6;
Add some prototype declarations.
 1.4 30-Apr-2002  tsutsui Make sure whole DPRINTF()s are actually disabled on normal build.
It seems compiler does not remove text strings in while(0) statement
on its optimization.
 1.3 13-Apr-2002  tsutsui Add ustarfs support and changedisk_hook().
 1.2 22-Dec-1999  tsubai branches: 1.2.8; 1.2.12;
news5000 support.
 1.1 08-Jul-1999  tsubai branches: 1.1.2;
Add NetBSD/newsmips native boot loader.
 1.1.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.
 1.2.12.3 11-Dec-2002  thorpej Sync with HEAD.
 1.2.12.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.12.1 17-Apr-2002  nathanw Catch up to -current.
 1.2.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.6.4 06-Feb-2005  skrll Sync with HEAD.
 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.10.1 12-Feb-2005  yamt sync with head.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.8.2.1 27-Feb-2008  yamt sync with head.
 1.9.70.1 24-Mar-2008  keiichi sync with head.
 1.9.50.1 23-Mar-2008  matt sync with HEAD
 1.2 22-Dec-1999  tsubai news5000 support.
 1.1 08-Jul-1999  tsubai branches: 1.1.2;
Add NetBSD/newsmips native boot loader.
 1.1.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.
 1.7 12-Apr-2021  mrg remove shadowed (common) declarations of various libsa variables
from various boot programs. for macppc and zaurus, avoid building
with -fcommon any more.
 1.6 30-Sep-2018  tsutsui branches: 1.6.14;
Switch bootloader to using DHCP rather than BOOTPARAM.

Also bump version.
 1.5 21-Oct-2009  snj branches: 1.5.62; 1.5.64;
Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder).
 1.4 11-Dec-2005  christos branches: 1.4.78;
merge ktrace-lwp.
 1.3 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.2 13-Mar-2003  drochner branches: 1.2.2; 1.2.10; 1.2.12;
Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct romdev", everything else was ballast.
Do it straightforward now and assign the romdev directly to io_netif.
 1.1 22-Dec-1999  tsubai branches: 1.1.6;
news5000 support.
 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.
 1.1.6.1 22-Dec-1999  bouyer file net.c was added on branch thorpej_scsipi on 2000-11-20 22:35:42 +0000
 1.2.12.1 12-Feb-2005  yamt sync with head.
 1.2.10.1 29-Apr-2005  kent sync with -current
 1.2.2.1 06-Feb-2005  skrll Sync with HEAD.
 1.4.78.1 11-Mar-2010  yamt sync with head
 1.5.64.1 10-Jun-2019  christos Sync with HEAD
 1.5.62.1 20-Oct-2018  pgoyette Sync with head
 1.6.14.1 17-Apr-2021  thorpej Sync with HEAD.
 1.9 21-Sep-2014  christos remove stray ;
 1.8 21-Oct-2009  snj branches: 1.8.22; 1.8.38;
Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder).
 1.7 12-Jan-2009  tsutsui Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
numbers in seconds returned by the machine dependent getsecs() function
which are used to measure relative time

saseconds_t (currently int):
numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.78; 1.6.86;
merge ktrace-lwp.
 1.5 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.4 13-Mar-2003  drochner branches: 1.4.2; 1.4.10; 1.4.12;
Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct romdev", everything else was ballast.
Do it straightforward now and assign the romdev directly to io_netif.
 1.3 13-Apr-2002  tsutsui bzero() -> memset()
 1.2 23-Dec-1999  tsubai branches: 1.2.6; 1.2.10; 1.2.14;
* Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1 22-Dec-1999  tsubai news5000 support.
 1.2.14.1 17-Apr-2002  nathanw Catch up to -current.
 1.2.10.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.
 1.2.6.1 23-Dec-1999  bouyer file netif_news.c was added on branch thorpej_scsipi on 2000-11-20 22:35:42 +0000
 1.4.12.1 12-Feb-2005  yamt sync with head.
 1.4.10.1 29-Apr-2005  kent sync with -current
 1.4.2.1 06-Feb-2005  skrll Sync with HEAD.
 1.6.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.6.78.2 11-Mar-2010  yamt sync with head
 1.6.78.1 04-May-2009  yamt sync with head.
 1.6.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.8.38.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.8.22.1 03-Dec-2017  jdolecek update from HEAD
 1.1 13-Mar-2003  drochner Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct romdev", everything else was ballast.
Do it straightforward now and assign the romdev directly to io_netif.
 1.3 06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.2 13-Apr-2002  tsutsui branches: 1.2.10; 1.2.18; 1.2.20;
Add ustarfs support and changedisk_hook().
 1.1 22-Dec-1999  tsubai branches: 1.1.6; 1.1.10; 1.1.14;
news5000 support.
 1.1.14.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.10.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.
 1.1.6.1 22-Dec-1999  bouyer file promdev.h was added on branch thorpej_scsipi on 2000-11-20 22:35:42 +0000
 1.2.20.1 12-Feb-2005  yamt sync with head.
 1.2.18.1 29-Apr-2005  kent sync with -current
 1.2.10.1 06-Feb-2005  skrll Sync with HEAD.
 1.3 14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.2 30-Sep-2018  tsutsui Switch bootloader to using DHCP rather than BOOTPARAM.

Also bump version.
 1.1 18-Apr-2002  tsutsui branches: 1.1.6; 1.1.8; 1.1.204; 1.1.206;
Add version strings by newvers_stand.sh to secondary boot.
 1.1.206.1 10-Jun-2019  christos Sync with HEAD
 1.1.204.1 20-Oct-2018  pgoyette Sync with head
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 18-Apr-2002  jdolecek file version was added on branch kqueue on 2002-06-23 17:38:54 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 18-Apr-2002  nathanw file version was added on branch nathanw_sa on 2002-06-20 03:40:19 +0000
 1.13 16-Apr-2009  tsutsui Use mips/conf/stand.ldscript on link so that we can use objcopy(1)
to create raw bootxx binary. Tested on NWS-5000X.
 1.12 15-Apr-2009  tsutsui Use <bsd.klinks.mk> to create machine and ${MACHINE_ARCH} symlinks.
 1.11 12-Jan-2009  tsutsui branches: 1.11.2;
Enable prototype warning options.
 1.10 29-Jun-2006  lukem branches: 1.10.58; 1.10.62; 1.10.70;
support MAKEVERBOSE
 1.9 29-Jun-2006  lukem Rename LDFLAGS to LINKFLAGS, as the former is for CC not LD.
 1.8 22-Nov-2002  tsutsui branches: 1.8.22; 1.8.36; 1.8.40; 1.8.48;
- Add -msoft-float and -ffreestanding to CFLAGS.
- Add -mno-abicalls to AFLAGS.
- Set WARNS?=1
 1.7 20-May-2002  lukem Update to <sys/bootblock.h>'s shared_bbinfo.
(From Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>)
 1.6 13-Apr-2002  tsutsui branches: 1.6.2;
Add -mmemcpy to CFLAGS.
 1.5 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.4 14-Nov-2001  tv branches: 1.4.2;
${MAKE} print-objdir -> ${PRINTOBJDIR}
 1.3 12-Oct-2000  onoe branches: 1.3.4;
Add support to boot on APbus machine (e.g. NWS-5000).
 1.2 17-Dec-1999  tsubai Move common objects and libraries to common/.
 1.1 08-Jul-1999  tsubai branches: 1.1.2; 1.1.8;
Add NetBSD/newsmips native boot loader.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.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.
 1.3.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.4.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.4.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.4.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.2.1 14-Nov-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:26:56 +0000
 1.6.2.1 30-May-2002  gehenna Catch up with -current.
 1.8.48.1 13-Jul-2006  gdamore Merge from HEAD.
 1.8.40.1 11-Aug-2006  yamt sync with head
 1.8.36.1 09-Sep-2006  rpaulo sync with head
 1.8.22.1 30-Dec-2006  yamt sync with head.
 1.10.70.2 28-Apr-2009  skrll Sync with HEAD.
 1.10.70.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.62.1 04-May-2009  yamt sync with head.
 1.10.58.1 17-Jan-2009  mjf Sync with HEAD.
 1.11.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9 26-Mar-2014  christos kill sprintf
 1.8 21-Feb-2008  tsutsui branches: 1.8.4; 1.8.50; 1.8.56;
u_int32_t -> uint32_t, remove __P(), ANSIfy.
 1.7 11-Dec-2005  christos branches: 1.7.50; 1.7.70;
merge ktrace-lwp.
 1.6 21-Nov-2003  tsutsui branches: 1.6.16;
Revert previous DPRINTF changes since gcc3 properly removes text strings
in while(0) statements during optimization.
 1.5 22-Nov-2002  tsutsui branches: 1.5.6;
Add some prototype declarations.
 1.4 20-May-2002  lukem Update to <sys/bootblock.h>'s shared_bbinfo.
(From Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>)
 1.3 30-Apr-2002  tsutsui branches: 1.3.2;
Make sure whole DPRINTF()s are actually disabled on normal build.
It seems compiler does not remove text strings in while(0) statement
on its optimization.
 1.2 12-Oct-2000  onoe branches: 1.2.4; 1.2.8;
Add support to boot on APbus machine (e.g. NWS-5000).
 1.1 08-Jul-1999  tsubai branches: 1.1.2;
Add NetBSD/newsmips native boot loader.
 1.1.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.
 1.2.8.2 11-Dec-2002  thorpej Sync with HEAD.
 1.2.8.1 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.1 30-May-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.6.16.1 27-Feb-2008  yamt sync with head.
 1.7.70.1 24-Mar-2008  keiichi sync with head.
 1.7.50.1 23-Mar-2008  matt sync with HEAD
 1.8.56.1 18-May-2014  rmind sync with head
 1.8.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.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.2 17-Dec-1999  tsubai Moved to common/romcalls.S,v
 1.1 08-Jul-1999  tsubai branches: 1.1.2; 1.1.8;
Add NetBSD/newsmips native boot loader.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.2 12-Oct-2000  onoe Add support to boot on APbus machine (e.g. NWS-5000).
 1.1 08-Jul-1999  tsubai branches: 1.1.2;
Add NetBSD/newsmips native boot loader.
 1.1.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.
 1.11 15-Apr-2009  tsutsui Use <bsd.klinks.mk> to create machine and ${MACHINE_ARCH} symlinks.
 1.10 03-Apr-2009  tsutsui Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
 1.9 12-Jan-2009  tsutsui branches: 1.9.2;
Enable prototype warning options.
 1.8 30-Mar-2003  tsutsui branches: 1.8.104; 1.8.108; 1.8.116;
Use 32bit daddr_t.
 1.7 22-Nov-2002  tsutsui - Add -msoft-float and -ffreestanding to CFLAGS.
- Add -mno-abicalls to AFLAGS.
- Set WARNS?=1
 1.6 05-May-2002  jdolecek CLEANFILES should be set regardless of target
 1.5 05-May-2002  jdolecek also don't do the machine symlinks for 'cleandir' target
 1.4 13-Apr-2002  tsutsui Add ustarfs support and changedisk_hook().
 1.3 13-Apr-2002  tsutsui Build SA libs with -mmemcpy and set LIBSA_USE_MEMSET and LIBSA_USE_MEMCPY.
 1.2 23-Jan-2000  mycroft branches: 1.2.6; 1.2.10; 1.2.14;
Clean up the machine symlink stuff ever so slightly. Needs to be
standardized between files.
 1.1 17-Dec-1999  tsubai branches: 1.1.2;
Move common objects and libraries to common/.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.14.3 11-Dec-2002  thorpej Sync with HEAD.
 1.2.14.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.14.1 17-Apr-2002  nathanw Catch up to -current.
 1.2.10.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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.
 1.2.6.1 23-Jan-2000  bouyer file Makefile was added on branch thorpej_scsipi on 2000-11-20 22:35:42 +0000
 1.8.116.2 28-Apr-2009  skrll Sync with HEAD.
 1.8.116.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.108.1 04-May-2009  yamt sync with head.
 1.8.104.1 17-Jan-2009  mjf Sync with HEAD.
 1.9.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5 18-Apr-2003  tsutsui Use LEAF_NOPROFILE().
 1.4 13-Apr-2002  tsutsui Add some ioctl() definitions to eject floppy.
 1.3 13-Apr-2002  tsutsui Rename halt() -> rom_halt(), and declare it in romcall.h.
 1.2 17-Dec-1999  tsubai branches: 1.2.2; 1.2.8; 1.2.12; 1.2.16;
Moved from bootxx/romcalls.S,v
 1.1 08-Jul-1999  tsubai Add NetBSD/newsmips native boot loader.
 1.2.16.1 17-Apr-2002  nathanw Catch up to -current.
 1.2.12.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.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.
 1.2.8.1 17-Dec-1999  bouyer file romcalls.S was added on branch thorpej_scsipi on 2000-11-20 22:35:42 +0000
 1.2.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.

RSS XML Feed