Home | History | Annotate | only in /src/sys/arch/sun2
History log of /src/sys/arch/sun2
RevisionDateAuthorComments
 1.3 06-Jan-2003  lukem Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.2 27-Jun-2001  fredette branches: 1.2.8;
Removed stand from SUBDIRS.
 1.1 10-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 10-Apr-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-04-21 17:54:46 +0000
 1.2.8.2 07-Jan-2003  thorpej Sync with HEAD.
 1.2.8.1 27-Jun-2001  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:23:37 +0000
 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 22-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.10.1 22-Apr-2001  thorpej file .keep_me was added on branch nathanw_sa on 2003-01-07 21:23:37 +0000
 1.1.2.2 23-Apr-2001  bouyer Sync with HEAD.
 1.1.2.1 22-Apr-2001  bouyer file .keep_me was added on branch thorpej_scsipi on 2001-04-23 09:42:09 +0000
 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:23:38 +0000
 1.59 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.58 14-Sep-2017  mrg branches: 1.58.2; 1.58.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.57 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.56 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.55 07-Aug-2015  maxv Remove KMEMSTATS.
 1.54 23-Aug-2014  dholland branches: 1.54.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.53 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.52 26-Jul-2014  tsutsui Comment out options and devices to sync GENERIC rev 1.90.
 1.51 30-Jun-2013  rmind branches: 1.51.4;
G/C PFIL_HOOKS from the kernel configs.
 1.50 05-Jun-2013  christos branches: 1.50.2;
catch the escapees of the IPSEC_NAT_T purge.
 1.49 27-Apr-2013  christos the bogus number police
 1.48 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.47 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.46 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.45 22-Nov-2011  tls branches: 1.45.8;

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.44 30-Jun-2011  wiz branches: 1.44.2;
dependant -> dependent
 1.43 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.42 23-Nov-2010  hannken branches: 1.42.2; 1.42.4;
Remove unused count from pseudo-device md.
 1.41 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.40 24-Nov-2008  ad branches: 1.40.6; 1.40.8;
Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.38 26-Apr-2008  tsutsui branches: 1.38.2; 1.38.8; 1.38.10;
Remove obsolete options SHMMAXPGS.
 1.37 05-Apr-2008  tsutsui branches: 1.37.2;
Always specify COPTS="-Os" and disable several options and devices
to shrink kernels. Current sun68k bootloader can't load a kernel larger
than ~2MB, and our ever growing kernel have reached the limit.
 1.36 11-Jan-2008  tsutsui branches: 1.36.6;
- add options COMPAT_40
- adjust comments
 1.35 29-Dec-2006  yamt branches: 1.35.24; 1.35.30; 1.35.36;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.34 14-Oct-2006  tsutsui Add "options NFS_RSIZE=1024,NFS_WSIZE=1024" for poor ec(4) interfaces.
 1.33 14-Oct-2006  tsutsui Remove "rnd is EXPERIMENTAL" comments and enable pseudo-device rnd.
 1.32 14-Oct-2006  tsutsui Don't specify number of ptys unless it's smaller than default 16.
 1.31 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.30 26-Aug-2006  christos branches: 1.30.2; 1.30.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.29 05-Feb-2006  cube branches: 1.29.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.28 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.27 07-Dec-2005  tsutsui branches: 1.27.2; 1.27.4; 1.27.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.26 04-Sep-2005  isaki typo in comment.
 1.25 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.24 19-Aug-2005  christos 64 bit inode changes.
 1.23 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.22 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.21 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.20 25-Feb-2005  simonb branches: 1.20.2; 1.20.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.19 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.18 10-Nov-2004  christos branches: 1.18.4; 1.18.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.17 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.16 30-Oct-2003  mycroft branches: 1.16.2;
Add COMPAT_16.
 1.15 10-Apr-2003  christos branches: 1.15.2;
Bye Bye UCONSOLE
 1.14 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.13 22-Aug-2002  abs PIPE_SOCKETPAIR, MALLOC_NOINLINE and VNODE_OP_NOINLINE are all appropriate for
the 'minimal memory' configurations.
 1.12 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.11 25-Apr-2002  atatat branches: 1.11.2; 1.11.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.10 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.9 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.8 30-Nov-2001  fredette In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.7 26-Nov-2001  fredette Disabled some more things that lighter kernels don't need,
and picked up some formatting fixes from GENERIC.
 1.6 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.5 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.4 08-Jul-2001  abs branches: 1.4.2; 1.4.8;
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.3 27-Jun-2001  fredette Updated with VME machine support, a.out compat,
some zs and console changes.
 1.2 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.1 03-May-2001  fredette Added some kernel configurations.
 1.4.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.6 27-Aug-2002  nathanw Catch up to -current.
 1.4.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.4.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 08-Jul-2001  nathanw file DISKLESS was added on branch nathanw_sa on 2002-01-08 00:28:06 +0000
 1.4.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.4.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.1 01-Aug-2002  lukem Pull up revision 1.12 (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.11.2.2 31-Aug-2002  gehenna catch up with -current.
 1.11.2.1 15-Jul-2002  gehenna catch up with -current.
 1.15.2.8 11-Dec-2005  christos Sync with head.
 1.15.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.15.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.2.1 15-Jul-2004  he Pull up revision 1.17 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.18.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.6.1 12-Feb-2005  yamt sync with head.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.20.4.3 21-Jan-2008  yamt sync with head
 1.20.4.2 30-Dec-2006  yamt sync with head.
 1.20.4.1 21-Jun-2006  yamt sync with head.
 1.20.2.1 18-Jul-2005  riz Pull up revision 1.21 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.27.6.1 22-Apr-2006  simonb Sync with head.
 1.27.4.1 09-Sep-2006  rpaulo sync with head
 1.27.2.1 18-Feb-2006  yamt sync with head.
 1.29.2.1 03-Sep-2006  yamt sync with head.
 1.30.4.1 22-Oct-2006  yamt sync with head
 1.30.2.2 12-Jan-2007  ad Sync with head.
 1.30.2.1 18-Nov-2006  ad Sync with head.
 1.35.36.1 11-Jan-2008  bouyer Sync with HEAD
 1.35.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.35.24.1 23-Mar-2008  matt sync with HEAD
 1.36.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.36.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.37.2.1 18-May-2008  yamt sync with head.
 1.38.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.38.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.38.2.2 11-Aug-2010  yamt sync with head.
 1.38.2.1 04-May-2009  yamt sync with head.
 1.40.8.3 21-Apr-2011  rmind sync with head
 1.40.8.2 05-Mar-2011  rmind sync with head
 1.40.8.1 30-May-2010  rmind sync with head
 1.40.6.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.42.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.42.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.44.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.44.2.1 17-Apr-2012  yamt sync with head
 1.45.8.3 03-Dec-2017  jdolecek update from HEAD
 1.45.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45.8.1 23-Jun-2013  tls resync from head
 1.50.2.1 28-Aug-2013  rmind sync with head
 1.51.4.1 10-Aug-2014  tls Rebase.
 1.54.2.2 28-Aug-2017  skrll Sync with HEAD
 1.54.2.1 22-Sep-2015  skrll Sync with HEAD
 1.58.4.1 10-Jun-2019  christos Sync with HEAD
 1.58.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.63 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.62 01-Jun-2018  mrg branches: 1.62.2;
disable a few more things and return another 1% of memory.
 1.61 14-Sep-2017  mrg branches: 1.61.2;
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.60 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.59 12-Aug-2015  maxv Remove KMEMSTATS.
 1.58 23-Aug-2014  dholland branches: 1.58.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.57 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.56 26-Jul-2014  tsutsui Comment out options and devices to sync GENERIC rev 1.90.
 1.55 30-Jun-2013  rmind branches: 1.55.4;
G/C PFIL_HOOKS from the kernel configs.
 1.54 05-Jun-2013  christos branches: 1.54.2;
remove obsolete networking options
 1.53 27-Apr-2013  christos the bogus number police
 1.52 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.51 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.50 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.49 22-Nov-2011  tls branches: 1.49.8;

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.48 30-Jun-2011  wiz branches: 1.48.2;
dependant -> dependent
 1.47 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.46 23-Nov-2010  hannken branches: 1.46.2; 1.46.4;
Remove unused count from pseudo-device md.
 1.45 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.44 24-Nov-2008  ad branches: 1.44.6; 1.44.8;
Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.42 26-Apr-2008  tsutsui branches: 1.42.2; 1.42.8; 1.42.10;
Remove obsolete options SHMMAXPGS.
 1.41 05-Apr-2008  tsutsui branches: 1.41.2;
Always specify COPTS="-Os" and disable several options and devices
to shrink kernels. Current sun68k bootloader can't load a kernel larger
than ~2MB, and our ever growing kernel have reached the limit.
 1.40 11-Jan-2008  tsutsui branches: 1.40.6;
- add options COMPAT_40
- adjust comments
 1.39 29-Dec-2006  yamt branches: 1.39.24; 1.39.30; 1.39.36;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.38 14-Oct-2006  tsutsui Add "options NFS_RSIZE=1024,NFS_WSIZE=1024" for poor ec(4) interfaces.
 1.37 14-Oct-2006  tsutsui Remove "rnd is EXPERIMENTAL" comments and enable pseudo-device rnd.
 1.36 14-Oct-2006  tsutsui Don't specify number of ptys unless it's smaller than default 16.
 1.35 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.34 26-Aug-2006  christos branches: 1.34.2; 1.34.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.33 05-Feb-2006  cube branches: 1.33.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.32 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.31 07-Dec-2005  tsutsui branches: 1.31.2; 1.31.4; 1.31.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.30 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.29 04-Sep-2005  isaki typo in comment.
 1.28 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.27 19-Aug-2005  christos 64 bit inode changes.
 1.26 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.25 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.24 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.23 25-Feb-2005  simonb branches: 1.23.2; 1.23.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.22 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.21 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.20 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.19 10-Nov-2004  christos branches: 1.19.4; 1.19.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.18 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.17 30-Oct-2003  mycroft branches: 1.17.2;
Add COMPAT_16.
 1.16 10-Apr-2003  christos branches: 1.16.2;
Bye Bye UCONSOLE
 1.15 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.14 22-Aug-2002  abs PIPE_SOCKETPAIR, MALLOC_NOINLINE and VNODE_OP_NOINLINE are all appropriate for
the 'minimal memory' configurations.
 1.13 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.12 25-Apr-2002  atatat branches: 1.12.2; 1.12.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.11 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.10 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.9 30-Nov-2001  fredette In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.8 26-Nov-2001  fredette Disabled some more things that lighter kernels don't need,
and picked up some formatting fixes from GENERIC.
 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 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.5 08-Jul-2001  abs branches: 1.5.2; 1.5.8;
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.4 27-Jun-2001  fredette Updated with VME machine support, a.out compat,
some zs and console changes.
 1.3 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.2 18-Apr-2001  fredette branches: 1.2.2;
Trimmed off some options that are unnecessary for now,
and some that don't work. Added some more comments,
commented out some 2/50 device entries.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 18-Apr-2001  bouyer file FOURMEG was added on branch thorpej_scsipi on 2001-04-21 17:54:46 +0000
 1.5.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.5.8.6 27-Aug-2002  nathanw Catch up to -current.
 1.5.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.5.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.5.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.5.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.8.1 08-Jul-2001  nathanw file FOURMEG was added on branch nathanw_sa on 2002-01-08 00:28:07 +0000
 1.5.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.5.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.4.1 01-Aug-2002  lukem Pull up revision 1.13 (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.12.2.2 31-Aug-2002  gehenna catch up with -current.
 1.12.2.1 15-Jul-2002  gehenna catch up with -current.
 1.16.2.9 11-Dec-2005  christos Sync with head.
 1.16.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.16.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.16.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.16.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.2.1 15-Jul-2004  he Pull up revision 1.18 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.19.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.6.1 12-Feb-2005  yamt sync with head.
 1.19.4.1 29-Apr-2005  kent sync with -current
 1.23.4.3 21-Jan-2008  yamt sync with head
 1.23.4.2 30-Dec-2006  yamt sync with head.
 1.23.4.1 21-Jun-2006  yamt sync with head.
 1.23.2.1 18-Jul-2005  riz Pull up revision 1.24 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.31.6.1 22-Apr-2006  simonb Sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.31.2.1 18-Feb-2006  yamt sync with head.
 1.33.2.1 03-Sep-2006  yamt sync with head.
 1.34.4.1 22-Oct-2006  yamt sync with head
 1.34.2.2 12-Jan-2007  ad Sync with head.
 1.34.2.1 18-Nov-2006  ad Sync with head.
 1.39.36.1 11-Jan-2008  bouyer Sync with HEAD
 1.39.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.39.24.1 23-Mar-2008  matt sync with HEAD
 1.40.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.40.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.41.2.1 18-May-2008  yamt sync with head.
 1.42.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.42.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.42.2.2 11-Aug-2010  yamt sync with head.
 1.42.2.1 04-May-2009  yamt sync with head.
 1.44.8.3 21-Apr-2011  rmind sync with head
 1.44.8.2 05-Mar-2011  rmind sync with head
 1.44.8.1 30-May-2010  rmind sync with head
 1.44.6.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.46.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.46.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.48.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.48.2.1 17-Apr-2012  yamt sync with head
 1.49.8.3 03-Dec-2017  jdolecek update from HEAD
 1.49.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.49.8.1 23-Jun-2013  tls resync from head
 1.54.2.1 28-Aug-2013  rmind sync with head
 1.55.4.1 10-Aug-2014  tls Rebase.
 1.58.2.2 28-Aug-2017  skrll Sync with HEAD
 1.58.2.1 22-Sep-2015  skrll Sync with HEAD
 1.61.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.61.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.62.2.1 10-Jun-2019  christos Sync with HEAD
 1.111 30-Jun-2024  rin sun2: GENERIC: XXX: Drop `MODULAR` and `compat_netbsd16.config`

as a workaround for memory shortage. Even with 8MB-RAM configuration,
live-image for TME gets stalled during processing /etc/rc, without
any response to serial console :(

With this change, it can boot into multi-user mode, at least.

XXX
Other config files? Make more kernel components optional?
 1.110 12-Feb-2023  abs branches: 1.110.6;
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.109 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.108 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.107 10-Aug-2020  rin Reduce kernel size by
- Adding -fno-asynchronous-unwind-tables and -fno-unwind-tables to COPTS
- Specify NO_KERNEL_RCSIDS to strip RCSIDS
Also adding -fno-omit-frame-pointer to COPTS for backtrace in DDB.
 1.106 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.105 08-Mar-2020  rin Fix comments on root devices.
 1.104 08-Mar-2020  rin Retire md(4) in favor of tmpfs provided by module,
though both are not useful for 8MB RAM system...
 1.103 08-Mar-2020  rin sun2 kernel is restricted to ~2MB due to bootloader.
It seems that working kernel should be more smaller.

Strip off most kernel options, and provide by kernel modules.
Also add GENERIC kernel for NFS root instead of FFS.
 1.102 26-Apr-2019  sevan Use veriexec.config to reduce duplication
 1.101 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.100 10-Feb-2018  maxv branches: 1.100.2; 1.100.4;
Remove the last reference to IPSEC_ESP. This option was deleted in
2013.
 1.99 23-Jan-2018  sevan Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.98 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.97 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.96 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.95 26-Sep-2015  maxv branches: 1.95.10;
Remove KMEMSTATS. Normally it's ok now.
 1.94 16-Nov-2014  manu branches: 1.94.2;
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.93 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.92 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.91 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.90 26-Jul-2014  tsutsui branches: 1.90.2;
Shrink GENERIC kernel to fit to bootloader's limit (2MB).

Maybe now we can't call it GENERIC, but it still boots on TME.
 1.89 30-Jun-2013  rmind branches: 1.89.4;
G/C PFIL_HOOKS from the kernel configs.
 1.88 05-Jun-2013  christos branches: 1.88.2;
remove obsolete networking options
 1.87 27-Apr-2013  christos the bogus number police
 1.86 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.85 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.84 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.83 10-Mar-2012  joerg branches: 1.83.2;
P1003_1B_SEMAPHORE is no longer optional.
 1.82 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.81 22-Nov-2011  tls branches: 1.81.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.80 26-Oct-2011  mrg branches: 1.80.2;
revert previous.
 1.79 26-Oct-2011  mrg catch up with other zs ports, original commit was:

>add two new functions for z8530tty: zs_chan_lock() and zs_chan_unlock(),
>and use them instead of various spl's in the zs.c's.
>
>reviewed by ad and martin.
 1.78 30-Jun-2011  wiz dependant -> dependent
 1.77 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.76 23-Nov-2010  hannken branches: 1.76.2; 1.76.4;
Remove unused count from pseudo-device md.
 1.75 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.74 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.73 24-Jan-2009  mrg branches: 1.73.4; 1.73.6;
add COMPAT_50 to all the configs with COMPAT_40.
 1.72 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.70 10-Aug-2008  tls branches: 1.70.2;
Add accept filters to GENERIC kernels where they exist.
 1.69 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.68 05-Apr-2008  tsutsui branches: 1.68.4; 1.68.6; 1.68.10;
Always specify COPTS="-Os" and disable several options and devices
to shrink kernels. Current sun68k bootloader can't load a kernel larger
than ~2MB, and our ever growing kernel have reached the limit.
 1.67 11-Jan-2008  tsutsui branches: 1.67.6;
- add options COMPAT_40
- adjust comments
 1.66 31-Dec-2007  ad Remove systrace. Ok core@.
 1.65 04-Nov-2007  xtraeme branches: 1.65.2; 1.65.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.64 29-Dec-2006  yamt branches: 1.64.6; 1.64.22; 1.64.24; 1.64.28;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.63 11-Nov-2006  jmmv Remove tmpfs's experimental status. OK'ed by core@.
 1.62 14-Oct-2006  tsutsui Add "options NFS_RSIZE=1024,NFS_WSIZE=1024" for poor ec(4) interfaces.
 1.61 14-Oct-2006  tsutsui Remove "rnd is EXPERIMENTAL" comments and enable pseudo-device rnd.
 1.60 14-Oct-2006  tsutsui Don't specify number of ptys unless it's smaller than default 16.
 1.59 26-Aug-2006  christos branches: 1.59.2; 1.59.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.58 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.57 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.56 28-Jun-2006  liamjfoy branches: 1.56.2;
Add CARP to GENERIC kernel configs. CARP is not enabled by default.

ok: christos
 1.55 05-Feb-2006  cube branches: 1.55.2; 1.55.10;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.54 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.53 02-Feb-2006  reinoud branches: 1.53.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.52 09-Dec-2005  elad branches: 1.52.2; 1.52.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.51 07-Dec-2005  tsutsui Remove obsolete options VNODE_OP_NOINLINE.
 1.50 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.49 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.48 04-Sep-2005  isaki typo in comment.
 1.47 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.46 19-Aug-2005  christos 64 bit inode changes.
 1.45 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.44 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.43 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.42 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.41 25-Jun-2005  rpaulo branches: 1.41.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.40 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.39 25-Feb-2005  simonb branches: 1.39.2;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.38 18-Feb-2005  dsl Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.37 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.36 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.35 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.34 17-Jan-2005  cube branches: 1.34.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.33 10-Nov-2004  christos branches: 1.33.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.32 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.31 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.30 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.29 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.28 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.27 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.26 30-Oct-2003  mycroft branches: 1.26.2;
Add COMPAT_16.
 1.25 26-Apr-2003  ragge branches: 1.25.2;
Add pseudo-device ksyms.
 1.24 10-Apr-2003  christos Bye Bye UCONSOLE
 1.23 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.22 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.21 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.20 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.19 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.18 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.17 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.16 25-Apr-2002  atatat branches: 1.16.2; 1.16.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.15 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.14 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.13 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.12 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.11 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.10 30-Nov-2001  fredette In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.9 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.8 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.7 01-Sep-2001  atatat branches: 1.7.6;
Add bridge pseudo devices to GENERIC configs
 1.6 08-Jul-2001  abs branches: 1.6.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.5 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.4 27-Jun-2001  fredette Updated with VME machine support, a.out compat,
some zs and console changes.
 1.3 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.2 18-Apr-2001  fredette branches: 1.2.2;
Trimmed off some options that are unnecessary for now,
and some that don't work. Added some more comments,
commented out some 2/50 device entries.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 18-Apr-2001  bouyer file GENERIC was added on branch thorpej_scsipi on 2001-04-21 17:54:46 +0000
 1.6.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.6.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.7.6.8 11-Dec-2002  thorpej Sync with HEAD.
 1.7.6.7 11-Nov-2002  nathanw Catch up to -current
 1.7.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.7.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.7.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.7.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.7.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.7.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:28:07 +0000
 1.16.4.1 01-Aug-2002  lukem Pull up revision 1.17 (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.16.2.1 15-Jul-2002  gehenna catch up with -current.
 1.25.2.10 11-Dec-2005  christos Sync with head.
 1.25.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.25.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.25.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.25.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.25.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.25.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.3 15-Jul-2004  he Pull up revision 1.32 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.26.2.2 02-Jul-2004  he Pull up revision 1.31 (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.26.2.1 30-Jun-2004  jdc Pull up revision 1.30 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.33.4.1 29-Apr-2005  kent sync with -current
 1.34.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.34.2.1 12-Feb-2005  yamt sync with head.
 1.39.2.2 14-Aug-2005  riz Pull up revision 1.43 (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.39.2.1 18-Jul-2005  riz Pull up revision 1.42 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.41.2.4 21-Jan-2008  yamt sync with head
 1.41.2.3 15-Nov-2007  yamt sync with head.
 1.41.2.2 30-Dec-2006  yamt sync with head.
 1.41.2.1 21-Jun-2006  yamt sync with head.
 1.52.4.1 09-Sep-2006  rpaulo sync with head
 1.52.2.1 18-Feb-2006  yamt sync with head.
 1.53.2.1 22-Apr-2006  simonb Sync with head.
 1.55.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.55.2.2 03-Sep-2006  yamt sync with head.
 1.55.2.1 11-Aug-2006  yamt sync with head
 1.56.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.56.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.59.4.2 10-Dec-2006  yamt sync with head.
 1.59.4.1 22-Oct-2006  yamt sync with head
 1.59.2.2 12-Jan-2007  ad Sync with head.
 1.59.2.1 18-Nov-2006  ad Sync with head.
 1.64.28.1 13-Nov-2007  bouyer Sync with HEAD
 1.64.24.3 23-Mar-2008  matt sync with HEAD
 1.64.24.2 09-Jan-2008  matt sync with HEAD
 1.64.24.1 06-Nov-2007  matt sync with HEAD
 1.64.22.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.64.6.1 03-Dec-2007  ad Sync with HEAD.
 1.65.8.2 11-Jan-2008  bouyer Sync with HEAD
 1.65.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.65.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.67.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.67.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.67.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.68.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.68.10.1 19-Oct-2008  haad Sync with HEAD.
 1.68.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.68.4.2 11-Aug-2010  yamt sync with head.
 1.68.4.1 04-May-2009  yamt sync with head.
 1.70.2.2 03-Mar-2009  skrll Sync with HEAD.
 1.70.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.73.6.3 21-Apr-2011  rmind sync with head
 1.73.6.2 05-Mar-2011  rmind sync with head
 1.73.6.1 30-May-2010  rmind sync with head
 1.73.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.73.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.76.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.76.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.80.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.80.2.2 30-Oct-2012  yamt sync with head
 1.80.2.1 17-Apr-2012  yamt sync with head
 1.81.2.2 11-Mar-2012  mrg sync to latest -current
 1.81.2.1 18-Feb-2012  mrg merge to -current.
 1.83.2.4 03-Dec-2017  jdolecek update from HEAD
 1.83.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.83.2.2 23-Jun-2013  tls resync from head
 1.83.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.88.2.1 28-Aug-2013  rmind sync with head
 1.89.4.1 10-Aug-2014  tls Rebase.
 1.90.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.90.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.94.2.2 28-Aug-2017  skrll Sync with HEAD
 1.94.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.95.10.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.100.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.100.4.1 10-Jun-2019  christos Sync with HEAD
 1.100.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.110.6.1 01-Jul-2024  perseant Sync with HEAD.
 1.54 30-Aug-2021  christos The INSTALL kernel needs to be small too
 1.53 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.52 14-Sep-2017  mrg branches: 1.52.2; 1.52.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.51 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.50 07-Aug-2015  maxv Remove KMEMSTATS.
 1.49 26-Jul-2014  tsutsui branches: 1.49.4;
Comment out options and devices to sync GENERIC rev 1.90.
 1.48 30-Jun-2013  rmind branches: 1.48.4;
G/C PFIL_HOOKS from the kernel configs.
 1.47 05-Jun-2013  christos branches: 1.47.2;
remove obsolete networking options
 1.46 27-Apr-2013  christos the bogus number police
 1.45 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.44 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.43 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.42 22-Nov-2011  tls branches: 1.42.8;

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 30-Jun-2011  wiz branches: 1.41.2;
dependant -> dependent
 1.40 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.39 23-Nov-2010  hannken branches: 1.39.2; 1.39.4;
Remove unused count from pseudo-device md.
 1.38 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.37 24-Nov-2008  ad branches: 1.37.6; 1.37.8;
Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.35 26-Apr-2008  tsutsui branches: 1.35.2; 1.35.8; 1.35.10;
Shrink install kernels a bit.
 1.34 26-Apr-2008  tsutsui Remove obsolete options SHMMAXPGS.
 1.33 05-Apr-2008  tsutsui branches: 1.33.2;
Always specify COPTS="-Os" and disable several options and devices
to shrink kernels. Current sun68k bootloader can't load a kernel larger
than ~2MB, and our ever growing kernel have reached the limit.
 1.32 29-Dec-2006  yamt branches: 1.32.44;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.31 14-Oct-2006  tsutsui Add "options NFS_RSIZE=1024,NFS_WSIZE=1024" for poor ec(4) interfaces.
 1.30 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.29 26-Aug-2006  christos branches: 1.29.2; 1.29.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.28 05-Feb-2006  cube branches: 1.28.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.27 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.26 07-Dec-2005  tsutsui branches: 1.26.2; 1.26.4; 1.26.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.25 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.24 04-Sep-2005  isaki typo in comment.
 1.23 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.22 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.21 18-Feb-2005  dsl branches: 1.21.4; 1.21.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.20 11-Feb-2005  dsl Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
 1.19 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.18 10-Nov-2004  christos branches: 1.18.4; 1.18.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.17 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.16 06-Sep-2003  itojun branches: 1.16.2;
add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more. see tech-security
 1.15 10-Apr-2003  christos branches: 1.15.2;
Bye Bye UCONSOLE
 1.14 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.13 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.12 25-Apr-2002  atatat branches: 1.12.2;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.11 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.10 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.9 15-Dec-2001  fredette Remove some devices that aren't needed in INSTALL or RAMDISK
kernels, reenable NFS v3, and enable kernfs in INSTALL.
 1.8 30-Nov-2001  fredette In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.7 26-Nov-2001  fredette Disabled some more things that lighter kernels don't need,
and picked up some formatting fixes from GENERIC.
 1.6 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.5 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.4 08-Jul-2001  abs branches: 1.4.2; 1.4.8;
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.3 27-Jun-2001  fredette Updated with VME machine support, a.out compat,
some zs and console changes.
 1.2 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.1 03-May-2001  fredette Added some kernel configurations.
 1.4.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.6 01-Aug-2002  nathanw Catch up to -current.
 1.4.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.4.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 08-Jul-2001  nathanw file INSTALL was added on branch nathanw_sa on 2002-01-08 00:28:07 +0000
 1.4.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.4.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.1 17-Jul-2002  gehenna catch up with -current.
 1.15.2.9 11-Dec-2005  christos Sync with head.
 1.15.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.15.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.15.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.2.1 15-Jul-2004  he Pull up revision 1.17 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.18.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.6.1 12-Feb-2005  yamt sync with head.
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.21.6.2 30-Dec-2006  yamt sync with head.
 1.21.6.1 21-Jun-2006  yamt sync with head.
 1.21.4.1 18-Jul-2005  riz Pull up revision 1.22 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.26.6.1 22-Apr-2006  simonb Sync with head.
 1.26.4.1 09-Sep-2006  rpaulo sync with head
 1.26.2.1 18-Feb-2006  yamt sync with head.
 1.28.2.1 03-Sep-2006  yamt sync with head.
 1.29.4.1 22-Oct-2006  yamt sync with head
 1.29.2.2 12-Jan-2007  ad Sync with head.
 1.29.2.1 18-Nov-2006  ad Sync with head.
 1.32.44.2 17-Jan-2009  mjf Sync with HEAD.
 1.32.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.33.2.1 18-May-2008  yamt sync with head.
 1.35.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.35.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.35.2.2 11-Aug-2010  yamt sync with head.
 1.35.2.1 04-May-2009  yamt sync with head.
 1.37.8.3 21-Apr-2011  rmind sync with head
 1.37.8.2 05-Mar-2011  rmind sync with head
 1.37.8.1 30-May-2010  rmind sync with head
 1.37.6.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.39.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.39.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.41.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.41.2.1 17-Apr-2012  yamt sync with head
 1.42.8.3 03-Dec-2017  jdolecek update from HEAD
 1.42.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.42.8.1 23-Jun-2013  tls resync from head
 1.47.2.1 28-Aug-2013  rmind sync with head
 1.48.4.1 10-Aug-2014  tls Rebase.
 1.49.4.2 28-Aug-2017  skrll Sync with HEAD
 1.49.4.1 22-Sep-2015  skrll Sync with HEAD
 1.52.4.1 10-Jun-2019  christos Sync with HEAD
 1.52.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.29 30-Aug-2021  christos Only use the ldscript for the RAMDISK kernel for now.
 1.28 30-Aug-2021  christos use -ffunction-sections -fdata-sections --gc-sections with an ldscript
that keeps _start. This deletes all unused code and shrinks the RAMDISK
kernel enough to be able to boot again:

-rwxr-xr-x 1 root src 2519436 Aug 30 06:38 RAMDISK.1/netbsd*
-rwxr-xr-x 1 root src 2104440 Aug 30 07:41 RAMDISK/netbsd*

text data bss dec hex filename
1525412 686252 63552 2275216 22b790 RAMDISK.1/netbsd
1098524 686400 67008 1851932 1c421c RAMDISK/netbsd
 1.27 05-Oct-2020  rin Kernel without -fno-omit-frame-pointer works fine now, both for GCC8 and 9.
Not sure which commit ``fixed'' the problem although...
 1.26 08-Sep-2020  mrg don't warn about array bounds for dodgy diagnostic code.
fixes gcc9 builds.
 1.25 10-Aug-2020  rin Compile sun2 kernel with -fno-omit-frame-pointer for GCC8 as a work
around for reproducible kernel freezes just after ``Starting postfix.'',
where I cannot even enter DDB nor obtain crash dump.

I still haven't figured out why. Possibly something wrong with -Os
optimization level for GCC/m68k, cf.,
http://mail-index.netbsd.org/port-sun3/2020/07/19/msg000166.html
 1.24 22-Sep-2018  rin - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
 1.23 22-Sep-2018  rin No need to specify COMPAT_AS anymore.
Now, it is automatically determined from OPT_MODULAR.
 1.22 07-Mar-2018  maya branches: 1.22.2;
Remove more unused functions with COMPAT_AS=library
 1.21 03-Mar-2018  mrg branches: 1.21.2;
sun2/sun3:
- build libkern as an archive for non modular builds. from maya@
sun3:
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
enough lost VA to actually run basic tests.
 1.20 21-Jan-2011  joerg branches: 1.20.48;
Switch remaining platforms to modern CPP for assembler.
 1.19 22-Jan-2008  joerg branches: 1.19.32; 1.19.38; 1.19.40;
Missing assym.h dependency.
 1.18 11-Dec-2005  christos branches: 1.18.50; 1.18.56; 1.18.64;
merge ktrace-lwp.
 1.17 31-May-2005  christos branches: 1.17.2;
s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
 1.16 04-Jun-2004  thorpej Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
 1.15 26-Nov-2002  thorpej branches: 1.15.6; 1.15.10;
The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
 1.14 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.13 04-Jun-2002  thorpej Don't use -traditional-cpp if HAVE_GCC3.
 1.12 28-Jan-2002  thorpej branches: 1.12.8;
Clean up CPP flags.
 1.11 01-Dec-2001  fredette Abstract out a large chunk of the kernel build machinery so that new
build features (such as ross's DEBUGLIST) can easily be applied to all
ports. This should reduce the complexity of each port's kernel
Makefile considerably.
 1.10 30-Nov-2001  fredette In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.9 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.8 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.7 26-Oct-2001  jmc branches: 1.7.2;
Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
 1.6 23-Oct-2001  thorpej branches: 1.6.2;
Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
 1.5 06-Sep-2001  fredette Added -D__SVR4_ABI__ to XDEFS. Without it, m68k libkern assembly
functions don't return pointer values in %a0.
 1.4 27-Jun-2001  fredette branches: 1.4.2;
Updated for ELF support.
 1.3 29-May-2001  mrg define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
 1.2 06-Apr-2001  fredette branches: 1.2.2;
A successful compile is near.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 06-Apr-2001  bouyer file Makefile.sun2 was added on branch thorpej_scsipi on 2001-04-21 17:54:46 +0000
 1.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.7.2.6 11-Dec-2002  thorpej Sync with HEAD.
 1.7.2.5 11-Nov-2002  nathanw Catch up to -current
 1.7.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.7.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.7.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.7.2.1 26-Oct-2001  nathanw file Makefile.sun2 was added on branch nathanw_sa on 2002-01-08 00:28:07 +0000
 1.12.8.1 15-Jul-2002  gehenna catch up with -current.
 1.15.10.1 06-Feb-2005  jmc Pull up patch (requested by martti in ticket #1086)
Move ipf to sys/dist/ipf and sync w. trunk
 1.15.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.6.1 03-Aug-2004  skrll Sync with HEAD
 1.17.2.1 04-Feb-2008  yamt sync with head.
 1.18.64.1 23-Jan-2008  bouyer Sync with HEAD.
 1.18.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.50.1 23-Mar-2008  matt sync with HEAD
 1.19.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.19.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.32.1 05-Mar-2011  rmind sync with head
 1.20.48.1 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #746):

sys/arch/sun2/conf/Makefile.sun2: revision 1.21-1.22

sun2/sun3:
- build libkern as an archive for non modular builds. from maya@
sun3:
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
enough lost VA to actually run basic tests.

Remove more unused functions with COMPAT_AS=library
 1.21.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.21.2.1 15-Mar-2018  pgoyette Synch with HEAD
 1.22.2.1 10-Jun-2019  christos Sync with HEAD
 1.2 08-Mar-2020  rin branches: 1.2.2;
Fix comments on root devices.
 1.1 08-Mar-2020  rin sun2 kernel is restricted to ~2MB due to bootloader.
It seems that working kernel should be more smaller.

Strip off most kernel options, and provide by kernel modules.
Also add GENERIC kernel for NFS root instead of FFS.
 1.2.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.2.1 08-Mar-2020  martin file NFS was added on branch phil-wifi on 2020-04-08 14:07:54 +0000
 1.61 30-Aug-2021  christos use -ffunction-sections -fdata-sections --gc-sections with an ldscript
that keeps _start. This deletes all unused code and shrinks the RAMDISK
kernel enough to be able to boot again:

-rwxr-xr-x 1 root src 2519436 Aug 30 06:38 RAMDISK.1/netbsd*
-rwxr-xr-x 1 root src 2104440 Aug 30 07:41 RAMDISK/netbsd*

text data bss dec hex filename
1525412 686252 63552 2275216 22b790 RAMDISK.1/netbsd
1098524 686400 67008 1851932 1c421c RAMDISK/netbsd
 1.60 03-Apr-2019  christos Gut more stuff so we fit. Last working RAMDISK kernel was 6.1.5.
Nobody runs this stuff anymore, so consider that netbsd 9 might be
the last sun2 release.
 1.59 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.58 14-Sep-2017  mrg branches: 1.58.2; 1.58.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.57 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.56 07-Aug-2015  maxv Remove KMEMSTATS.
 1.55 30-Jun-2013  rmind branches: 1.55.8;
G/C PFIL_HOOKS from the kernel configs.
 1.54 05-Jun-2013  christos branches: 1.54.2;
remove obsolete networking options
 1.53 27-Apr-2013  christos the bogus number police
 1.52 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.51 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.50 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.49 22-Nov-2011  tls branches: 1.49.8;

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.48 30-Jun-2011  wiz branches: 1.48.2;
dependant -> dependent
 1.47 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.46 23-Nov-2010  hannken branches: 1.46.2; 1.46.4;
Remove unused count from pseudo-device md.
 1.45 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.44 06-Feb-2009  jym branches: 1.44.4; 1.44.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.43 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.41 02-Jun-2008  he branches: 1.41.4; 1.41.6;
Bump miniroot size from 500k to 600k to compensate for recent bloat.
 1.40 27-Apr-2008  tsutsui branches: 1.40.2; 1.40.4;
Shrink ramdisk to 500k again.
The crunched binary with optimized libraries fits it.
 1.39 26-Apr-2008  tsutsui Shrink install kernels a bit.
 1.38 26-Apr-2008  tsutsui Remove obsolete options SHMMAXPGS.
 1.37 25-Apr-2008  he Bump the ramdisk from 500k to 700k to compensate for bloat which
happened while the sun2 kernels were unbuildable.
 1.36 05-Apr-2008  tsutsui branches: 1.36.2;
Always specify COPTS="-Os" and disable several options and devices
to shrink kernels. Current sun68k bootloader can't load a kernel larger
than ~2MB, and our ever growing kernel have reached the limit.
 1.35 29-Dec-2006  yamt branches: 1.35.44;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.34 14-Oct-2006  tsutsui Add "options NFS_RSIZE=1024,NFS_WSIZE=1024" for poor ec(4) interfaces.
 1.33 14-Oct-2006  tsutsui Remove "rnd is EXPERIMENTAL" comments and enable pseudo-device rnd.
 1.32 26-Aug-2006  christos branches: 1.32.2; 1.32.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.31 05-Feb-2006  cube branches: 1.31.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.30 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.29 07-Dec-2005  tsutsui branches: 1.29.2; 1.29.4; 1.29.6;
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 04-Sep-2005  isaki typo in comment.
 1.26 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.25 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.24 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.23 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.22 18-Feb-2005  dsl branches: 1.22.4; 1.22.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.21 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.20 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.19 10-Nov-2004  christos branches: 1.19.4; 1.19.6;
Add COMPAT_BSDPTY to the rest of the config files.
 1.18 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.17 13-Dec-2003  chs branches: 1.17.2;
ramdisk doesn't fit in 400k anymore, make it 500k.
 1.16 10-Apr-2003  christos branches: 1.16.2;
Bye Bye UCONSOLE
 1.15 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.14 25-Apr-2002  atatat 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 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.12 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.11 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.10 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.9 15-Dec-2001  fredette Remove some devices that aren't needed in INSTALL or RAMDISK
kernels, reenable NFS v3, and enable kernfs in INSTALL.
 1.8 30-Nov-2001  fredette In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.7 26-Nov-2001  fredette Disabled some more things that lighter kernels don't need,
and picked up some formatting fixes from GENERIC.
 1.6 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.5 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.4 08-Jul-2001  abs branches: 1.4.2; 1.4.8;
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.3 27-Jun-2001  fredette Updated with VME machine support, a.out compat,
some zs and console changes.
 1.2 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.1 03-May-2001  fredette Added some kernel configurations.
 1.4.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.6 20-Jun-2002  nathanw Catch up to -current.
 1.4.8.5 17-Apr-2002  nathanw Catch up to -current.
 1.4.8.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 08-Jul-2001  nathanw file RAMDISK was added on branch nathanw_sa on 2002-01-08 00:28:07 +0000
 1.4.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.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.9 11-Dec-2005  christos Sync with head.
 1.16.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.16.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.16.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.16.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.2.1 15-Jul-2004  he Pull up revision 1.18 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.19.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.6.1 12-Feb-2005  yamt sync with head.
 1.19.4.1 29-Apr-2005  kent sync with -current
 1.22.6.2 30-Dec-2006  yamt sync with head.
 1.22.6.1 21-Jun-2006  yamt sync with head.
 1.22.4.1 18-Jul-2005  riz Pull up revision 1.23 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.29.6.1 22-Apr-2006  simonb Sync with head.
 1.29.4.1 09-Sep-2006  rpaulo sync with head
 1.29.2.1 18-Feb-2006  yamt sync with head.
 1.31.2.1 03-Sep-2006  yamt sync with head.
 1.32.4.1 22-Oct-2006  yamt sync with head
 1.32.2.2 12-Jan-2007  ad Sync with head.
 1.32.2.1 18-Nov-2006  ad Sync with head.
 1.35.44.2 17-Jan-2009  mjf Sync with HEAD.
 1.35.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.2.2 04-Jun-2008  yamt sync with head
 1.36.2.1 18-May-2008  yamt sync with head.
 1.40.4.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.40.2.2 11-Aug-2010  yamt sync with head.
 1.40.2.1 04-May-2009  yamt sync with head.
 1.41.6.2 03-Mar-2009  skrll Sync with HEAD.
 1.41.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.41.4.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.44.6.3 21-Apr-2011  rmind sync with head
 1.44.6.2 05-Mar-2011  rmind sync with head
 1.44.6.1 30-May-2010  rmind sync with head
 1.44.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.46.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.46.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.48.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.48.2.1 17-Apr-2012  yamt sync with head
 1.49.8.3 03-Dec-2017  jdolecek update from HEAD
 1.49.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.49.8.1 23-Jun-2013  tls resync from head
 1.54.2.1 28-Aug-2013  rmind sync with head
 1.55.8.2 28-Aug-2017  skrll Sync with HEAD
 1.55.8.1 22-Sep-2015  skrll Sync with HEAD
 1.58.4.1 10-Jun-2019  christos Sync with HEAD
 1.58.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.53 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.52 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.51 14-Sep-2017  mrg branches: 1.51.2; 1.51.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.50 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.49 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.48 12-Aug-2015  maxv Remove KMEMSTATS.
 1.47 23-Aug-2014  dholland branches: 1.47.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.46 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.45 05-Jun-2013  christos branches: 1.45.2;
remove obsolete networking options
 1.44 27-Apr-2013  christos the bogus number police
 1.43 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.42 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.41 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.40 22-Nov-2011  tls branches: 1.40.8;

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.39 30-Jun-2011  wiz branches: 1.39.2;
dependant -> dependent
 1.38 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.37 23-Nov-2010  hannken branches: 1.37.2; 1.37.4;
Remove unused count from pseudo-device md.
 1.36 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.35 06-Mar-2009  joerg branches: 1.35.2; 1.35.4;
Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.34 24-Nov-2008  ad branches: 1.34.4;
Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.32 11-Jan-2008  tsutsui branches: 1.32.6; 1.32.10; 1.32.16; 1.32.18;
- add options COMPAT_40
- adjust comments
 1.31 29-Dec-2006  yamt branches: 1.31.24; 1.31.30; 1.31.36;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.30 14-Oct-2006  tsutsui Sort options.
 1.29 14-Oct-2006  tsutsui Add "options NFS_RSIZE=1024,NFS_WSIZE=1024" for poor ec(4) interfaces.
 1.28 14-Oct-2006  tsutsui Remove "rnd is EXPERIMENTAL" comments and enable pseudo-device rnd.
 1.27 14-Oct-2006  tsutsui Don't specify number of ptys unless it's smaller than default 16.
 1.26 26-Aug-2006  christos branches: 1.26.2; 1.26.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.25 05-Feb-2006  cube branches: 1.25.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.24 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.23 07-Dec-2005  tsutsui branches: 1.23.2; 1.23.4; 1.23.6;
Remove obsolete options VNODE_OP_NOINLINE.
 1.22 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.21 04-Sep-2005  isaki typo in comment.
 1.20 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.19 19-Aug-2005  christos 64 bit inode changes.
 1.18 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.17 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.16 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.15 25-Feb-2005  simonb branches: 1.15.2; 1.15.4;
Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
 1.14 18-Feb-2005  dsl Add FFS_NO_SNAPSHOT - commented out in XEN
 1.13 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.12 17-Jan-2005  cube branches: 1.12.2;
Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.11 10-Nov-2004  christos branches: 1.11.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.10 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.9 30-Oct-2003  mycroft branches: 1.9.2;
Add COMPAT_16.
 1.8 10-Apr-2003  christos branches: 1.8.2;
Bye Bye UCONSOLE
 1.7 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.6 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.5 25-Apr-2002  atatat branches: 1.5.2; 1.5.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.4 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.3 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.2 30-Nov-2001  fredette branches: 1.2.2; 1.2.4;
In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.1 26-Nov-2001  fredette A new config file for VME-only machines
 1.2.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.2.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 30-Nov-2001  thorpej file VME was added on branch kqueue on 2002-01-10 19:49:35 +0000
 1.2.2.6 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.5 20-Jun-2002  nathanw Catch up to -current.
 1.2.2.4 17-Apr-2002  nathanw Catch up to -current.
 1.2.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 30-Nov-2001  nathanw file VME was added on branch nathanw_sa on 2002-01-08 00:28:08 +0000
 1.5.4.1 01-Aug-2002  lukem Pull up revision 1.6 (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.5.2.1 15-Jul-2002  gehenna catch up with -current.
 1.8.2.9 11-Dec-2005  christos Sync with head.
 1.8.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.8.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.8.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.8.2.4 14-Nov-2004  skrll Sync with HEAD.
 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.2.1 15-Jul-2004  he Pull up revision 1.10 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.11.4.1 29-Apr-2005  kent sync with -current
 1.12.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.2.1 12-Feb-2005  yamt sync with head.
 1.15.4.3 21-Jan-2008  yamt sync with head
 1.15.4.2 30-Dec-2006  yamt sync with head.
 1.15.4.1 21-Jun-2006  yamt sync with head.
 1.15.2.1 18-Jul-2005  riz Pull up revision 1.16 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.23.6.1 22-Apr-2006  simonb Sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.23.2.1 18-Feb-2006  yamt sync with head.
 1.25.2.1 03-Sep-2006  yamt sync with head.
 1.26.4.1 22-Oct-2006  yamt sync with head
 1.26.2.2 12-Jan-2007  ad Sync with head.
 1.26.2.1 18-Nov-2006  ad Sync with head.
 1.31.36.1 11-Jan-2008  bouyer Sync with HEAD
 1.31.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.31.24.1 23-Mar-2008  matt sync with HEAD
 1.32.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.32.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.32.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.32.10.2 11-Aug-2010  yamt sync with head.
 1.32.10.1 04-May-2009  yamt sync with head.
 1.32.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.34.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.35.4.3 21-Apr-2011  rmind sync with head
 1.35.4.2 05-Mar-2011  rmind sync with head
 1.35.4.1 30-May-2010  rmind sync with head
 1.35.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.37.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.37.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.39.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.39.2.1 17-Apr-2012  yamt sync with head
 1.40.8.3 03-Dec-2017  jdolecek update from HEAD
 1.40.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.8.1 23-Jun-2013  tls resync from head
 1.45.2.1 28-Aug-2013  rmind sync with head
 1.47.2.2 28-Aug-2017  skrll Sync with HEAD
 1.47.2.1 22-Sep-2015  skrll Sync with HEAD
 1.51.4.1 10-Jun-2019  christos Sync with HEAD
 1.51.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.21 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.20 12-Jun-2011  rmind branches: 1.20.52; 1.20.54;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.19 20-Feb-2008  drochner branches: 1.19.32; 1.19.42;
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.18 01-Oct-2006  tsutsui branches: 1.18.28;
First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.17 30-Sep-2006  tsutsui - move m68k common stuff from files.sun2 to files.sun68k
- use common dev/sun/disksubr.c
 1.16 11-Dec-2005  christos branches: 1.16.20; 1.16.22;
merge ktrace-lwp.
 1.15 30-May-2005  tsutsui branches: 1.15.2;
Don't define zstty as an attribute so that children of zstty (kbd and ms)
are attached properly. Tested on tme.
 1.14 07-Dec-2004  chs branches: 1.14.10;
use the m68k-common procfs_machdep.c on all m68k platforms.
 1.13 27-Jul-2003  thorpej branches: 1.13.4;
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.12 27-Oct-2002  chs branches: 1.12.6;
include wscons definitions, dev/sun/kbdvar.h needs it now.
 1.11 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.10 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.9 03-Oct-2002  uwe Refactor kbd and mouse drivers so that they can use different middle
layers. Common middle layer shared by kbd_zs and sunkbd is moved into
the new file. Move shared config directives to files.sun and adjust
ports' files.* accordingly.

Need this to support console/Xsun on Mr.Coffee JavaStation.

Tested on sparc, sparc64 (by martin) and sun3 (by jdc).
 1.8 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.7 22-Mar-2002  fredette branches: 1.7.4;
Added the console and zs code now found under sys/arch/sun2.
 1.6 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.5 27-Jun-2001  fredette branches: 1.5.2; 1.5.8;
Now uses the sun68k common code. Changed how the keyboard
and mouse attach. Added support for ie at obio, the ec adapter.
 1.4 18-Jun-2001  christos Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.3 18-Apr-2001  fredette branches: 1.3.2;
Added support for the sc SCSI controller on mbmem.
 1.2 06-Apr-2001  fredette A successful compile is near.
 1.1 29-Mar-2001  fredette Added.
 1.3.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.3.2.1 18-Apr-2001  bouyer file files.sun2 was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.5.8.6 11-Nov-2002  nathanw Catch up to -current
 1.5.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.5.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.5.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.8.1 27-Jun-2001  nathanw file files.sun2 was added on branch nathanw_sa on 2002-01-08 00:28:08 +0000
 1.5.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.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.4.2 17-May-2002  gehenna Remove old block majors list.
 1.7.4.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.12.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.6.4 18-Dec-2004  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.4.1 31-May-2005  riz Pull up revision 1.15 (requested by tsutsui in ticket #1875):
Don't define zstty as an attribute so that children of zstty (kbd and ms)
are attached properly. Tested on tme.
 1.14.10.1 31-May-2005  snj Pull up revision 1.15 (requested by tsutsui in ticket #360):
Don't define zstty as an attribute so that children of zstty (kbd and ms)
are attached properly. Tested on tme.
 1.15.2.2 27-Feb-2008  yamt sync with head.
 1.15.2.1 30-Dec-2006  yamt sync with head.
 1.16.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.16.20.1 18-Nov-2006  ad Sync with head.
 1.18.28.1 23-Mar-2008  matt sync with HEAD
 1.19.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.19.32.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.20.54.1 10-Jun-2019  christos Sync with HEAD
 1.20.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1 30-Aug-2021  christos use -ffunction-sections -fdata-sections --gc-sections with an ldscript
that keeps _start. This deletes all unused code and shrinks the RAMDISK
kernel enough to be able to boot again:

-rwxr-xr-x 1 root src 2519436 Aug 30 06:38 RAMDISK.1/netbsd*
-rwxr-xr-x 1 root src 2104440 Aug 30 07:41 RAMDISK/netbsd*

text data bss dec hex filename
1525412 686252 63552 2275216 22b790 RAMDISK.1/netbsd
1098524 686400 67008 1851932 1c421c RAMDISK/netbsd
 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 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.20 30-Jun-2011  wiz branches: 1.20.52; 1.20.54;
dependant -> dependent
 1.19 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.18 31-Dec-2007  ad branches: 1.18.6; 1.18.10; 1.18.16; 1.18.18;
Remove systrace. Ok core@.
 1.17 24-Nov-2006  wiz branches: 1.17.28; 1.17.34; 1.17.42;
s/independant/independent/, from Zafer.
 1.16 11-Dec-2005  christos branches: 1.16.20; 1.16.22;
merge ktrace-lwp.
 1.15 17-Sep-2005  yamt make VMSWAP optional again.
 1.14 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.13 30-Jul-2005  yamt defflag VMSWAP.
 1.12 10-May-2005  jdolecek branches: 1.12.2;
assign major for nsmb(4)
 1.11 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.10 15-Oct-2003  jdolecek add majors for ipfilter, lkm, vnd, tun, raid, cgd, ccd, and md
where missing
 1.9 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.8 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.7 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.6 22-Aug-2003  itojun create /dev/crypto
 1.5 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.4 25-Apr-2003  ragge branches: 1.4.2;
Add ksyms device major.
 1.3 04-Oct-2002  elric branches: 1.3.2;
assign majors for raw and cooked cgd's.
 1.2 06-Sep-2002  gehenna branches: 1.2.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.sun2 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.2.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.1 06-Sep-2002  nathanw file majors.sun2 was added on branch nathanw_sa on 2002-09-17 21:18:07 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 04-Oct-2002  jdolecek file majors.sun2 was added on branch kqueue on 2002-10-10 18:36:51 +0000
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.12.2.3 21-Jan-2008  yamt sync with head
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.16.22.1 10-Dec-2006  yamt sync with head.
 1.16.20.1 12-Jan-2007  ad Sync with head.
 1.17.42.1 02-Jan-2008  bouyer Sync with HEAD
 1.17.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.28.1 09-Jan-2008  matt sync with HEAD
 1.18.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.18.10.1 04-May-2009  yamt sync with head.
 1.18.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.20.54.1 10-Jun-2019  christos Sync with HEAD
 1.20.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.9 18-Jan-2024  thorpej Make the M68K_MMU_* defines real kernel options, available in opt_m68k_arch.h.
For 68030, 68040, and 68060, infer M68K_MMU_MOTOROLA. For 68010 and 68020, it
must be an explicit option (set in std.${MACHINE} or, in the case of hp300,
inferred from the specific model option).
 1.8 18-Jan-2024  thorpej Add "options M68010" for completeness.
 1.7 19-Sep-2010  tsutsui - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
from MD std.${MACHINE}
 1.6 01-Oct-2006  tsutsui branches: 1.6.56; 1.6.76; 1.6.78;
First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 17-Sep-2005  yamt include "conf/std".
 1.3 27-Jun-2001  fredette branches: 1.3.8; 1.3.24; 1.3.40;
A sun2 is also a sun68k kind of a machine, and it also uses ELF.
 1.2 06-Apr-2001  fredette branches: 1.2.2;
A successful compile is near.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 06-Apr-2001  bouyer file std.sun2 was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.3.40.2 30-Dec-2006  yamt sync with head.
 1.3.40.1 21-Jun-2006  yamt sync with head.
 1.3.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.8.2 27-Jun-2001  fredette A sun2 is also a sun68k kind of a machine, and it also uses ELF.
 1.3.8.1 27-Jun-2001  fredette file std.sun2 was added on branch nathanw_sa on 2001-06-27 16:59:58 +0000
 1.5.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.5.20.1 18-Nov-2006  ad Sync with head.
 1.6.78.1 05-Mar-2011  rmind sync with head
 1.6.76.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.6.56.1 09-Oct-2010  yamt sync with head
 1.18 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.17 19-Sep-2009  tsutsui Split device_t/softc.
Tested on TME emulating SS2.

XXX: bwtwo at obmem on TME emulating sun2 didn't match and cannot test
 1.16 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.15 29-Mar-2006  thorpej branches: 1.15.62; 1.15.64; 1.15.66;
Use device_cfdata().
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
merge ktrace-lwp.
 1.13 03-Jun-2005  tsutsui branches: 1.13.2;
Add const.
 1.12 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 04-Dec-2003  keihan branches: 1.11.8;
NetBSD.ORG -> NetBSD.org

Now all "NetBSD.ORG" are gone from src/sys.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 02-Oct-2002  thorpej branches: 1.8.6;
Add trailing ; to CFATTACH_DECL.
 1.7 01-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 22-Mar-2002  fredette branches: 1.4.4;
sc_btype has been removed from struct bwtwo_softc.
 1.3 27-Jun-2001  fredette branches: 1.3.2; 1.3.8;
Converted to use the new bus-specific attach args,
and the bus_space_peek_N functions.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
Use fb_setsize_eeprom to do some intialization of the
fb structure.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file bwtwo_any.c was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.3.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.3.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.8.1 27-Jun-2001  nathanw file bwtwo_any.c was added on branch nathanw_sa on 2002-04-01 07:43:16 +0000
 1.3.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.1 19-May-2002  gehenna Remove unnecessary #include
 1.8.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.6.4 24-Jan-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.11.8.1 29-Apr-2005  kent sync with -current
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.14.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.14.8.1 01-Apr-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.66.2 11-Mar-2010  yamt sync with head
 1.15.66.1 16-May-2008  yamt sync with head.
 1.15.64.1 18-May-2008  yamt sync with head.
 1.15.62.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.128; 1.1.130; 1.1.132;
Added.
 1.1.132.1 16-May-2008  yamt sync with head.
 1.1.130.1 18-May-2008  yamt sync with head.
 1.1.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file bwtworeg.h was added on branch nathanw_sa on 2001-04-06 15:14:40 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file bwtworeg.h was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.4 13-Oct-2012  tsutsui Remove unused struct device menber from softc. from chs@
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122;
merge ktrace-lwp.
 1.2 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.1 22-Mar-2002  fredette branches: 1.1.4; 1.1.10; 1.1.16; 1.1.24;
Added bits to complete the sun2 console code. These are
virtually identical copies of files under sys/arch/sparc/dev,
and one day they will be merged under sys/dev/sun.
 1.1.24.1 29-Apr-2005  kent sync with -current
 1.1.16.1 24-Jan-2005  skrll Sync with HEAD.
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file cons.h was added on branch kqueue on 2002-06-23 17:42:29 +0000
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file cons.h was added on branch nathanw_sa on 2002-04-01 07:43:17 +0000
 1.3.122.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.112.1 30-Oct-2012  yamt sync with head
 1.9 10-Aug-2012  tsutsui branches: 1.9.20; 1.9.30;
Move cn_tab initialization from late cpu_startup(9) to
early _bootstrap() in locore2.c.
Tested on TME emulating 2/120.
 1.8 30-Jul-2012  christos move console initialization to cpu_startup() so that we avoid multiple common.
 1.7 27-Dec-2009  tsutsui branches: 1.7.12;
Fix missing parenthesis in #ifdef notyet block. PR port-sun2/42524
 1.6 11-Dec-2005  christos branches: 1.6.78;
merge ktrace-lwp.
 1.5 03-Jun-2005  tsutsui Add const.
 1.4 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 15-Jul-2003  lukem branches: 1.3.8;
__KERNEL_RCSID()
 1.2 06-Sep-2002  gehenna branches: 1.2.6;
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 22-Mar-2002  fredette branches: 1.1.4; 1.1.6; 1.1.10;
Added bits to complete the sun2 console code. These are
virtually identical copies of files under sys/arch/sparc/dev,
and one day they will be merged under sys/dev/sun.
 1.1.10.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.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file consinit.c was added on branch kqueue on 2002-06-23 17:42:29 +0000
 1.1.6.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file consinit.c was added on branch nathanw_sa on 2002-04-01 07:43:17 +0000
 1.2.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.2.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.6.1 03-Aug-2004  skrll Sync with HEAD
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.6.78.1 11-Mar-2010  yamt sync with head
 1.7.12.1 30-Oct-2012  yamt sync with head
 1.9.30.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.9.20.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.37 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.36 19-Mar-2020  thorpej branches: 1.36.28;
Replace manipulating IFF_OACTIVE with an internal "txbusy" field.
 1.35 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.34 29-May-2019  msaitoh branches: 1.34.4;
Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
- Add ec_ifmedia into struct ethercom.
- ec_mii in struct ethercom is kept and used as it is. It might be used in
future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
ec_mii for keeping the if_media. Those should be changed in future.
 1.33 29-May-2019  msaitoh KNF. No functional change.
 1.32 29-May-2019  msaitoh Whitespace fix. No functional change.
 1.31 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.30 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.29 26-Jun-2018  msaitoh branches: 1.29.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.28 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.27 15-Dec-2016  ozaki-r branches: 1.27.8; 1.27.14;
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.26 08-Dec-2016  ozaki-r Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
 1.25 10-Jun-2016  ozaki-r branches: 1.25.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.24 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.23 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.22 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.21 10-Aug-2014  tls branches: 1.21.4;
Merge tls-earlyentropy branch into HEAD.
 1.20 02-Feb-2012  tls branches: 1.20.6; 1.20.20;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.19 19-Nov-2011  tls branches: 1.19.2;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.18 05-Apr-2010  joerg branches: 1.18.8;
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.17 19-Jan-2010  pooka branches: 1.17.2; 1.17.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.16 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.15 06-Jul-2008  tsutsui branches: 1.15.2; 1.15.4;
Split device_t/softc with misc cosmetic changes.
 1.14 28-Apr-2008  martin branches: 1.14.2; 1.14.4;
Remove clause 3 and 4 from TNF licenses
 1.13 02-Jan-2008  dogcow branches: 1.13.6; 1.13.8; 1.13.10;
const char casting, to make gcc happy. (not that sun2 compiles these days
without other patches.)
 1.12 04-Mar-2007  christos branches: 1.12.20; 1.12.26; 1.12.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 11-Dec-2005  christos branches: 1.11.26;
merge ktrace-lwp.
 1.10 22-Jan-2005  chs branches: 1.10.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.9 30-Oct-2003  mycroft branches: 1.9.8;
This driver was broken by bouyer on 2003/01/20.
I've made it at least config up/down again -- haven't tried actually passing
traffic.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 20-Jan-2003  bouyer branches: 1.7.2;
bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 17-Dec-2001  fredette branches: 1.3.10;
Added ifmedia(4) support.
 1.2 17-Aug-2001  fredette branches: 1.2.6;
Sometimes the ec board reports a packet length that's too large.
Try to deal with this by clipping the packet length, and, under
DEBUG, printf when we do. Also zero out the packet status in
the buffer before we give it back to the board.
 1.1 27-Jun-2001  fredette branches: 1.1.2;
Added an attachment for Intel ethernet (ie) at obio.
Added support for the 3Com Ethernet (ec) at mbmem.
 1.1.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.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.2.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 17-Aug-2001  nathanw file if_ec.c was added on branch nathanw_sa on 2002-01-08 00:28:08 +0000
 1.3.10.2 26-Oct-2005  riz Pull up following revision(s) (requested by tsutsui in ticket #5785):
sys/arch/sun2/dev/if_ec.c: revision 1.9
This driver was broken by bouyer on 2003/01/20.
I've made it at least config up/down again -- haven't tried actually passing
traffic.
 1.3.10.1 28-Jan-2003  jmc Pullup revisions 1.6-1.7 (requested by bouyer in ticket #1122)
bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.7.2.4 24-Jan-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.8.1 29-Apr-2005  kent sync with -current
 1.10.8.2 21-Jan-2008  yamt sync with head
 1.10.8.1 03-Sep-2007  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.32.1 02-Jan-2008  bouyer Sync with HEAD
 1.12.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.20.1 09-Jan-2008  matt sync with HEAD
 1.13.10.4 11-Aug-2010  yamt sync with head.
 1.13.10.3 11-Mar-2010  yamt sync with head
 1.13.10.2 04-May-2009  yamt sync with head.
 1.13.10.1 16-May-2008  yamt sync with head.
 1.13.8.1 18-May-2008  yamt sync with head.
 1.13.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.13.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.13.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.4.1 18-Jul-2008  simonb Sync with head.
 1.14.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.15.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.15.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.17.4.1 30-May-2010  rmind sync with head
 1.17.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.18.8.1 17-Apr-2012  yamt sync with head
 1.19.2.1 18-Feb-2012  mrg merge to -current.
 1.20.20.1 07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.20.6.2 03-Dec-2017  jdolecek update from HEAD
 1.20.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.4.4 05-Feb-2017  skrll Sync with HEAD
 1.21.4.3 09-Jul-2016  skrll Sync with HEAD
 1.21.4.2 19-Mar-2016  skrll Sync with HEAD
 1.21.4.1 06-Jun-2015  skrll Sync with HEAD
 1.25.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.27.14.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.27.14.2 28-Jul-2018  pgoyette Sync with HEAD
 1.27.14.1 25-Jun-2018  pgoyette Sync with HEAD
 1.27.8.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.29.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.29.2.1 10-Jun-2019  christos Sync with HEAD
 1.34.4.1 29-Feb-2020  ad Sync with head.
 1.36.28.1 02-Aug-2025  perseant Sync with HEAD
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.74; 1.5.76; 1.5.78;
merge ktrace-lwp.
 1.4 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 17-Aug-2001  fredette branches: 1.3.6; 1.3.22; 1.3.30;
Sometimes the ec board reports a packet length that's too large.
Try to deal with this by clipping the packet length, and, under
DEBUG, printf when we do. Also zero out the packet status in
the buffer before we give it back to the board.
 1.2 14-Aug-2001  fredette Fixed a bug where we were using ETHERMIN and ETHERMTU
where we really wanted ETHER_MIN_LEN and ETHER_MAX_LEN.
 1.1 27-Jun-2001  fredette branches: 1.1.2;
Added an attachment for Intel ethernet (ie) at obio.
Added support for the 3Com Ethernet (ec) at mbmem.
 1.1.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.3.30.1 29-Apr-2005  kent sync with -current
 1.3.22.1 24-Jan-2005  skrll Sync with HEAD.
 1.3.6.2 17-Aug-2001  fredette Sometimes the ec board reports a packet length that's too large.
Try to deal with this by clipping the packet length, and, under
DEBUG, printf when we do. Also zero out the packet status in
the buffer before we give it back to the board.
 1.3.6.1 17-Aug-2001  fredette file if_ecreg.h was added on branch nathanw_sa on 2001-08-17 20:27:13 +0000
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.13 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.12 25-Apr-2019  msaitoh No functional change:
- Use __arraycount().
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.11 03-Jun-2011  tsutsui branches: 1.11.54;
Split device_t/softc of i82586. No crash on TME emulating sun2.
 1.10 01-Feb-2011  chuck branches: 1.10.2;
udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.9 11-Dec-2005  christos branches: 1.9.100; 1.9.106; 1.9.108;
merge ktrace-lwp.
 1.8 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.7 15-Jul-2003  lukem branches: 1.7.8;
__KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.6;
Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Jun-2001  fredette branches: 1.3.2; 1.3.8;
Converted to use the new bus-specific attach args,
and the bus_space_peek_N functions. Also uses the
sun68k-specific bus_space_copy{in,out} functions.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
Fixed a bug where we were trying to map the board RAM
using the physical address of the board registers.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file if_ie_mbmem.c was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.3.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.1 27-Jun-2001  nathanw file if_ie_mbmem.c was added on branch nathanw_sa on 2002-10-18 02:40:13 +0000
 1.3.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.6.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.9.108.1 08-Feb-2011  bouyer Sync with HEAD
 1.9.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.9.100.2 12-Jun-2011  rmind sync with head
 1.9.100.1 05-Mar-2011  rmind sync with head
 1.10.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.11.54.1 10-Jun-2019  christos Sync with HEAD
 1.19 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.18 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.17 25-Apr-2019  msaitoh No functional change:
- Use __arraycount().
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.16 24-Mar-2014  christos branches: 1.16.30;
- remove unused
- use cpu_{g,s}etmodel
 1.15 03-Jun-2011  tsutsui branches: 1.15.2; 1.15.12; 1.15.16;
Split device_t/softc of i82586. No crash on TME emulating sun2.
 1.14 01-Feb-2011  chuck branches: 1.14.2;
udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.
based on diff that rmind@ sent me.

no functional change with this commit.
 1.13 28-Apr-2008  martin branches: 1.13.22; 1.13.28; 1.13.30;
Remove clause 3 and 4 from TNF licenses
 1.12 04-Mar-2007  christos branches: 1.12.40; 1.12.42; 1.12.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.10 11-Dec-2005  christos branches: 1.10.26;
merge ktrace-lwp.
 1.9 03-Jun-2005  tsutsui branches: 1.9.2;
Fix shadowing variable warning.
 1.8 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.7 15-Jul-2003  lukem branches: 1.7.8;
__KERNEL_RCSID()
 1.6 01-Apr-2003  thorpej branches: 1.6.2;
Use PAGE_SIZE rather than NBPG.
 1.5 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 01-Oct-2001  fredette branches: 1.2.4;
Changed an obio to read Multibus.
 1.1 27-Jun-2001  fredette branches: 1.1.2; 1.1.4;
Added an attachment for Intel ethernet (ie) at obio.
Added support for the 3Com Ethernet (ec) at mbmem.
 1.1.4.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.1.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.1.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.1 01-Oct-2001  nathanw file if_ie_obio.c was added on branch nathanw_sa on 2002-10-18 02:40:14 +0000
 1.6.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.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 26-Feb-2007  yamt sync with head.
 1.10.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.10.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.12.44.1 16-May-2008  yamt sync with head.
 1.12.42.1 18-May-2008  yamt sync with head.
 1.12.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.30.1 08-Feb-2011  bouyer Sync with HEAD
 1.13.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.22.2 12-Jun-2011  rmind sync with head
 1.13.22.1 05-Mar-2011  rmind sync with head
 1.14.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.15.16.1 18-May-2014  rmind sync with head
 1.15.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.30.1 10-Jun-2019  christos Sync with HEAD
 1.25 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.24 16-Mar-2014  dholland branches: 1.24.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.23 27-Oct-2012  chs branches: 1.23.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.22 24-Apr-2011  rmind branches: 1.22.4; 1.22.14;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.21 28-Apr-2008  martin branches: 1.21.22; 1.21.28;
Remove clause 3 and 4 from TNF licenses
 1.20 29-Mar-2008  tsutsui branches: 1.20.2; 1.20.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.19 19-Nov-2007  ad branches: 1.19.14;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.18 21-Oct-2007  he branches: 1.18.2;
Move declaration of kd_later() up before the first use.
 1.17 18-Oct-2007  joerg Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
 1.16 04-Mar-2007  christos branches: 1.16.2; 1.16.18; 1.16.20; 1.16.24;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15 16-Feb-2007  ad branches: 1.15.2;
More spllowersoftclock() fallout.
 1.14 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.13 23-Jul-2006  ad branches: 1.13.4; 1.13.6;
Use the LWP cached credentials where sane.
 1.12 14-May-2006  elad integrate kauth.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
merge ktrace-lwp.
 1.10 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.9 22-Jan-2005  chs branches: 1.9.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.8 25-Aug-2003  uwe branches: 1.8.8;
Undo previous as it broke things.

There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
 1.7 24-Aug-2003  uwe #include "opt_rcons.h"
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 23-Oct-2002  jdolecek branches: 1.5.6;
g/c cons_ocount, it's not used by anything
 1.4 23-Oct-2002  jdolecek merge kqueue branch into -current

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.3 10-Oct-2002  martin Pass a struct cons_channel * to cc_iclose, not a struct kbd_softc *.
This argument has been previously unused, thus undetected due to void*
typing. Mmm, copy & paste. Note that sparc got it right though.

Many thanks to Valeriy E. Ushakov <uwe@netbsd.org> for debugging support.
 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 22-Mar-2002  fredette branches: 1.1.4; 1.1.6; 1.1.10;
Added bits to complete the sun2 console code. These are
virtually identical copies of files under sys/arch/sparc/dev,
and one day they will be merged under sys/dev/sun.
 1.1.10.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.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file kd.c was added on branch kqueue on 2002-06-23 17:42:30 +0000
 1.1.6.2 08-Jun-2002  gehenna remove unused function.
 1.1.6.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.1.4.5 11-Nov-2002  nathanw Catch up to -current
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file kd.c was added on branch nathanw_sa on 2002-04-01 07:43:17 +0000
 1.5.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.6.5 04-Feb-2005  skrll Adapt to branch.
 1.5.6.4 24-Jan-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.8.8.1 29-Apr-2005  kent sync with -current
 1.9.8.6 07-Dec-2007  yamt sync with head
 1.9.8.5 27-Oct-2007  yamt sync with head.
 1.9.8.4 03-Sep-2007  yamt sync with head.
 1.9.8.3 26-Feb-2007  yamt sync with head.
 1.9.8.2 30-Dec-2006  yamt sync with head.
 1.9.8.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.10.3 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.11.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.11.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.11.8.2 11-Aug-2006  yamt sync with head
 1.11.8.1 24-May-2006  yamt sync with head.
 1.11.6.1 01-Jun-2006  kardel Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.13.6.1 22-Oct-2006  yamt sync with head
 1.13.4.1 18-Nov-2006  ad Sync with head.
 1.15.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.24.2 21-Nov-2007  bouyer Sync with HEAD
 1.16.24.1 25-Oct-2007  bouyer Sync with HEAD.
 1.16.20.2 09-Jan-2008  matt sync with HEAD
 1.16.20.1 06-Nov-2007  matt sync with HEAD
 1.16.18.2 21-Nov-2007  joerg Sync with HEAD.
 1.16.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.16.2.3 03-Dec-2007  ad Sync with HEAD.
 1.16.2.2 03-Dec-2007  ad Sync with HEAD.
 1.16.2.1 23-Oct-2007  ad Sync with head.
 1.18.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.19.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.19.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.4.1 16-May-2008  yamt sync with head.
 1.20.2.1 18-May-2008  yamt sync with head.
 1.21.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.22.1 31-May-2011  rmind sync with head
 1.22.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.22.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.22.4.1 30-Oct-2012  yamt sync with head
 1.23.2.1 18-May-2014  rmind sync with head
 1.24.2.1 10-Aug-2014  tls Rebase.
 1.22 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.21 16-Mar-2014  dholland branches: 1.21.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.20 24-Apr-2011  rmind branches: 1.20.4; 1.20.14; 1.20.18;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.19 06-Jul-2008  tsutsui branches: 1.19.18; 1.19.24;
Split device_t/softc with misc cosmetic changes.
 1.18 13-Jun-2008  cegger use device_lookup_private to get softc
 1.17 19-Nov-2007  ad branches: 1.17.14; 1.17.16; 1.17.18; 1.17.20; 1.17.22;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.16 18-Oct-2007  joerg branches: 1.16.2;
Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
 1.15 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.14 09-Jul-2007  ad branches: 1.14.8; 1.14.10; 1.14.14;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.13 04-Mar-2007  christos branches: 1.13.2; 1.13.4; 1.13.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12 01-Oct-2006  elad branches: 1.12.4;
Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.11 23-Jul-2006  ad branches: 1.11.4; 1.11.6;
Use the LWP cached credentials where sane.
 1.10 14-May-2006  elad integrate kauth.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 22-Jan-2005  chs branches: 1.8.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.7 15-Jul-2003  lukem branches: 1.7.8;
__KERNEL_RCSID()
 1.6 23-Oct-2002  jdolecek branches: 1.6.6;
merge kqueue branch into -current

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.5 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 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 22-Mar-2002  fredette branches: 1.1.4; 1.1.6; 1.1.10;
Added bits to complete the sun2 console code. These are
virtually identical copies of files under sys/arch/sparc/dev,
and one day they will be merged under sys/dev/sun.
 1.1.10.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.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file pcons.c was added on branch kqueue on 2002-06-23 17:42:30 +0000
 1.1.6.2 08-Jun-2002  gehenna remove unused function.
 1.1.6.1 17-May-2002  gehenna Add device switch.
 1.1.4.5 11-Nov-2002  nathanw Catch up to -current
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file pcons.c was added on branch nathanw_sa on 2002-04-01 07:43:17 +0000
 1.6.6.5 04-Feb-2005  skrll Adapt to branch.
 1.6.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.8.8.5 07-Dec-2007  yamt sync with head
 1.8.8.4 27-Oct-2007  yamt sync with head.
 1.8.8.3 03-Sep-2007  yamt sync with head.
 1.8.8.2 30-Dec-2006  yamt sync with head.
 1.8.8.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.3 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.9.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.9.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.9.8.2 11-Aug-2006  yamt sync with head
 1.9.8.1 24-May-2006  yamt sync with head.
 1.9.6.1 01-Jun-2006  kardel Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.11.6.1 22-Oct-2006  yamt sync with head
 1.11.4.1 18-Nov-2006  ad Sync with head.
 1.12.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.10.1 03-Oct-2007  garbled Sync with HEAD
 1.13.4.1 11-Jul-2007  mjf Sync with head.
 1.13.2.3 03-Dec-2007  ad Sync with HEAD.
 1.13.2.2 23-Oct-2007  ad Sync with head.
 1.13.2.1 15-Jul-2007  ad Sync with head.
 1.14.14.2 21-Nov-2007  bouyer Sync with HEAD
 1.14.14.1 25-Oct-2007  bouyer Sync with HEAD.
 1.14.10.2 09-Jan-2008  matt sync with HEAD
 1.14.10.1 06-Nov-2007  matt sync with HEAD
 1.14.8.2 21-Nov-2007  joerg Sync with HEAD.
 1.14.8.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.16.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.17.22.2 18-Jul-2008  simonb Sync with head.
 1.17.22.1 18-Jun-2008  simonb Sync with head.
 1.17.20.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.18.1 04-May-2009  yamt sync with head.
 1.17.16.1 17-Jun-2008  yamt sync with head.
 1.17.14.2 28-Sep-2008  mjf Sync with HEAD.
 1.17.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.19.24.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.18.1 31-May-2011  rmind sync with head
 1.20.18.1 18-May-2014  rmind sync with 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.2.1 10-Aug-2014  tls Rebase.
 1.16 04-Aug-2023  rin sun2/sc(4): Fix panic due to wrong ENOMEM for DMA buffer

Use kmem_zalloc(9) for sc->sc_dma_handles[] to zero-initialize flags.

XXX
Will soon apply to sun3.
 1.15 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.14 21-Nov-2009  rmind branches: 1.14.76;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.13 06-Jul-2008  tsutsui Split device_t/softc with misc cosmetic changes.
 1.12 28-Apr-2008  martin branches: 1.12.2; 1.12.4;
Remove clause 3 and 4 from TNF licenses
 1.11 29-Mar-2006  thorpej branches: 1.11.62; 1.11.64; 1.11.66;
Use device_cfdata().
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 22-Jan-2005  chs branches: 1.9.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.8 15-Jul-2003  lukem branches: 1.8.8;
__KERNEL_RCSID()
 1.7 03-May-2003  wiz branches: 1.7.2;
DMA, not dma nor Dma.
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 27-Jun-2001  fredette branches: 1.2.2; 1.2.8;
Converted to use the new bus-specific attach args,
and the bus_space_peek_N functions. Now use hand-defined
macros instead of relying on structure layout to find registers.
Allocate the DMA handles here, since the MI chipset code
doesn't do that any more.
 1.1 18-Apr-2001  fredette branches: 1.1.2;
Added support for the Sun SC scsi controller.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 18-Apr-2001  bouyer file sc_mbmem.c was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.2.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.8.1 27-Jun-2001  nathanw file sc_mbmem.c was added on branch nathanw_sa on 2002-10-18 02:40:14 +0000
 1.2.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.7.2.4 24-Jan-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.8.1 29-Apr-2005  kent sync with -current
 1.9.8.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.8.1 01-Apr-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.66.3 11-Mar-2010  yamt sync with head
 1.11.66.2 04-May-2009  yamt sync with head.
 1.11.66.1 16-May-2008  yamt sync with head.
 1.11.64.1 18-May-2008  yamt sync with head.
 1.11.62.2 28-Sep-2008  mjf Sync with HEAD.
 1.11.62.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.4.1 18-Jul-2008  simonb Sync with head.
 1.12.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.14.76.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 14-Jun-2001  fredette This file has been moved to sys/dev/vme.
 1.1 18-Apr-2001  fredette branches: 1.1.2;
Added support for the Sun SC scsi controller.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 18-Apr-2001  bouyer file screg.h was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.26 12-Dec-2023  andvar remove TTY_DEBUG code from sun2/sparc64 zs.c code. it doesn't look relevant
to this particular drivers and likely is a leftover from some historical code.
 1.25 26-Oct-2022  riastradh ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
 1.24 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.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 13-Oct-2012  tsutsui branches: 1.21.52;
struct device * -> device_t, struct cfdata * -> cfdata_t (from chs@)
 1.20 26-Oct-2011  mrg branches: 1.20.2; 1.20.12;
catch up with other zs ports, original commit was:

>add two new functions for z8530tty: zs_chan_lock() and zs_chan_unlock(),
>and use them instead of various spl's in the zs.c's.
>
>reviewed by ad and martin.
 1.19 13-Jun-2008  cegger use device_lookup_private to get softc
 1.18 28-Apr-2008  martin branches: 1.18.2; 1.18.4;
Remove clause 3 and 4 from TNF licenses
 1.17 29-Mar-2008  tsutsui branches: 1.17.2; 1.17.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.16 04-Dec-2007  tsutsui branches: 1.16.12;
Adapt sun68k ports to recent interrupt handling changes.

XXX: sun2 (m68010) doesn't have CAS instructions.
 1.15 09-Nov-2007  ad branches: 1.15.2;
Call zs_lock_init() to set up the chanstate's lock.
 1.14 11-Mar-2007  tsutsui branches: 1.14.16; 1.14.18; 1.14.22; 1.14.24;
Print correct softipl number.
 1.13 05-Oct-2006  tsutsui branches: 1.13.4; 1.13.8;
Remove incorrect comment.
 1.12 28-Mar-2006  thorpej branches: 1.12.8; 1.12.10;
Use device_is_a().
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
merge ktrace-lwp.
 1.10 22-Jan-2005  chs branches: 1.10.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.9 13-Feb-2004  wiz branches: 1.9.8;
Uppercase CPU, plural is CPUs.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 28-Jan-2003  pk branches: 1.7.2;
Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.6 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.5 13-Dec-2002  fredette bcopy -> memcpy, bzero -> memset
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 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.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 22-Mar-2002  fredette branches: 1.1.4; 1.1.6; 1.1.10;
Added support for the sun2 zs serial ports. As this driver
is very common on Suns, it could be made shared under sys/dev/sun.
 1.1.10.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.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file zs.c was added on branch kqueue on 2002-06-23 17:42:30 +0000
 1.1.6.1 19-May-2002  gehenna Remove hard-coded major.
 1.1.4.6 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.5 19-Dec-2002  thorpej Sync with HEAD.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file zs.c was added on branch nathanw_sa on 2002-04-01 07:43:18 +0000
 1.7.2.4 24-Jan-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.8.1 29-Apr-2005  kent sync with -current
 1.10.8.5 07-Dec-2007  yamt sync with head
 1.10.8.4 15-Nov-2007  yamt sync with head.
 1.10.8.3 03-Sep-2007  yamt sync with head.
 1.10.8.2 30-Dec-2006  yamt sync with head.
 1.10.8.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.11.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.11.8.1 01-Apr-2006  yamt sync with head.
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.10.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.12.8.1 18-Nov-2006  ad Sync with head.
 1.13.8.2 03-Dec-2007  ad Sync with HEAD.
 1.13.8.1 13-Mar-2007  ad Sync with head.
 1.13.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.24.2 08-Dec-2007  mjf Sync with HEAD.
 1.14.24.1 19-Nov-2007  mjf Sync with HEAD.
 1.14.22.1 13-Nov-2007  bouyer Sync with HEAD
 1.14.18.1 09-Jan-2008  matt sync with HEAD
 1.14.16.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.14.16.1 11-Nov-2007  joerg Sync with HEAD.
 1.15.2.1 08-Dec-2007  ad Sync with head.
 1.16.12.3 29-Jun-2008  mjf Sync with HEAD.
 1.16.12.2 02-Jun-2008  mjf Sync with HEAD.
 1.16.12.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.4.2 04-May-2009  yamt sync with head.
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.2 17-Jun-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.18.4.1 18-Jun-2008  simonb Sync with head.
 1.18.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.20.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.20.2.1 30-Oct-2012  yamt sync with head
 1.21.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.18 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.17 29-Mar-2008  tsutsui branches: 1.17.2; 1.17.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.16 03-Oct-2006  tsutsui branches: 1.16.52;
- change find_prom_map() to take paddr_t and return vaddr_t rather than
bus_space_handle_t since bus space handle without bus space tag looks weird
- replace old sun3 obio_find_mapping() with new common find_prom_map()
- add bus_space_vaddr(), from hp300
 1.15 01-Oct-2006  tsutsui First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.14 28-Mar-2006  thorpej branches: 1.14.8; 1.14.10;
Use device_unit().
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
merge ktrace-lwp.
 1.12 19-Jun-2005  thorpej branches: 1.12.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.11 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.10 15-Jul-2003  lukem branches: 1.10.8;
__KERNEL_RCSID()
 1.9 02-Oct-2002  thorpej branches: 1.9.6;
Add trailing ; to CFATTACH_DECL.
 1.8 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 27-Jul-2002  fredette Fixed kgdb support by including <sun2/dev/cons.h>.
 1.5 26-Nov-2001  fredette branches: 1.5.8;
Only declare the console keyboard on zs if it's a Sun-2
or later keyboard.
 1.4 27-Jun-2001  fredette branches: 1.4.2; 1.4.8;
Converted to use the new bus-specific attach args.
Added the zs_console_flags function, used to tell
MI code what zs is tied up in the console.
 1.3 14-Jun-2001  fredette Now use the bus_space_peek_N function to probe for
the device, and common sun68k_find_prom_map function to
find a PROM mapping for a device.
 1.2 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file zs_any.c was added on branch thorpej_scsipi on 2001-04-21 17:54:47 +0000
 1.4.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.3 01-Aug-2002  nathanw Catch up to -current.
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 27-Jun-2001  nathanw file zs_any.c was added on branch nathanw_sa on 2002-01-08 00:28:08 +0000
 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 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.8.1 31-Aug-2002  gehenna catch up with -current.
 1.9.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.9.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.13.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.13.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.13.8.1 01-Apr-2006  yamt sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.14.10.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.14.8.1 18-Nov-2006  ad Sync with head.
 1.16.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.16.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.11 24-Oct-2023  andvar apply similar changes between different archs/machines for zs_kgdb.c:
1) adjust zs_kgdb_init tty attachment message for kgdb_dev type change.
(one arch uses cast to int instead, but kept one approach for consistency)
2) remove unused rr0 declaration and assignment in zs_kgdb_txint()
3) adjust kgdb_dev format specifier to %llx/d if needed.
4) add const for zs_kgdb_devname declaration (macppc only).
should fix zs_kgdb.c build for all these ports.
 1.10 28-Apr-2008  martin branches: 1.10.68; 1.10.78;
Remove clause 3 and 4 from TNF licenses
 1.9 17-Oct-2007  garbled branches: 1.9.16; 1.9.18; 1.9.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.8 23-Jun-2007  hauke branches: 1.8.10;
Fix a warning from gcc 4 about stripping the volatile qualifier by a cast
by doing the proper __UNVOLATILE() dance.
 1.7 04-Mar-2007  christos branches: 1.7.2; 1.7.4; 1.7.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 11-Dec-2005  christos branches: 1.6.26;
merge ktrace-lwp.
 1.5 22-Jan-2005  chs branches: 1.5.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 15-Jul-2003  lukem branches: 1.4.8;
__KERNEL_RCSID()
 1.3 13-Dec-2002  fredette branches: 1.3.6;
bcopy -> memcpy, bzero -> memset
 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 22-Mar-2002  fredette branches: 1.1.4; 1.1.6; 1.1.10;
Added support for the sun2 zs serial ports. As this driver
is very common on Suns, it could be made shared under sys/dev/sun.
 1.1.10.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.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file zs_kgdb.c was added on branch kqueue on 2002-06-23 17:42:30 +0000
 1.1.6.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.1.4.4 19-Dec-2002  thorpej Sync with HEAD.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file zs_kgdb.c was added on branch nathanw_sa on 2002-04-01 07:43:18 +0000
 1.3.6.4 24-Jan-2005  skrll Sync with HEAD.
 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.4.8.1 29-Apr-2005  kent sync with -current
 1.5.8.1 03-Sep-2007  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.7.4.1 11-Jul-2007  mjf Sync with head.
 1.7.2.1 15-Jul-2007  ad Sync with head.
 1.8.10.1 06-Nov-2007  matt sync with HEAD
 1.9.20.1 16-May-2008  yamt sync with head.
 1.9.18.1 18-May-2008  yamt sync with head.
 1.9.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.78.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.10.68.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 22-Mar-2002  fredette branches: 1.1.4; 1.1.10; 1.1.118; 1.1.120; 1.1.122;
Added support for the sun2 zs serial ports. As this driver
is very common on Suns, it could be made shared under sys/dev/sun.
 1.1.122.1 16-May-2008  yamt sync with head.
 1.1.120.1 18-May-2008  yamt sync with head.
 1.1.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file zsreg.h was added on branch kqueue on 2002-06-23 17:42:30 +0000
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file zsreg.h was added on branch nathanw_sa on 2002-04-01 07:43:18 +0000
 1.9 13-Mar-2020  rin Fix build without kbd at zstty, simplify.
 1.8 07-Jul-2016  msaitoh branches: 1.8.18;
KNF. Remove extra spaces. No functional change.
 1.7 29-Mar-2008  tsutsui branches: 1.7.48; 1.7.68;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.6 11-Mar-2007  tsutsui branches: 1.6.38;
Fix a comment.
 1.5 11-Dec-2005  christos branches: 1.5.26; 1.5.30;
merge ktrace-lwp.
 1.4 22-Jan-2005  chs branches: 1.4.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 07-Aug-2003  agc branches: 1.3.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 03-May-2003  wiz branches: 1.2.2;
DMA, not dma nor Dma.
 1.1 22-Mar-2002  fredette branches: 1.1.4; 1.1.10;
Added support for the sun2 zs serial ports. As this driver
is very common on Suns, it could be made shared under sys/dev/sun.
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file zsvar.h was added on branch kqueue on 2002-06-23 17:42:31 +0000
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file zsvar.h was added on branch nathanw_sa on 2002-04-01 07:43:18 +0000
 1.2.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.4.8.1 03-Sep-2007  yamt sync with head.
 1.5.30.1 13-Mar-2007  ad Sync with head.
 1.5.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.38.1 03-Apr-2008  mjf Sync with HEAD.
 1.7.68.1 09-Jul-2016  skrll Sync with HEAD
 1.7.48.1 03-Dec-2017  jdolecek update from HEAD
 1.8.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.14 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.13 12-Jul-2018  maxv branches: 1.13.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.12 24-Dec-2015  christos branches: 1.12.16; 1.12.18;
fenv for m68k
 1.11 17-Jul-2011  joerg branches: 1.11.12; 1.11.30;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.10 22-Feb-2007  tsutsui Remove garbage in previous.
 1.9 09-Feb-2007  ad branches: 1.9.2;
Merge newlock2 to head.
 1.8 26-Jul-2006  drochner branches: 1.8.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.8;
merge ktrace-lwp.
 1.6 08-May-2004  kleink branches: 1.6.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.5 18-Jan-2003  thorpej branches: 1.5.2;
Merge the nathanw_sa branch.
 1.4 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.3 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.2 22-Mar-2002  fredette branches: 1.2.4;
Added bits to use the console code under sys/arch/sun2 and
sys/dev/sun.
 1.1 27-Jun-2001  fredette branches: 1.1.2; 1.1.8;
Added a Makefile for the sun2 includes.
 1.1.8.5 11-Dec-2002  thorpej Sync with HEAD.
 1.1.8.4 13-Aug-2002  nathanw Catch up to -current.
 1.1.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.1.8.1 27-Jun-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:53 +0000
 1.1.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.1 31-Aug-2002  gehenna catch up with -current.
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.12.2 26-Feb-2007  yamt sync with head.
 1.6.12.1 30-Dec-2006  yamt sync with head.
 1.7.8.1 11-Aug-2006  yamt sync with head
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.4.1 01-Feb-2007  ad Header file cleanup.
 1.9.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.11.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.11.12.1 03-Dec-2017  jdolecek update from HEAD
 1.12.18.1 10-Jun-2019  christos Sync with HEAD
 1.12.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.13.36.1 02-Aug-2025  perseant Sync with HEAD
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file ansi.h was added on branch nathanw_sa on 2001-04-06 13:13:02 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file ansi.h was added on branch thorpej_scsipi on 2001-04-21 17:54:48 +0000
 1.2 10-Dec-2002  thorpej Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.10.1 06-Apr-2001  thorpej file aout_machdep.h was added on branch nathanw_sa on 2002-12-11 06:12:32 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file aout_machdep.h was added on branch thorpej_scsipi on 2001-04-21 17:54:48 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file asm.h was added on branch nathanw_sa on 2001-04-06 13:13:03 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file asm.h was added on branch thorpej_scsipi on 2001-04-21 17:54:48 +0000
 1.3 27-Jun-2001  fredette branches: 1.3.8;
Include a common header, then define macros that
give the appearance of specific attach args for
the mbio and mbmem buses.
 1.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file autoconf.h was added on branch thorpej_scsipi on 2001-04-21 17:54:48 +0000
 1.3.8.2 27-Jun-2001  fredette Include a common header, then define macros that
give the appearance of specific attach args for
the mbio and mbmem buses.
 1.3.8.1 27-Jun-2001  fredette file autoconf.h was added on branch nathanw_sa on 2001-06-27 19:21:50 +0000
 1.3 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.2 19-Sep-2007  he Improve consistency between <sys/bswap.h> and what's actually
defined by the C library for the various m68k ports by borrowing
some #ifs from the i386 port.

Also, align sun2 with the other m68k ports as to whether they
define __bswap{16,32} or bswap{16,32} in their C library (all
now define the __ variants).

This should make the m68k ports build sys/rump again, except
for sun2 which hits another problem later on.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.42; 1.1.84; 1.1.92; 1.1.102; 1.1.104;
Added.
 1.1.104.1 06-Nov-2007  matt sync with HEAD
 1.1.102.1 02-Oct-2007  joerg Sync with HEAD.
 1.1.92.1 03-Oct-2007  garbled Sync with HEAD
 1.1.84.1 09-Oct-2007  ad Sync with head.
 1.1.42.1 27-Oct-2007  yamt sync with head.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file bswap.h was added on branch nathanw_sa on 2001-04-06 13:13:03 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file bswap.h was added on branch thorpej_scsipi on 2001-04-21 17:54:48 +0000
 1.3 14-Jun-2001  fredette branches: 1.3.8;
Now simply include the real header under arch/sun68k.
 1.2 06-Apr-2001  fredette branches: 1.2.2;
Added an internal bus_space flag to find and use PROM mappings.
Added an internal bus_dma flag to mark when a map has been
loaded by double-mapping pages by hand, outside of the pmap.
Added more prototypes for our bus_dma implementation.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 06-Apr-2001  bouyer file bus.h was added on branch thorpej_scsipi on 2001-04-21 17:54:48 +0000
 1.3.8.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.3.8.1 14-Jun-2001  fredette file bus.h was added on branch nathanw_sa on 2001-06-14 13:16:04 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file cdefs.h was added on branch nathanw_sa on 2001-04-06 13:13:03 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file cdefs.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 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 28-Feb-2002  simonb branches: 1.4.8;
Use "#define<tab>".
 1.3 27-Feb-2002  christos - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.2 27-Jun-2001  fredette branches: 1.2.2; 1.2.8;
Declare the PROM console device.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file conf.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 1.2.8.4 17-Sep-2002  nathanw Catch up to -current.
 1.2.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.1 27-Jun-2001  nathanw file conf.h was added on branch nathanw_sa on 2002-02-28 04:12:20 +0000
 1.2.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.2.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.8.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.3 27-Jun-2001  fredette branches: 1.3.8;
Just include a common header.
 1.2 30-May-2001  mrg use _KERNEL_OPT
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file cpu.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 1.3.8.2 27-Jun-2001  fredette Just include a common header.
 1.3.8.1 27-Jun-2001  fredette file cpu.h was added on branch nathanw_sa on 2001-06-27 19:19:23 +0000
 1.8 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.7 11-Dec-2005  christos branches: 1.7.122;
merge ktrace-lwp.
 1.6 03-Jun-2005  tsutsui Remove declarations for db_read_bytes() and db_write_bytes().
They are in <ddb/db_access.h>.
 1.5 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 13-May-2002  matt branches: 1.4.10; 1.4.18;
Nuke local extern label_t *db_recover; it's now in <ddb/db_extern.h>
 1.3 30-Nov-2001  fredette Purge vm_offset_t.
 1.2 09-Nov-2001  thorpej branches: 1.2.2;
Remove unneeded declarations of the db_machine_init() function. The
ARM ports are the only ones that actually have one, and it is about
to change.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.8;
Added.
 1.1.8.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file db_machdep.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 1.2.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 09-Nov-2001  nathanw file db_machdep.h was added on branch nathanw_sa on 2002-01-08 00:28:09 +0000
 1.4.18.1 29-Apr-2005  kent sync with -current
 1.4.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.10.1 24-Jan-2005  skrll Sync with HEAD.
 1.7.122.1 03-Dec-2017  jdolecek update from HEAD
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 12-Jun-2005  dyoung Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
 1.2 14-Jun-2001  fredette branches: 1.2.8; 1.2.24;
Now simply include the real header under arch/sun68k.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file disklabel.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 1.2.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.8.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.2.8.1 14-Jun-2001  fredette file disklabel.h was added on branch nathanw_sa on 2001-06-14 13:12:51 +0000
 1.8 20-Jul-2024  andvar fix typos in comments, mainly s/harware/hardware/.
 1.7 28-Apr-2008  martin branches: 1.7.124;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.76; 1.6.78;
merge ktrace-lwp.
 1.5 19-Jun-2005  thorpej Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.4 02-Apr-2003  thorpej branches: 1.4.2;
Use PAGE_SIZE rather than NBPG.
 1.3 14-Jun-2001  fredette branches: 1.3.8;
Corrected the value of DVMA_OBIO_SLAVE_BASE; obio
devices can see the entire CPU address space.
 1.2 06-Apr-2001  fredette branches: 1.2.2;
Now use the proper DVMA map size depending on what
machine type we're on.
Removed all prototypes, since we're going bus_dma.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 06-Apr-2001  bouyer file dvma.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 1.3.8.2 14-Jun-2001  fredette Corrected the value of DVMA_OBIO_SLAVE_BASE; obio
devices can see the entire CPU address space.
 1.3.8.1 14-Jun-2001  fredette file dvma.h was added on branch nathanw_sa on 2001-06-14 13:17:05 +0000
 1.4.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.124.1 02-Aug-2025  perseant Sync with HEAD
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 19-Jun-2005  thorpej Move common Sun3/Sun4 EEPROM definitions in to <dev/sun/eeprom.h>
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.26;
Added.
 1.1.26.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file eeprom.h was added on branch nathanw_sa on 2001-04-06 13:13:04 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file eeprom.h was added on branch thorpej_scsipi on 2001-04-21 17:54:49 +0000
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 28-Jan-2002  thorpej Define ELF32_EHDR_FLAGS_OK()/ELF64_EHDR_FLAGS_OK() and use it
as an added measure to make sure that we can execute a binary.
These default to (1) if elf_machdep.h does not override them.

On Sun2, ELF32_EHDR_FLAGS_OK() checks for the presense of EF_M68000,
since the 68010 cannot run binaries for the 68020-and-up.
 1.4 28-Jan-2002  thorpej Just use the stock m68k/elf_machdep.h for now, so that things compile.
A patch to handle EF_M68000 will be posted shortly.
 1.3 09-Dec-2001  thorpej Add support for dumping ELF-cormat core files.
 1.2 27-Jun-2001  fredette branches: 1.2.2; 1.2.8;
Now define a suitable ELF32_MACHDEP_ID_CASES.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file elf_machdep.h was added on branch thorpej_scsipi on 2001-04-21 17:54:50 +0000
 1.2.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1 27-Jun-2001  nathanw file elf_machdep.h was added on branch nathanw_sa on 2002-01-08 00:28:09 +0000
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file endian.h was added on branch nathanw_sa on 2001-04-06 13:13:04 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file endian.h was added on branch thorpej_scsipi on 2001-04-21 17:54:50 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file endian_machdep.h was added on branch nathanw_sa on 2001-04-06 13:13:04 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2001-04-21 17:54:50 +0000
 1.1 22-Mar-2002  fredette branches: 1.1.4; 1.1.10;
Added bits to use the console code under sys/arch/sun2 and
sys/dev/sun.
 1.1.10.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.10.1 22-Mar-2002  jdolecek file fbio.h was added on branch kqueue on 2002-06-23 17:42:31 +0000
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 22-Mar-2002  nathanw file fbio.h was added on branch nathanw_sa on 2002-04-01 07:43:19 +0000
 1.1 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.1 24-Dec-2015  christos branches: 1.1.2; 1.1.18;
fenv for m68k
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 24-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:45 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 24-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:44 +0000
 1.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file float.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file frame.h was added on branch nathanw_sa on 2001-04-06 13:13:04 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file frame.h was added on branch thorpej_scsipi on 2001-04-21 17:54:50 +0000
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Now simply include the real header under arch/sun68k.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file idprom.h was added on branch thorpej_scsipi on 2001-04-21 17:54:50 +0000
 1.2.8.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.2.8.1 14-Jun-2001  fredette file idprom.h was added on branch nathanw_sa on 2001-06-14 13:12:51 +0000
 1.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file ieee.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file ieeefp.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.10;
Add definitions of C99 integer constant macros.
 1.1.10.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.10.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:44 +0000
 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:50 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.10;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.10.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.10.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:20 +0000
 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:50 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.10;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.10.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.10.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:14 +0000
 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:51 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.10;
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.10.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.10.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:20:04 +0000
 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:51 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file int_types.h was added on branch nathanw_sa on 2001-04-06 13:13:04 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file int_types.h was added on branch thorpej_scsipi on 2001-04-21 17:54:51 +0000
 1.6 05-Oct-2006  tsutsui Minor cleanups before isr.c merge with sun3:
- include <m68k/cpu.h> rather than <m68k/m68k.h> in <sun68k/cpu.h>
- wrap M68K_VAC definition with #ifndef _SUN3X_ in <sun68k/cpu.h>
- move setsoftnet() macro from <sun68k/cpu.h> to <sun68k/intr.h>
- move declarations for isr_soft_request() and isr_soft_clear() from
sun2/include/intr.h to <sun68k/intr.h>
- remove extern keyword from function declarations
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 22-Jan-2005  chs branches: 1.4.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 14-Jun-2001  fredette branches: 1.3.8; 1.3.24; 1.3.32;
Now simply include the real header under arch/sun68k.
 1.2 18-Apr-2001  fredette branches: 1.2.2;
Now define IPL_BIO.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 18-Apr-2001  bouyer file intr.h was added on branch thorpej_scsipi on 2001-04-21 17:54:51 +0000
 1.3.32.1 29-Apr-2005  kent sync with -current
 1.3.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.3.8.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.3.8.1 14-Jun-2001  fredette file intr.h was added on branch nathanw_sa on 2001-06-14 13:12:51 +0000
 1.4.8.1 30-Dec-2006  yamt sync with head.
 1.5.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.5.20.1 18-Nov-2006  ad Sync with head.
 1.1 27-Jun-2001  fredette branches: 1.1.8;
Just include a common header.
 1.1.8.2 27-Jun-2001  fredette Just include a common header.
 1.1.8.1 27-Jun-2001  fredette file kbd.h was added on branch nathanw_sa on 2001-06-27 19:19:24 +0000
 1.1 27-Jun-2001  fredette branches: 1.1.8;
Just include a common header.
 1.1.8.2 27-Jun-2001  fredette Just include a common header.
 1.1.8.1 27-Jun-2001  fredette file kbio.h was added on branch nathanw_sa on 2001-06-27 19:19:24 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file kcore.h was added on branch nathanw_sa on 2001-04-06 13:13:05 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file kcore.h was added on branch thorpej_scsipi on 2001-04-21 17:54:51 +0000
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.26; 1.1.34;
Added.
 1.1.34.1 29-Apr-2005  kent sync with -current
 1.1.26.1 24-Jan-2005  skrll Sync with HEAD.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file leds.h was added on branch nathanw_sa on 2001-04-06 13:13:05 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file leds.h was added on branch thorpej_scsipi on 2001-04-21 17:54:51 +0000
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file limits.h was added on branch nathanw_sa on 2001-04-06 13:13:05 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file limits.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.1 17-Sep-2006  tsutsui branches: 1.1.4; 1.1.8;
Make sun68k/stand build without installed ${DESTDIR} files.

Currently "machine" symlink points sys/arch/sun68k/include,
but this means some <machine/foo.h> files are taken from
sys/arch/sun68k/include but others (i.e. files not in sun68k/include)
are taken from ${DESTDIR}/usr/include/machine.

Instead, make "machine" symlink point sys/arch/${MACHINE}/include,
make "sun68k" symlink point sys/arch/sun68k/include (not sys/arch/sun68k),
add sys/arch to include path, and move some files where appropriate.
 1.1.8.2 30-Dec-2006  yamt sync with head.
 1.1.8.1 17-Sep-2006  yamt file loadfile_machdep.h was added on branch yamt-lazymbuf on 2006-12-30 20:47:06 +0000
 1.1.4.2 18-Nov-2006  ad Sync with head.
 1.1.4.1 17-Sep-2006  ad file loadfile_machdep.h was added on branch newlock2 on 2006-11-18 21:29:34 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file lock.h was added on branch nathanw_sa on 2001-04-06 13:13:05 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file lock.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:56:10 +0000
 1.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file math.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.1 17-Sep-2006  tsutsui branches: 1.1.4; 1.1.8;
Make sun68k/stand build without installed ${DESTDIR} files.

Currently "machine" symlink points sys/arch/sun68k/include,
but this means some <machine/foo.h> files are taken from
sys/arch/sun68k/include but others (i.e. files not in sun68k/include)
are taken from ${DESTDIR}/usr/include/machine.

Instead, make "machine" symlink point sys/arch/${MACHINE}/include,
make "sun68k" symlink point sys/arch/sun68k/include (not sys/arch/sun68k),
add sys/arch to include path, and move some files where appropriate.
 1.1.8.2 30-Dec-2006  yamt sync with head.
 1.1.8.1 17-Sep-2006  yamt file mc68851.h was added on branch yamt-lazymbuf on 2006-12-30 20:47:06 +0000
 1.1.4.2 18-Nov-2006  ad Sync with head.
 1.1.4.1 17-Sep-2006  ad file mc68851.h was added on branch newlock2 on 2006-11-18 21:29:34 +0000
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 10-Nov-2001  scw branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Now simply include the real header under arch/sun68k.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file mon.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.2.8.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.2.8.1 14-Jun-2001  fredette file mon.h was added on branch nathanw_sa on 2001-06-14 13:12:51 +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 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:08:31 +0000
 1.16 31-May-2021  simonb Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE is
referenced since some sources include <machine/param.h>.
 1.15 11-Aug-2012  tsutsui branches: 1.15.56;
Poor sun2 has only 14MB KVA space so reduce NKMEMPAGES_MIN_DEFAULT and
NKMEMPAGES_MAX_DEFAULT values accordingly.

XXX: netbsd-6 GENERIC still gets "panic: pool_get: kmem-4096: page empty"
 1.14 10-Feb-2012  para branches: 1.14.2;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.13 08-Feb-2011  rmind branches: 1.13.4; 1.13.8;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.12 08-Feb-2010  joerg branches: 1.12.2; 1.12.4; 1.12.6;
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.11 11-Dec-2009  tsutsui branches: 1.11.2;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun2 pmap sources
and instead define and use sun2_round_seg() and sun2_trunc_seg()
since they are quite pmap implementation dependent
 1.10 02-Jul-2008  ad Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.9 16-Mar-2007  tsutsui branches: 1.9.34; 1.9.38; 1.9.40; 1.9.42;
Bump MAXBSIZE to 0x4000 because 16KB could be used by default
on newfs(8) in these days and we'll get "buf mem pool index 5" panic
in sys/kern/vfs_bio.c.
 1.8 11-Dec-2005  christos branches: 1.8.24; 1.8.26; 1.8.30; 1.8.32; 1.8.34;
merge ktrace-lwp.
 1.7 23-Jan-2005  chs branches: 1.7.8;
move spl*() and IPL_* definitions from psl.h to intr.h.
 1.6 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.5 30-Oct-2003  mycroft branches: 1.5.8;
Set MAXPHYS to 0xe000.
XXX This really is the wrong way to do this.
 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 14-May-2001  fredette branches: 1.3.8; 1.3.18; 1.3.24;
Now always define PGSHIFT. Thanks to the ELF move, note the new
larger msgbuf size and different KERNBASE.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
Define a very small UBC_NWINS to keep UBC from eating all kernel VM.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file param.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.3.24.4 24-Jan-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.3.18.1 28-Jan-2004  jmc Pullup (via patch from fredette)
Identical to pullup 1453 for sun3. Clips MAXPHYS to 32k on sun2, as needed by the sc driver.
 1.3.8.2 14-May-2001  fredette Now always define PGSHIFT. Thanks to the ELF move, note the new
larger msgbuf size and different KERNBASE.
 1.3.8.1 14-May-2001  fredette file param.h was added on branch nathanw_sa on 2001-05-14 20:35:59 +0000
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.7.8.1 03-Sep-2007  yamt sync with head.
 1.8.34.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.8.32.1 11-Jul-2007  mjf Sync with head.
 1.8.30.1 10-Apr-2007  ad Sync with head.
 1.8.26.1 24-Mar-2007  yamt sync with head.
 1.8.24.1 31-Mar-2007  bouyer Pull up following revision(s) (requested by tsutsui in ticket #527):
sys/arch/sun2/sun2/trap.c: revision 1.30
sys/arch/sun2/include/param.h: revision 1.9
sys/arch/sun2/sun2/machdep.c: revision 1.49
Pass proper args to ksyms_init().
Fix compile with options DIAGNOSTIC.
(Hmm, no one has tried it since nathanw_sa merge..)
Bump MAXBSIZE to 0x4000 because 16KB could be used by default
on newfs(8) in these days and we'll get "buf mem pool index 5" panic
in sys/kern/vfs_bio.c.
 1.9.42.1 03-Jul-2008  simonb Sync with head.
 1.9.40.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.38.2 11-Mar-2010  yamt sync with head
 1.9.38.1 04-May-2009  yamt sync with head.
 1.9.34.1 02-Jul-2008  mjf Sync with HEAD.
 1.11.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.12.6.1 17-Feb-2011  bouyer Sync with HEAD
 1.12.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.12.2.1 05-Mar-2011  rmind sync with head
 1.13.8.1 18-Feb-2012  mrg merge to -current.
 1.13.4.2 30-Oct-2012  yamt sync with head
 1.13.4.1 17-Apr-2012  yamt sync with head
 1.14.2.1 13-Aug-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #487):
sys/arch/sun3/include/param3.h: revision 1.55
sys/arch/sun3/include/param3.h: revision 1.56
sys/arch/sun2/include/param.h: revision 1.15
sys/arch/sun3/include/param.h: revision 1.61
sys/arch/sun3/include/param3x.h: revision 1.18
Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes "panic: ubc_init: failed to map ubc_object" on
TME emulating 3/120 with >16MB RAM.
Should be pulled up to netbsd-6.
Poor sun2 has only 14MB KVA space so reduce NKMEMPAGES_MIN_DEFAULT and
NKMEMPAGES_MAX_DEFAULT values accordingly.
XXX: netbsd-6 GENERIC still gets "panic: pool_get: kmem-4096: page empty"
Also reduce UBC_NWINS from default 1024 to 512
to avoid possible KVA shortage, otherwise
"panic: ubc_init: failed to map ubc_object"
could still happen on netbsd-6 branch.
Should be pulled up to netbsd-6.
 1.15.56.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file pcb.h was added on branch nathanw_sa on 2001-04-06 13:13:05 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file pcb.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.28 14-Mar-2020  ad pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.27 01-Feb-2020  tsutsui Use "__nothing" macro defined in <sys/cdefs.h> for empty pmap_update().

Suggested by pgoyette@ in PR/54869.
 1.26 09-Jan-2013  he branches: 1.26.38; 1.26.44;
The pmap_prefer() function grew an additional argument with the introduction
of top-down VM; fix the prototype accordingly.
 1.25 07-Jan-2013  chs switch to __USE_TOPDOWN_VM.
 1.24 03-Jun-2011  tsutsui branches: 1.24.2; 1.24.12;
- remove simple_lock(9) and use atomic_ops(3) to account pmap reference count,
perrequest from rmind@
- while here no need to export struct pmap on sun2/sun3/sun3x

No particular problem for a week on hp300 and sun3x kernels with disabled
tcp_vtw which has been broken for a month on low memory machines.
 1.23 11-Dec-2009  tsutsui branches: 1.23.4; 1.23.6; 1.23.10;
Export pmap_procwr() declaration only #ifdef _KERNEL.
 1.22 11-Dec-2009  tsutsui Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun2 pmap sources
and instead define and use sun2_round_seg() and sun2_trunc_seg()
since they are quite pmap implementation dependent
 1.21 09-Dec-2008  pooka Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.20 28-Apr-2008  martin branches: 1.20.6; 1.20.8;
Remove clause 3 and 4 from TNF licenses
 1.19 22-Jan-2008  joerg branches: 1.19.6; 1.19.8; 1.19.10;
Include sys/simplelock.h for the sake of pm_lock.
 1.18 16-Feb-2006  perry branches: 1.18.44; 1.18.50; 1.18.58;
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.17 24-Dec-2005  perry branches: 1.17.2; 1.17.4; 1.17.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.16 11-Dec-2005  christos merge ktrace-lwp.
 1.15 22-Jan-2005  chs branches: 1.15.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14 17-Jan-2005  atatat Convert the PMAP_PREFER() macro from two arguments (offset and hint)
to four (adding size and direction).

In order for topdown uvm to be an option on ports using PMAP_PREFER,
they will need to "prefer" lower addresses if topdown is being used.
Additionally, at least one port also needs to know the size.
 1.13 22-Sep-2002  chs branches: 1.13.6; 1.13.14;
it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.12 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.11 30-Nov-2001  fredette Purge vm_offset_t.
 1.10 10-Sep-2001  chris branches: 1.10.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.9 27-Jun-2001  fredette branches: 1.9.2; 1.9.4;
Added comments and fixed some macros now that I correctly
understand how to address the sun2 VME bus in the VM hardware.
 1.8 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.7 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.6 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.5 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.4 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.3 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.2 06-Apr-2001  fredette branches: 1.2.2;
Added a prototype for the internal function _pmap_extract_pmeg,
used by the bus_dma implementation when double-mapping pages
by hand.
Now define PMAP_OBMEM for completeness.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.3 23-Apr-2001  bouyer Sync with HEAD.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 06-Apr-2001  bouyer file pmap.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.9.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.9.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.4.1 10-Sep-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-01-08 00:28:09 +0000
 1.13.14.1 29-Apr-2005  kent sync with -current
 1.13.6.2 24-Jan-2005  skrll Sync with HEAD.
 1.13.6.1 17-Jan-2005  skrll Sync with HEAD.
 1.15.8.1 04-Feb-2008  yamt sync with head.
 1.17.6.1 22-Apr-2006  simonb Sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.17.2.1 18-Feb-2006  yamt sync with head.
 1.18.58.1 23-Jan-2008  bouyer Sync with HEAD.
 1.18.50.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.44.1 23-Mar-2008  matt sync with HEAD
 1.19.10.3 11-Mar-2010  yamt sync with head
 1.19.10.2 04-May-2009  yamt sync with head.
 1.19.10.1 16-May-2008  yamt sync with head.
 1.19.8.1 18-May-2008  yamt sync with head.
 1.19.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.19.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.23.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.23.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.23.4.1 12-Jun-2011  rmind sync with head
 1.24.12.1 25-Feb-2013  tls resync with head
 1.24.2.1 23-Jan-2013  yamt sync with head
 1.26.44.1 29-Feb-2020  ad Sync with head.
 1.26.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 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:41:59 +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 14:52:41 +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:58 +0000
 1.2 13-Jul-2002  scw m68k syscall rototill:

- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
- Add systrace glue.
- Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
(They were all defined exactly the same anyway, other than a couple
of the MDP_* flags.)
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.10; 1.1.18;
Added.
 1.1.18.1 17-Jul-2002  gehenna catch up with -current.
 1.1.10.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.10.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.1.10.1 06-Apr-2001  scw file proc.h was added on branch nathanw_sa on 2001-11-18 19:45:49 +0000
 1.1.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file proc.h was added on branch thorpej_scsipi on 2001-04-21 17:54:52 +0000
 1.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file profile.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 11-Dec-2005  christos branches: 1.8.74; 1.8.76; 1.8.78;
merge ktrace-lwp.
 1.7 03-Jun-2005  tsutsui Add const.
 1.6 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.5 19-Mar-2004  he branches: 1.5.8;
Fix an overlooked PROM_getprop*() => prom_getprop*() rename.
 1.4 22-Mar-2002  fredette branches: 1.4.12;
Added bits to use the console code under sys/arch/sun2 and
sys/dev/sun.
 1.3 01-Oct-2001  fredette branches: 1.3.4;
Added the prom_kbdid function, to help us figure out if
the console keyboard is on the parallel interface or zs1.
 1.2 14-Jun-2001  fredette branches: 1.2.2; 1.2.4;
Moved the definition of romVectorPtr here from mon.h.
Prototype prom_sd_target.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file promlib.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +0000
 1.2.4.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.1 01-Oct-2001  nathanw file promlib.h was added on branch nathanw_sa on 2002-04-01 07:43:19 +0000
 1.4.12.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.12.4 24-Jan-2005  skrll Sync with HEAD.
 1.4.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.12.1 03-Aug-2004  skrll Sync with HEAD
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.8.78.1 16-May-2008  yamt sync with head.
 1.8.76.1 18-May-2008  yamt sync with head.
 1.8.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 14-Jun-2001  fredette branches: 1.4.8;
Now simply include the real header under arch/sun68k.
 1.3 14-May-2001  fredette Rewrote a variable constraint to make gcc 2.95 happy.
 1.2 13-Apr-2001  thorpej branches: 1.2.2;
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.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 13-Apr-2001  bouyer file psl.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +0000
 1.4.8.2 14-Jun-2001  fredette Now simply include the real header under arch/sun68k.
 1.4.8.1 14-Jun-2001  fredette file psl.h was added on branch nathanw_sa on 2001-06-14 13:12:52 +0000
 1.8 12-Jan-2009  tsutsui Add parantheses to macro to suppress possible compiler warnings.
 1.7 28-Apr-2008  martin branches: 1.7.8;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.76; 1.6.78;
merge ktrace-lwp.
 1.5 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 30-Nov-2001  fredette branches: 1.4.16; 1.4.24;
Purge vm_offset_t.
 1.3 27-Jun-2001  fredette branches: 1.3.2; 1.3.8;
Now define kernel_context() and restore_context(), these
are used by some sun68k common code.
 1.2 08-Jun-2001  fredette Added comments and fixed some macros now that I correctly
understand how to address the sun2 VME bus in the VM hardware.
 1.1 29-Mar-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 29-Mar-2001  bouyer file pte.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +0000
 1.3.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.8.1 27-Jun-2001  nathanw file pte.h was added on branch nathanw_sa on 2002-01-08 00:28:09 +0000
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.24.1 29-Apr-2005  kent sync with -current
 1.4.16.1 24-Jan-2005  skrll Sync with HEAD.
 1.6.78.2 04-May-2009  yamt sync with head.
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file ptrace.h was added on branch nathanw_sa on 2001-04-06 13:13:06 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file ptrace.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file reg.h was added on branch nathanw_sa on 2001-04-06 13:13:06 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file reg.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +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:08:31 +0000
 1.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file setjmp.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file signal.h was added on branch nathanw_sa on 2001-04-06 13:13:06 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file signal.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +0000
 1.2 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.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file stdarg.h was added on branch nathanw_sa on 2001-04-06 13:13:06 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file stdarg.h was added on branch thorpej_scsipi on 2001-04-21 17:54:53 +0000
 1.2 11-Dec-2005  christos branches: 1.2.18;
merge ktrace-lwp.
 1.1 11-Jul-2005  christos branches: 1.1.6;
Add m68k sunos_machdep.h
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 11-Jul-2005  skrll file sunos_machdep.h was added on branch ktrace-lwp on 2005-11-10 13:59:38 +0000
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file sunos_machdep.h was added on branch yamt-lazymbuf on 2006-06-21 14:57:05 +0000
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file trap.h was added on branch nathanw_sa on 2001-04-06 13:13:06 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file trap.h was added on branch thorpej_scsipi on 2001-04-21 17:54:54 +0000
 1.15 14-Jan-2024  thorpej Merge common sun68k types defns into <sun68k/types.h>.
 1.14 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.13 01-Apr-2021  simonb Whitespace: #define<tab>
 1.12 08-May-2018  christos branches: 1.12.14; 1.12.16;
make as not having pmap statistics available
 1.11 17-Jan-2012  joerg branches: 1.11.46;
Introduce __HAVE_NO___THREAD for sun2 and vax to disable the TLS usage.
Require __HAVE_TLS_VARIANT_I or __HAVE_TLS_VARIANT_II as well as
__lwp_getprivate_fast / __lwp_gettcb_fast to exist for libpthread.
Define VAX as going to use TLS variant I, if it is ever implemented.
 1.10 12-Jun-2011  rmind branches: 1.10.2; 1.10.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.9 20-Jan-2008  joerg branches: 1.9.32; 1.9.42;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.8 17-Oct-2007  garbled branches: 1.8.2; 1.8.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.7 14-Jul-2007  ad branches: 1.7.10;
Generic soft interrupts are mandatory.
 1.6 03-Sep-2006  gdamore branches: 1.6.12; 1.6.20;
Convert to timecounters. Since sun2 lacks a separate timer for microsecond
interpolation, we just use the default clock interrupt timer. (100Hz)
 1.5 03-Sep-2006  gdamore Oops, forgot to commit __HAVE_GENERIC_TODR. :-)
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8;
merge ktrace-lwp.
 1.3 18-Jan-2005  chs branches: 1.3.8;
sun2 no longer abuses cf_unit.
 1.2 28-Feb-2002  simonb branches: 1.2.16; 1.2.24;
Use "#define<tab>".
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added.
 1.1.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 06-Apr-2001  nathanw file types.h was added on branch nathanw_sa on 2002-04-01 07:43:19 +0000
 1.1.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file types.h was added on branch thorpej_scsipi on 2001-04-21 17:54:54 +0000
 1.2.24.1 29-Apr-2005  kent sync with -current
 1.2.16.1 24-Jan-2005  skrll Sync with HEAD.
 1.3.8.3 21-Jan-2008  yamt sync with head
 1.3.8.2 03-Sep-2007  yamt sync with head.
 1.3.8.1 30-Dec-2006  yamt sync with head.
 1.4.8.1 14-Sep-2006  yamt sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.6.20.1 03-Oct-2007  garbled Sync with HEAD
 1.6.12.1 15-Jul-2007  ad Sync with head.
 1.7.10.2 23-Mar-2008  matt sync with HEAD
 1.7.10.1 06-Nov-2007  matt sync with HEAD
 1.8.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.8.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.32.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.11.46.1 21-May-2018  pgoyette Sync with HEAD
 1.12.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 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.1 24-Apr-2001  fredette branches: 1.1.8;
Added these required headers.
 1.1.8.2 24-Apr-2001  fredette Added these required headers.
 1.1.8.1 24-Apr-2001  fredette file varargs.h was added on branch nathanw_sa on 2001-04-24 14:42:33 +0000
 1.1 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.16 10-Aug-2020  rin Clean up _LKM --> _MODULE leftovers.

Note that _KERNEL is always defined for modules.
 1.15 07-Jan-2013  chs switch to __USE_TOPDOWN_VM.
 1.14 06-Nov-2010  uebayasi branches: 1.14.8; 1.14.18;
Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.13 06-Mar-2009  joerg branches: 1.13.2; 1.13.4;
Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.12 28-Apr-2008  martin branches: 1.12.8; 1.12.14;
Remove clause 3 and 4 from TNF licenses
 1.11 25-Oct-2007  yamt branches: 1.11.16; 1.11.18; 1.11.20;
defparam PAGER_MAP_SIZE.
 1.10 02-Apr-2003  thorpej branches: 1.10.18; 1.10.60; 1.10.78; 1.10.80; 1.10.84;
Use PAGE_SIZE rather than NBPG.
 1.9 01-Apr-2003  thorpej Make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK a compile-time constant on Sun2.
 1.8 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.7 30-Nov-2001  fredette Purge vm_offset_t.
 1.6 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.5 14-Jun-2001  fredette branches: 1.5.2; 1.5.8;
Under _LKM, now undefine KERNBASE for declaring it.
Not sure if this is correct, but the real question
is whether 68000 LKMs are even possible.
 1.4 01-May-2001  thorpej Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.3 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
Be paranoid, #undef PAGER_MAP_SIZE before defining it.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file vmparam.h was added on branch thorpej_scsipi on 2001-04-21 17:54:54 +0000
 1.5.8.3 11-Dec-2002  thorpej Sync with HEAD.
 1.5.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.8.1 14-Jun-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:28:09 +0000
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.84.1 13-Nov-2007  bouyer Sync with HEAD
 1.10.80.1 06-Nov-2007  matt sync with HEAD
 1.10.78.1 28-Oct-2007  joerg Sync with HEAD.
 1.10.60.1 03-Dec-2007  ad Sync with HEAD.
 1.10.18.1 27-Oct-2007  yamt sync with head.
 1.11.20.2 04-May-2009  yamt sync with head.
 1.11.20.1 16-May-2008  yamt sync with head.
 1.11.18.1 18-May-2008  yamt sync with head.
 1.11.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.12.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.4.1 05-Mar-2011  rmind sync with head
 1.13.2.1 26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.14.18.1 25-Feb-2013  tls resync with head
 1.14.8.1 23-Jan-2013  yamt sync with head
 1.1 27-Jun-2001  fredette branches: 1.1.8;
Just include a common header.
 1.1.8.2 27-Jun-2001  fredette Just include a common header.
 1.1.8.1 27-Jun-2001  fredette file vuid_event.h was added on branch nathanw_sa on 2001-06-27 19:19:24 +0000
 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:41:49 +0000
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 22-Mar-2002  fredette branches: 1.3.12;
Added bits to use the console code under sys/arch/sun2 and
sys/dev/sun.
 1.2 27-Jun-2001  fredette branches: 1.2.2; 1.2.8;
Now don't include zsvar.h until the end. splzs() is
now defined in machine/cpu.h. Define zs_peripheral_type.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file z8530var.h was added on branch thorpej_scsipi on 2001-04-21 17:54:54 +0000
 1.2.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.8.1 27-Jun-2001  nathanw file z8530var.h was added on branch nathanw_sa on 2002-04-01 07:43:20 +0000
 1.2.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.12.1 03-Aug-2004  skrll Sync with HEAD
 1.4 27-Jun-2001  fredette Made these files part of the sun68k common code.
 1.3 30-May-2001  lukem add missing #include "opt_kgdb.h"
 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 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.3 21-Apr-2001  bouyer Convert to thorpej_scsipi
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file autoconf.c was added on branch thorpej_scsipi on 2001-04-21 17:54:54 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.128; 1.1.130; 1.1.132;
Added.
 1.1.132.1 16-May-2008  yamt sync with head.
 1.1.130.1 18-May-2008  yamt sync with head.
 1.1.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file buserr.h was added on branch nathanw_sa on 2001-04-06 15:05:56 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file buserr.h was added on branch thorpej_scsipi on 2001-04-21 17:54:54 +0000
 1.18 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.17 14-Jan-2024  thorpej Don't bother with isr_add_custom(). It's just a thin wrapper around
vec_set_entry(), so just use vec_set_entry() directly.
 1.16 28-Jan-2010  mbalmer Fix language.
 1.15 06-Jul-2008  tsutsui Split device_t/softc with misc cosmetic changes.
 1.14 05-Apr-2008  tsutsui branches: 1.14.4; 1.14.6; 1.14.8;
Use generic atomic_cas_uint() for mutex(9) and rwlock(9), and
remodel old RAS based _lock_cas() implementation for m68010
into genereic atomic_cas_32().
Now sun2 kernel compiles and even works on multiuser. (hehe)

Tested on tme (emulationg 2/120 and 3/150) and (real) 3/80.
 1.13 26-Jan-2008  tsutsui branches: 1.13.6;
Also account idepth in clock interrupt handlers
(which are registered directly by isr_add_custom())
and use the idepth value for CLKF_INTR().
 1.12 12-Mar-2007  thorpej branches: 1.12.18; 1.12.24;
- Define LOCK_CAS_CHECK() in m68k/frame.h (there because it operates on
a clockframe).
- Call LOCK_CAS_CHECK() in clock_intr() (noted by Izumi Tsutsui).
 1.11 03-Sep-2006  gdamore branches: 1.11.8; 1.11.12;
Convert to timecounters. Since sun2 lacks a separate timer for microsecond
interpolation, we just use the default clock interrupt timer. (100Hz)
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8;
merge ktrace-lwp.
 1.9 22-Jan-2005  chs branches: 1.9.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.8 13-Dec-2004  chs branches: 1.8.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.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 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Jun-2001  fredette branches: 1.2.2; 1.2.8;
Converted to use the new bus-specific attach args,
and the bus_space_peek_N functions.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file clock.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.2.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.8.1 27-Jun-2001  nathanw file clock.c was added on branch nathanw_sa on 2002-10-18 02:40:14 +0000
 1.2.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.5.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.5.6.4 18-Dec-2004  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.8.2.1 29-Apr-2005  kent sync with -current
 1.9.8.3 04-Feb-2008  yamt sync with head.
 1.9.8.2 03-Sep-2007  yamt sync with head.
 1.9.8.1 30-Dec-2006  yamt sync with head.
 1.10.8.1 14-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.12.1 13-Mar-2007  ad Sync with head.
 1.11.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.24.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.18.1 23-Mar-2008  matt sync with HEAD
 1.13.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.13.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.8.1 18-Jul-2008  simonb Sync with head.
 1.14.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.14.4.2 11-Mar-2010  yamt sync with head
 1.14.4.1 04-May-2009  yamt sync with head.
 1.8 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.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 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.5 17-Jun-2002  christos MD systrace gluons.
 1.4 12-Jan-2002  manu branches: 1.4.8;
Added clockctl
 1.3 13-Jul-2001  fredette branches: 1.3.6;
Now mimic the sparc64's handling of NKBD/NSUNKBD and NMS/NSUNMS.
 1.2 27-Jun-2001  fredette branches: 1.2.2;
Added support for the PROM console.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file conf.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.2.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.3.6.6 11-Nov-2002  nathanw Catch up to -current
 1.3.6.5 17-Sep-2002  nathanw Catch up to -current.
 1.3.6.4 01-Aug-2002  nathanw Catch up to -current.
 1.3.6.3 20-Jun-2002  nathanw Catch up to -current.
 1.3.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.6.1 13-Jul-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:12:21 +0000
 1.4.8.3 21-Jul-2002  gehenna catch up with -current.
 1.4.8.2 15-Jul-2002  gehenna catch up with -current.
 1.4.8.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.74; 1.5.76; 1.5.78;
merge ktrace-lwp.
 1.4 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 15-Jul-2003  lukem branches: 1.3.8;
__KERNEL_RCSID()
 1.2 30-Nov-2001  fredette branches: 1.2.16;
vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 06-Apr-2001  nathanw file control.c was added on branch nathanw_sa on 2002-01-08 00:28:10 +0000
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file control.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.2.16.4 24-Jan-2005  skrll Sync with HEAD.
 1.2.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.16.1 03-Aug-2004  skrll Sync with HEAD
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.74; 1.5.76; 1.5.78;
merge ktrace-lwp.
 1.4 23-Apr-2004  simonb s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
 1.3 14-Jun-2001  fredette branches: 1.3.8; 1.3.24;
Now get the prototypes from the common sun68k/sun68k/control.h.
 1.2 06-Apr-2001  fredette branches: 1.2.2;
Gratuitous comment changes.
 1.1 29-Mar-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 06-Apr-2001  bouyer file control.h was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 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.3.8.2 14-Jun-2001  fredette Now get the prototypes from the common sun68k/sun68k/control.h.
 1.3.8.1 14-Jun-2001  fredette file control.h was added on branch nathanw_sa on 2001-06-14 16:36:47 +0000
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Removed. These files can be found under arch/sun68k now.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file ctrlsp.S was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.12 06-Jun-2010  mrg implement ddb help for sun2/sun3 commands. PR#38310 and PR#38308.
 1.11 28-Apr-2008  martin branches: 1.11.20; 1.11.22;
Remove clause 3 and 4 from TNF licenses
 1.10 17-Oct-2007  garbled branches: 1.10.16; 1.10.18; 1.10.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.9 22-Sep-2007  martin Add a new option DDB_VERBOSE_HELP that adds online help to ddb.
From Adam Hamsik.
Minor modifications by me, all bugs are probably mine.
 1.8 04-Mar-2007  he branches: 1.8.2; 1.8.10; 1.8.18; 1.8.20;
Fix fallout from bool conversion.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 03-Jun-2005  tsutsui branches: 1.6.2;
- Adapt to ddb constification.
- Add const.
 1.5 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 15-Jul-2003  lukem branches: 1.4.8;
__KERNEL_RCSID()
 1.3 01-Apr-2003  thorpej branches: 1.3.2;
Use PAGE_SIZE rather than NBPG.
 1.2 11-Jun-2001  fredette branches: 1.2.8;
Fixed pte_print to display the correct names
for VME device pages.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file db_machdep.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.2.8.2 11-Jun-2001  fredette Fixed pte_print to display the correct names
for VME device pages.
 1.2.8.1 11-Jun-2001  fredette file db_machdep.c was added on branch nathanw_sa on 2001-06-11 21:36:00 +0000
 1.3.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.6.2.2 27-Oct-2007  yamt sync with head.
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.20.1 06-Nov-2007  matt sync with HEAD
 1.8.18.1 02-Oct-2007  joerg Sync with HEAD.
 1.8.10.1 03-Oct-2007  garbled Sync with HEAD
 1.8.2.1 09-Oct-2007  ad Sync with head.
 1.10.20.2 11-Aug-2010  yamt sync with head.
 1.10.20.1 16-May-2008  yamt sync with head.
 1.10.18.1 18-May-2008  yamt sync with head.
 1.10.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.22.1 03-Jul-2010  rmind sync with head
 1.11.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 03-Jun-2005  tsutsui Adapt to ddb constification.
 1.5 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 15-Jul-2003  lukem branches: 1.4.8;
__KERNEL_RCSID()
 1.3 30-Nov-2001  fredette branches: 1.3.16;
vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.2 18-Apr-2001  fredette branches: 1.2.2; 1.2.4; 1.2.10;
Fixed a bug in db_write_text where on exit we would bash
a PTE in whatever user context happened to be set on
entry.
 1.1 06-Apr-2001  fredette Added.
 1.2.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.10.1 18-Apr-2001  nathanw file db_memrw.c was added on branch nathanw_sa on 2002-01-08 00:28:10 +0000
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 18-Apr-2001  bouyer file db_memrw.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.3.16.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.16.4 24-Jan-2005  skrll Sync with HEAD.
 1.3.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Removed. These files can be found under arch/sun68k now.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file disksubr.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.5 19-Jun-2024  rin sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules

Finally fix sun2 build for PR kern/58346
 1.4 28-Apr-2008  martin branches: 1.4.118;
Remove clause 3 and 4 from TNF licenses
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.76; 1.3.78;
merge ktrace-lwp.
 1.2 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.26; 1.1.34;
Added.
 1.1.34.1 29-Apr-2005  kent sync with -current
 1.1.26.1 24-Jan-2005  skrll Sync with HEAD.
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file enable.h was added on branch nathanw_sa on 2001-04-06 15:05:57 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file enable.h was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.118.1 22-Jun-2024  martin Pull up following revision(s) (requested by pgoyette in ticket #724):

sys/modules/compat_netbsd32_16/Makefile: revision 1.5
sys/arch/powerpc/powerpc/compat_16_machdep.c: revision 1.25
sys/arch/powerpc/powerpc/compat_16_machdep.c: revision 1.26
sys/modules/compat_16/Makefile: revision 1.3
sys/modules/compat_netbsd32_13/Makefile: revision 1.5
sys/modules/compat_16/Makefile: revision 1.4
sys/arch/sun2/sun2/genassym.cf: revision 1.17
sys/arch/sun2/sun2/enable.h: revision 1.5
sys/modules/compat_13/Makefile: revision 1.3
sys/modules/compat_13/Makefile: revision 1.4
sys/modules/compat_13/Makefile: revision 1.5
sys/arch/mips/mips/netbsd32_machdep_16.c: revision 1.8
sys/modules/Makefile.compat: revision 1.1
sys/arch/mips/mips/netbsd32_machdep_13.c: revision 1.4
share/mk/bsd.kmodule.mk: revision 1.86
sys/arch/aarch64/aarch64/netbsd32_machdep_16.c: revision 1.4
sys/arch/powerpc/powerpc/compat_13_machdep.c: revision 1.23
sys/arch/aarch64/aarch64/netbsd32_machdep_13.c: revision 1.4

Import AFLAGS to allow processing of assembler files in modules.
Prerequisite for kern/583346.

Introduce sys/modules/Makefile.compat and hook some compat_1[36]
machdep code into the modules. kern/58346

Ooops missed a source file!

Proteect #include of kernel options files with #ifdef _KERNEL_OPT

XXX Add to existing 10.0 and 9.0 tickets for kern/583346

Include required headers

Add required include for compat_16 machdep code

fix the m68k compat_13 build.

include Makefile.assym to generate assym.h.
use -I. and -x assembler-with-cpp to actually use cpp and find assym.h.
also apply m68k assym.h fix here as well as compat_13.

powerpc64: Provide dummy stubs for compat1[36]
as done for amd64. We haven't had working userland for powerpc64,
and therefore compatible to 1.[36] is only useful for netbsd32.

Fix build failure for evbppc64 for PR kern/58346 (my bug!).
sun2/genassym.cf: Skip KERNBASE for _MODULE
as it is not a compile-time constant; see sun2/vmparam.h.

It should not be, and is not actually, used for modules.

PR kern/58346

sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules
Finally fix sun2 build for PR kern/58346
 1.5 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.4 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.3 11-Dec-2005  christos branches: 1.3.100; 1.3.106; 1.3.108;
merge ktrace-lwp.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10; 1.1.26;
Added.
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.10.2 06-Apr-2001  fredette Added.
 1.1.10.1 06-Apr-2001  fredette file fc.h was added on branch nathanw_sa on 2001-04-06 15:05:57 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file fc.h was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.3.108.1 17-Feb-2011  bouyer Sync with HEAD
 1.3.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.100.1 05-Mar-2011  rmind sync with head
 1.3 08-May-2001  fredette branches: 1.3.8;
Removed, cleaning up (no-)FPU support.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
In fpu_probe, now be sure to return FPU_NONE. Returning
FPU_UNKNOWN was causing confusion in cpu_switch.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file fpu.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.3.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.2 30-Nov-2001  fredette Convert to use genassym.cf and genassym.sh, as other ports do.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added.
 1.1.10.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.1.10.1 06-Apr-2001  scw file genassym.c was added on branch nathanw_sa on 2001-11-18 19:45:50 +0000
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file genassym.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.17 19-Jun-2024  rin sun2/genassym.cf: Skip KERNBASE for _MODULE

as it is not a compile-time constant; see sun2/vmparam.h.

It should not be, and is not actually, used for modules.

PR kern/58346
 1.16 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.15 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.14 20-Feb-2020  skrll branches: 1.14.24;
G/C
 1.13 17-Feb-2020  skrll G/C LS{SLEEP,RUN,ONPROC}

LWP status manipulation was moved out of assembly long ago.
 1.12 19-Dec-2018  maxv branches: 1.12.6;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.11 10-Dec-2009  rmind branches: 1.11.62; 1.11.64;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.10 20-Sep-2008  tsutsui Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573. Approved by martin@.
 1.9 17-Oct-2007  garbled branches: 1.9.16; 1.9.20; 1.9.22; 1.9.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.8 18-May-2007  tsutsui branches: 1.8.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.7 11-Dec-2005  christos branches: 1.7.30; 1.7.32; 1.7.38;
merge ktrace-lwp.
 1.6 04-Nov-2003  dsl branches: 1.6.16;
Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.5 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.4 21-Sep-2003  cl make compile
 1.3 18-Jan-2003  thorpej branches: 1.3.2;
Merge the nathanw_sa branch.
 1.2 11-May-2002  jdolecek use _KERNEL_OPT rather than _KERNEL && !_LKM
 1.1 30-Nov-2001  fredette branches: 1.1.2; 1.1.4;
Convert to use genassym.cf and genassym.sh, as other ports do.
 1.1.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 30-Nov-2001  thorpej file genassym.cf was added on branch kqueue on 2002-01-10 19:49:38 +0000
 1.1.2.4 05-Oct-2002  gmcgarry LWPify
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 30-Nov-2001  nathanw file genassym.cf was added on branch nathanw_sa on 2002-01-08 00:28:10 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 03-Sep-2007  yamt sync with head.
 1.7.38.1 22-May-2007  matt Update to HEAD.
 1.7.32.1 11-Jul-2007  mjf Sync with head.
 1.7.30.1 27-May-2007  ad Sync with head.
 1.8.10.1 06-Nov-2007  matt sync with HEAD
 1.9.26.1 19-Oct-2008  haad Sync with HEAD.
 1.9.22.1 10-Oct-2008  skrll Sync with HEAD.
 1.9.20.2 11-Mar-2010  yamt sync with head
 1.9.20.1 04-May-2009  yamt sync with head.
 1.9.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.11.64.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.64.1 10-Jun-2019  christos Sync with HEAD
 1.11.62.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.12.6.1 29-Feb-2020  ad Sync with head.
 1.14.24.1 22-Jun-2024  martin Pull up following revision(s) (requested by pgoyette in ticket #724):

sys/modules/compat_netbsd32_16/Makefile: revision 1.5
sys/arch/powerpc/powerpc/compat_16_machdep.c: revision 1.25
sys/arch/powerpc/powerpc/compat_16_machdep.c: revision 1.26
sys/modules/compat_16/Makefile: revision 1.3
sys/modules/compat_netbsd32_13/Makefile: revision 1.5
sys/modules/compat_16/Makefile: revision 1.4
sys/arch/sun2/sun2/genassym.cf: revision 1.17
sys/arch/sun2/sun2/enable.h: revision 1.5
sys/modules/compat_13/Makefile: revision 1.3
sys/modules/compat_13/Makefile: revision 1.4
sys/modules/compat_13/Makefile: revision 1.5
sys/arch/mips/mips/netbsd32_machdep_16.c: revision 1.8
sys/modules/Makefile.compat: revision 1.1
sys/arch/mips/mips/netbsd32_machdep_13.c: revision 1.4
share/mk/bsd.kmodule.mk: revision 1.86
sys/arch/aarch64/aarch64/netbsd32_machdep_16.c: revision 1.4
sys/arch/powerpc/powerpc/compat_13_machdep.c: revision 1.23
sys/arch/aarch64/aarch64/netbsd32_machdep_13.c: revision 1.4

Import AFLAGS to allow processing of assembler files in modules.
Prerequisite for kern/583346.

Introduce sys/modules/Makefile.compat and hook some compat_1[36]
machdep code into the modules. kern/58346

Ooops missed a source file!

Proteect #include of kernel options files with #ifdef _KERNEL_OPT

XXX Add to existing 10.0 and 9.0 tickets for kern/583346

Include required headers

Add required include for compat_16 machdep code

fix the m68k compat_13 build.

include Makefile.assym to generate assym.h.
use -I. and -x assembler-with-cpp to actually use cpp and find assym.h.
also apply m68k assym.h fix here as well as compat_13.

powerpc64: Provide dummy stubs for compat1[36]
as done for amd64. We haven't had working userland for powerpc64,
and therefore compatible to 1.[36] is only useful for netbsd32.

Fix build failure for evbppc64 for PR kern/58346 (my bug!).
sun2/genassym.cf: Skip KERNBASE for _MODULE
as it is not a compile-time constant; see sun2/vmparam.h.

It should not be, and is not actually, used for modules.

PR kern/58346

sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules
Finally fix sun2 build for PR kern/58346
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.74; 1.6.76; 1.6.78;
merge ktrace-lwp.
 1.5 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 15-Jul-2003  lukem branches: 1.4.8;
__KERNEL_RCSID()
 1.3 01-Apr-2003  thorpej branches: 1.3.2;
Use PAGE_SIZE rather than NBPG.
 1.2 30-Nov-2001  fredette vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 06-Apr-2001  nathanw file idprom.c was added on branch nathanw_sa on 2002-01-08 00:28:11 +0000
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file idprom.c was added on branch thorpej_scsipi on 2001-04-21 17:54:55 +0000
 1.3.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 27-Jun-2001  fredette Made these files part of the sun68k common code.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file isr.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Removed. These files can be found under arch/sun68k now.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file kgdb_machdep.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.9 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.8 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.7 28-Apr-2008  martin branches: 1.7.86; 1.7.88;
Remove clause 3 and 4 from TNF licenses
 1.6 04-Mar-2007  christos branches: 1.6.40; 1.6.42; 1.6.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5 11-Dec-2005  christos branches: 1.5.26;
merge ktrace-lwp.
 1.4 22-Jan-2005  chs branches: 1.4.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 15-Jul-2003  lukem branches: 1.3.8;
__KERNEL_RCSID()
 1.2 30-Nov-2001  fredette branches: 1.2.16;
vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 06-Apr-2001  nathanw file leds.c was added on branch nathanw_sa on 2002-01-08 00:28:11 +0000
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file leds.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.2.16.4 24-Jan-2005  skrll Sync with HEAD.
 1.2.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.16.1 03-Aug-2004  skrll Sync with HEAD
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.4.8.1 03-Sep-2007  yamt sync with head.
 1.5.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.44.1 16-May-2008  yamt sync with head.
 1.6.42.1 18-May-2008  yamt sync with head.
 1.6.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.88.1 10-Jun-2019  christos Sync with HEAD
 1.7.86.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.38 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.37 17-Jan-2024  thorpej Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.36 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.35 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.34 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.33 13-Jan-2024  thorpej G/C unreferenced copies of _spl() and _splraise().
 1.32 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.31 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.30 12-Jan-2024  thorpej Remove getsp(); nothing uses it.
 1.29 16-Mar-2022  andvar branches: 1.29.4;
s/paniced/panicked/ and s/borken/broken/ in comments.
 1.28 31-Mar-2021  simonb Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.
 1.27 06-Aug-2019  msaitoh branches: 1.27.8; 1.27.10;
Fix typo in comment. Found by Wataru Ashihara.
 1.26 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.25 24-Mar-2014  christos branches: 1.25.28; 1.25.30;
avoid local redefinitions
 1.24 15-Nov-2011  tsutsui branches: 1.24.10; 1.24.14;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0
 1.23 25-Feb-2010  skrll branches: 1.23.10;
s/cpu_fork/cpu_lwp_fork/ in comment
 1.22 10-Dec-2009  rmind branches: 1.22.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.21 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.20 17-Oct-2007  garbled branches: 1.20.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.19 12-Jun-2007  mhitch branches: 1.19.10;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.18 18-May-2007  tsutsui Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.17 11-Dec-2005  christos branches: 1.17.24; 1.17.30; 1.17.32; 1.17.38; 1.17.40;
merge ktrace-lwp.
 1.16 04-Mar-2004  nathanw branches: 1.16.16;
Centralize identical copies of proc_trampoline code.

(lots more opportunites here for the bored hacker, such as rei and trap0...)
 1.15 21-Sep-2003  cl make compile
 1.14 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.13 18-Jan-2003  thorpej branches: 1.13.2;
Merge the nathanw_sa branch.
 1.12 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.11 07-Dec-2001  fredette Picked up some old scheduler changes. Now the sun2 locore
corresponds tightly to revision 1.81 of the sun3 locore.
 1.10 06-Dec-2001  fredette Tweaked whitespace and, in comments only, added % to make this
file much easier to compare to its sun3 cousin.
 1.9 26-Aug-2001  fredette branches: 1.9.6;
Under __ELF__, getvbr must return its pointer value
in %a0, not %d0. This fixes many problems with
getting the PROM to halt and reboot the machine.
 1.8 16-Aug-2001  fredette Now treat the bus error register as 16-bits wide, even
though it has nothing in the top half. Reading it as
only 8 bits can sometimes give erroneous values. Under
DEBUG, also stash the value read in the buserr_reg global,
since the value is only latched until read.
 1.7 27-Jun-2001  fredette branches: 1.7.2;
Don't set up the g0 and g4 handlers here, now prom_abort()
does this. Include the common m68k 16-bit aligned copy routines.
 1.6 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.5 14-May-2001  fredette Many changes to support ELF. Highlights include:
Added % to all register names. The boot loader now
loads us exactly where we're linked, so no PIC or
remapping funny business. Removed more 68881 code
that is only needed with the real silicon, which
a 68010 will never have.
 1.4 07-May-2001  fredette Turned all lea/jsr combinations back into jbsrs,
as they were originally.
 1.3 10-Apr-2001  fredette branches: 1.3.2;
Under DIAGNOSTIC, disabled a test that was using an
instruction not available on the 68010. Also removed
more old sun3 cache-related code.
 1.2 06-Apr-2001  fredette Added some support for the old-school 'g0' and 'g4' monitor
hooks, and removed some old Sun3 cache and interrupt-register
related code.
 1.1 29-Mar-2001  fredette Added.
 1.3.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.3.2.1 10-Apr-2001  bouyer file locore.s was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.7.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.7.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.9.6.6 11-Nov-2002  nathanw Catch up to -current
 1.9.6.5 05-Oct-2002  gmcgarry LWPify
 1.9.6.4 08-Jan-2002  nathanw Catch up to -current.
 1.9.6.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.9.6.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.9.6.1 26-Aug-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-18 19:45:50 +0000
 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.16.16.1 03-Sep-2007  yamt sync with head.
 1.17.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.17.38.2 26-Jun-2007  garbled Sync with HEAD.
 1.17.38.1 22-May-2007  matt Update to HEAD.
 1.17.32.1 11-Jul-2007  mjf Sync with head.
 1.17.30.2 15-Jul-2007  ad Sync with head.
 1.17.30.1 27-May-2007  ad Sync with head.
 1.17.24.1 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.19.10.1 06-Nov-2007  matt sync with HEAD
 1.20.20.1 11-Mar-2010  yamt sync with head
 1.22.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.23.10.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.23.10.1 17-Apr-2012  yamt sync with head
 1.24.14.1 18-May-2014  rmind sync with head
 1.24.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.30.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.30.1 10-Jun-2019  christos Sync with HEAD
 1.25.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.27.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.27.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.29.4.1 27-Jun-2024  martin Pull up following revision(s) (requested by rin in ticket #724
to fix build fallout on the branch):

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

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

Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.
 1.29 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.28 11-Jul-2020  nia Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.
 1.27 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.26 10-Aug-2012  tsutsui branches: 1.26.38; 1.26.40;
Move cn_tab initialization from late cpu_startup(9) to
early _bootstrap() in locore2.c.
Tested on TME emulating 2/120.
 1.25 17-Jul-2011  joerg branches: 1.25.2;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24 28-Nov-2009  he Cast a vaddr_t (integral type) to void* before passing to memset.
 1.23 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.22 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.21 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.20 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.19 12-Nov-2008  ad branches: 1.19.4;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.18 28-Apr-2008  martin branches: 1.18.6; 1.18.8;
Remove clause 3 and 4 from TNF licenses
 1.17 04-Mar-2007  christos branches: 1.17.40; 1.17.42; 1.17.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.15 11-Dec-2005  christos branches: 1.15.26;
merge ktrace-lwp.
 1.14 19-Jun-2005  thorpej branches: 1.14.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.13 03-Jun-2005  tsutsui Add const.
 1.12 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 15-Jul-2003  lukem branches: 1.11.8;
__KERNEL_RCSID()
 1.10 27-Apr-2003  ragge branches: 1.10.2;
Preserve the symbol table in the LKM || KSYMS cases also.
 1.9 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 02-Aug-2002  soren G/c vestiges of old sun3-specific SYMTAB_SPACE support.
 1.6 30-Nov-2001  fredette branches: 1.6.8;
vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.5 15-Jun-2001  fredette branches: 1.5.2; 1.5.8;
Now unmap the PROM's pages only after we have
installed our own vector table.
 1.4 14-May-2001  fredette Made changes to support ELF. Highlights include:
To find the kernel symbol table, instead of expecting
the old a.out struct exec from locore.s, use the
ELF headers found after the kernel text.
 1.3 06-Apr-2001  fredette branches: 1.3.2;
vm/vm.h -> uvm/uvm_extern.h
Cleaned up definitions of cputype and mmutype.
mon.h -> promlib.h, and use all of the new prom_
functions instead of the old mon_ functions.
Removed all of the old mon_ capturing code to
promlib.c.
 1.2 29-Mar-2001  fredette Removed some sun3 references.
 1.1 29-Mar-2001  fredette Added.
 1.3.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.3.2.1 06-Apr-2001  bouyer file locore2.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.5.8.7 05-Oct-2002  gmcgarry LWPify
 1.5.8.6 13-Aug-2002  nathanw Catch up to -current.
 1.5.8.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.5.8.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.5.8.3 08-Jan-2002  nathanw Catch up to -current.
 1.5.8.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.5.8.1 15-Jun-2001  scw file locore2.c was added on branch nathanw_sa on 2001-11-18 19:45:50 +0000
 1.5.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.8.1 31-Aug-2002  gehenna catch up with -current.
 1.10.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.4 24-Jan-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.11.8.1 29-Apr-2005  kent sync with -current
 1.14.2.2 03-Sep-2007  yamt sync with head.
 1.14.2.1 26-Feb-2007  yamt sync with head.
 1.15.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.15.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.17.44.4 11-Mar-2010  yamt sync with head
 1.17.44.3 19-Aug-2009  yamt sync with head.
 1.17.44.2 04-May-2009  yamt sync with head.
 1.17.44.1 16-May-2008  yamt sync with head.
 1.17.42.1 18-May-2008  yamt sync with head.
 1.17.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.17.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.8.2 03-Mar-2009  skrll Sync with HEAD.
 1.18.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.19.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.2.1 30-Oct-2012  yamt sync with head
 1.26.40.1 10-Jun-2019  christos Sync with HEAD
 1.26.38.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.86 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.85 02-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage DVMA mappings.
 1.84 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.83 11-Jun-2020  ad uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
 1.82 08-Mar-2020  rin Support module(7).
 1.81 08-Mar-2020  rin Sort headers.
 1.80 31-Dec-2019  ad Rename uvm_free() -> uvm_availmem().
 1.79 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.78 03-Jun-2019  msaitoh Fix typo in comment(s/similiar/similar/).
 1.77 24-Mar-2014  christos branches: 1.77.10; 1.77.20; 1.77.30;
- remove unused
- use cpu_{g,s}etmodel
 1.76 10-Aug-2012  tsutsui branches: 1.76.2; 1.76.4;
Move cn_tab initialization from late cpu_startup(9) to
early _bootstrap() in locore2.c.
Tested on TME emulating 2/120.
 1.75 30-Jul-2012  christos move console initialization to cpu_startup() so that we avoid multiple common.
 1.74 28-Jul-2012  matt Remove declartions of physmem
 1.73 27-Jul-2012  matt Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.72 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.71 12-Dec-2011  mrg implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

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

fixes PR#45705.
 1.70 12-Jun-2011  rmind branches: 1.70.2; 1.70.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

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

Briefly tested and no obvious breakage on atari, sun3, and x68k.
 1.68 04-Mar-2011  joerg Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.67 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.66 17-Jan-2011  tsutsui branches: 1.66.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.65 08-Feb-2010  joerg branches: 1.65.2; 1.65.4;
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.64 10-Dec-2009  matt branches: 1.64.2;
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds). Should result in no code differences.
 1.63 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.62 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.61 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.60 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.59 21-Jan-2009  he branches: 1.59.2;
Re-adapt to the changed return types for major() and minor().
 1.58 12-Jan-2009  cegger use PRIu64 format to printf major() and minor() values
 1.57 30-Nov-2008  martin As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.56 25-Nov-2008  ad dumpsys: don't spew numbers into the log.
 1.55 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.54 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.53 02-Jul-2008  ad branches: 1.53.2; 1.53.4; 1.53.6;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.52 04-Jun-2008  ad branches: 1.52.2;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.51 28-Apr-2008  martin branches: 1.51.2;
Remove clause 3 and 4 from TNF licenses
 1.50 04-Dec-2007  tsutsui branches: 1.50.12; 1.50.14; 1.50.16;
Adapt sun68k ports to recent interrupt handling changes.

XXX: sun2 (m68010) doesn't have CAS instructions.
 1.49 16-Mar-2007  tsutsui branches: 1.49.12; 1.49.14; 1.49.20; 1.49.22;
Pass proper args to ksyms_init().
 1.48 10-Mar-2007  thorpej branches: 1.48.2; 1.48.4;
Fix more caddr_t fallout.
 1.47 04-Mar-2007  christos branches: 1.47.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.46 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.45 09-Feb-2007  ad branches: 1.45.2;
Merge newlock2 to head.
 1.44 21-Oct-2006  mrg branches: 1.44.2;
in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

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

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

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.43 03-Oct-2006  tsutsui - change find_prom_map() to take paddr_t and return vaddr_t rather than
bus_space_handle_t since bus space handle without bus space tag looks weird
- replace old sun3 obio_find_mapping() with new common find_prom_map()
- add bus_space_vaddr(), from hp300
 1.42 01-Oct-2006  tsutsui First attempt at bus_space(9) support for sun3 with common sun68k/bus.c:
- make sun3 port use common sun68k files as much as possible
- add temporary options _SUN2_ in std.sun2 until sun3 can share all
sun68k files (autoconf.c and isr.c are not yet)
- move sun68kvme declaration temporary as well from files.sun68k to files.sun2
- rename and move sun68k_find_prom_map() function to MD sources since it
can't be shared with sun3
- add bus tag members to struct confargs and initilize them where appropriate

XXX1: MD bus_dma(9) backends are not implemented (yet).
XXX2: more code (obio etc.) should be shared among sun3, sun3x and sun2.
 1.41 24-Dec-2005  perry branches: 1.41.20; 1.41.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40 11-Dec-2005  christos merge ktrace-lwp.
 1.39 05-Jun-2005  he branches: 1.39.2;
There was still a reference to bufpages here (preceded by an XXX comment)
so provide a local extern declaration after it was removed from <sys/buf.h>.
 1.38 25-Apr-2005  lukem Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
 1.37 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.36 22-Jan-2005  chs branches: 1.36.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.35 24-Mar-2004  atatat branches: 1.35.8;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.34 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.33 13-Feb-2004  wiz Uppercase CPU.
 1.32 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.31 04-Dec-2003  atatat Dynamic sysctl.

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

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

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

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

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.28 15-Jul-2003  lukem __KERNEL_RCSID()
 1.27 29-Jun-2003  fvdl branches: 1.27.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.26 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.25 23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.24 03-May-2003  wiz DMA, not dma nor Dma.
 1.23 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.22 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.21 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.20 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.19 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.18 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.17 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.16 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.15 30-May-2002  thorpej Add missing "__volatile" to the declaration of enable_reg_soft (the
extern decl in enable.h already has volatile).
 1.14 20-Mar-2002  christos branches: 1.14.4;
kill remaining PS_STRINGS instances.
 1.13 06-Mar-2002  tsutsui Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
 1.12 30-Nov-2001  fredette vm_offset_t -> vaddr_t or paddr_t, as appropriate.
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
No longer try to protect the kernel with uvm_map_protect,
pmap_bootstrap has already done this.
Now use pmap_kenter_pa/pmap_kremove when dumping, instead
of pmap_enter/pmap_remove.
 1.11 10-Sep-2001  chris branches: 1.11.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.10 06-Sep-2001  fredette branches: 1.10.2;
In _bus_dmamap_load, now check the return value of pmap_extract
under DIAGNOSTIC, and fixed a bug where we weren't putting the
right size into a newly valid map.
 1.9 27-Jun-2001  fredette branches: 1.9.2;
Moved much softint and bus_space/bus_dma code
to the common sun68k code.
 1.8 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.7 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.6 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.5 14-May-2001  fredette As a side-effect of the ELF conversion, the msgbuf
can now be 8K large. Removed more 68881 code that
is only useful if you have the real silicon, which
the 68010 never will.
 1.4 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.3 18-Apr-2001  fredette branches: 1.3.2;
Much bus_dma work. When destroying a map, unload it if it's
loaded. Added more comments. Fixed the perspective of a 24-bit
device from the original sun4 code to match the sun2. For now,
we don't double-map pages into DVMA space by hand, we're back
to using pmap_enter. Be more paranoid about saving and
restoring the MMU user context.
 1.2 10-Apr-2001  fredette Make softintr_handler return one, not zero, to properly
claim the interrupt. Added special bus_space_probe
handling to sun2_bus_map.
 1.1 06-Apr-2001  fredette Added.
 1.3.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.3.2.1 18-Apr-2001  bouyer file machdep.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.9.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.9.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.11.4.12 11-Nov-2002  nathanw Catch up to -current
 1.11.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.11.4.10 05-Oct-2002  gmcgarry LWPify
 1.11.4.9 17-Sep-2002  nathanw Catch up to -current.
 1.11.4.8 27-Aug-2002  nathanw Catch up to -current.
 1.11.4.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.11.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.11.4.5 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.11.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.11.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.11.4.1 10-Sep-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-18 19:45:50 +0000
 1.14.4.4 31-Aug-2002  gehenna catch up with -current.
 1.14.4.3 15-Jul-2002  gehenna catch up with -current.
 1.14.4.2 08-Jun-2002  gehenna fix type of variable.
 1.14.4.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.27.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.27.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.27.2.5 24-Jan-2005  skrll Sync 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 03-Aug-2004  skrll Sync with HEAD
 1.27.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.35.8.1 29-Apr-2005  kent sync with -current
 1.36.2.1 31-Jan-2005  yamt convert arch/sun2 to new apis.
 1.39.2.5 07-Dec-2007  yamt sync with head
 1.39.2.4 03-Sep-2007  yamt sync with head.
 1.39.2.3 26-Feb-2007  yamt sync with head.
 1.39.2.2 30-Dec-2006  yamt sync with head.
 1.39.2.1 21-Jun-2006  yamt sync with head.
 1.41.22.2 22-Oct-2006  yamt sync with head
 1.41.22.1 06-Oct-2006  tsutsui Sync files of recent sun3 and sun68k merge and intersil7170(4) changes
with HEAD to build sun3 kernel on this branch.
 1.41.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.41.20.1 18-Nov-2006  ad Sync with head.
 1.44.2.1 31-Mar-2007  bouyer Pull up following revision(s) (requested by tsutsui in ticket #527):
sys/arch/sun2/sun2/trap.c: revision 1.30
sys/arch/sun2/include/param.h: revision 1.9
sys/arch/sun2/sun2/machdep.c: revision 1.49
Pass proper args to ksyms_init().
Fix compile with options DIAGNOSTIC.
(Hmm, no one has tried it since nathanw_sa merge..)
Bump MAXBSIZE to 0x4000 because 16KB could be used by default
on newfs(8) in these days and we'll get "buf mem pool index 5" panic
in sys/kern/vfs_bio.c.
 1.45.2.3 24-Mar-2007  yamt sync with head.
 1.45.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.45.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.47.2.2 10-Apr-2007  ad Sync with head.
 1.47.2.1 13-Mar-2007  ad Sync with head.
 1.48.4.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.48.2.1 11-Jul-2007  mjf Sync with head.
 1.49.22.1 08-Dec-2007  ad Sync with head.
 1.49.20.1 08-Dec-2007  mjf Sync with HEAD.
 1.49.14.1 09-Jan-2008  matt sync with HEAD
 1.49.12.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.50.16.4 11-Mar-2010  yamt sync with head
 1.50.16.3 19-Aug-2009  yamt sync with head.
 1.50.16.2 04-May-2009  yamt sync with head.
 1.50.16.1 16-May-2008  yamt sync with head.
 1.50.14.2 17-Jun-2008  yamt sync with head.
 1.50.14.1 18-May-2008  yamt sync with head.
 1.50.12.4 17-Jan-2009  mjf Sync with HEAD.
 1.50.12.3 02-Jul-2008  mjf Sync with HEAD.
 1.50.12.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.50.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.51.2.4 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.51.2.3 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.51.2.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.51.2.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.52.2.1 03-Jul-2008  simonb Sync with head.
 1.53.6.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #346):
sys/arch/alpha/alpha/machdep.c: revision 1.311
sys/arch/amiga/amiga/machdep.c: revision 1.211
sys/arch/atari/atari/machdep.c: revision 1.153
sys/arch/hp700/hp700/machdep.c: revision 1.53
sys/arch/i386/i386/dumpsys.c: revision 1.5
sys/arch/mips/mips/mips_machdep.c: revision 1.206
sys/arch/mvme68k/mvme68k/machdep.c: revision 1.132
sys/arch/news68k/news68k/machdep.c: revision 1.75
sys/arch/next68k/next68k/machdep.c: revision 1.88
sys/arch/sparc/sparc/machdep.c: revision 1.285
sys/arch/sparc64/sparc64/machdep.c: revision 1.230
sys/arch/sun2/sun2/machdep.c: revision 1.56
sys/arch/sun3/sun3/machdep.c: revision 1.188
sys/arch/sun3/sun3x/machdep.c: revision 1.114
sys/arch/x68k/x68k/machdep.c: revision 1.153
dumpsys: don't spew numbers into the log.
 1.53.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.53.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.53.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.59.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.64.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.65.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.65.2.3 31-May-2011  rmind sync with head
 1.65.2.2 05-Mar-2011  rmind sync with head
 1.65.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.66.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.66.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.69.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.70.6.1 18-Feb-2012  mrg merge to -current.
 1.70.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.70.2.2 30-Oct-2012  yamt sync with head
 1.70.2.1 17-Apr-2012  yamt sync with head
 1.76.4.1 18-May-2014  rmind sync with head
 1.76.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.77.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.77.30.1 10-Jun-2019  christos Sync with HEAD
 1.77.20.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.77.10.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.16 13-Jan-2024  thorpej Make getsfc() and getdfc() inlines; it's slightly smaller.
 1.15 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.14 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.13 16-Jun-2017  jdolecek dumpconf(void) long doesn't exist, remove the prototype

PR kern/39714 by Henning Petersen
 1.12 11-Dec-2005  christos branches: 1.12.122; 1.12.142;
merge ktrace-lwp.
 1.11 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.10 13-Feb-2004  wiz branches: 1.10.8;
Uppercase CPU, plural is CPUs.
 1.9 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.8 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.7 20-Oct-2002  chs branches: 1.7.6;
merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.6 04-Mar-2002  simonb Don't "extern int cold;" - this is in <sys/kernel.h>.
 1.5 30-Nov-2001  fredette vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.4 27-Jun-2001  fredette branches: 1.4.2; 1.4.8;
Now netintr and sun2_find_prom_map have prototypes in
the common sun68k code. Added prototypes for g0_entry
and g4_entry so that prom_abort() can use them.
 1.3 14-Jun-2001  thorpej Don't need to prototype child_return() here, it's in <sys/proc.h>.
 1.2 14-May-2001  fredette As a side-effect of the ELF conversion, the msgbuf
can now be 8K large. Removed more 68881 code that
is only useful if you have the real silicon, which
the 68010 never will.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file machdep.h was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.4.8.5 11-Nov-2002  nathanw Catch up to -current
 1.4.8.4 05-Oct-2002  gmcgarry LWPify
 1.4.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 27-Jun-2001  nathanw file machdep.h was added on branch nathanw_sa on 2002-01-08 00:28:12 +0000
 1.4.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.12.142.1 28-Aug-2017  skrll Sync with HEAD
 1.12.122.1 03-Dec-2017  jdolecek update from HEAD
 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 07-Jul-2016  msaitoh branches: 1.19.32;
KNF. Remove extra spaces. No functional change.
 1.18 06-Jul-2008  tsutsui branches: 1.18.40; 1.18.60;
Split device_t/softc with misc cosmetic changes.
 1.17 28-Apr-2008  martin branches: 1.17.2; 1.17.4;
Remove clause 3 and 4 from TNF licenses
 1.16 11-Dec-2005  christos branches: 1.16.74; 1.16.76; 1.16.78;
merge ktrace-lwp.
 1.15 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.14 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.13 13-Dec-2004  chs branches: 1.13.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 02-Oct-2002  thorpej branches: 1.11.6;
Add trailing ; to CFATTACH_DECL.
 1.10 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 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.7 15-Dec-2001  fredette Be sure to mark in the prototype attach args
that a physical address is required for each
device on this bus.
 1.6 30-Nov-2001  fredette Implement bus_space_mmap.
 1.5 27-Jun-2001  fredette branches: 1.5.2; 1.5.8;
Converted to use the new bus-specific attach args.
 1.4 14-Jun-2001  fredette Now uses the common sun68k bus_space/bus_dma
and autoconf code.
 1.3 03-May-2001  fredette Now define MBIO_SIZE and MBMEM_SIZE in header files,
so they can eventually be used by the bootblocks.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
The mainbus doesn't define a device name in the attach args
after attaching the special busses, so just match when it
isn't, instead of calling strcmp with it.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file mbio.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.5.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.8.1 27-Jun-2001  nathanw file mbio.c was added on branch nathanw_sa on 2002-01-08 00:28:12 +0000
 1.5.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.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.11.6.4 18-Dec-2004  skrll Sync with HEAD.
 1.11.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.2.1 29-Apr-2005  kent sync with -current
 1.16.78.2 04-May-2009  yamt sync with head.
 1.16.78.1 16-May-2008  yamt sync with head.
 1.16.76.1 18-May-2008  yamt sync with head.
 1.16.74.2 28-Sep-2008  mjf Sync with HEAD.
 1.16.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.1 18-Jul-2008  simonb Sync with head.
 1.17.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.18.60.1 09-Jul-2016  skrll Sync with HEAD
 1.18.40.1 03-Dec-2017  jdolecek update from HEAD
 1.19.32.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.19.32.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.19.32.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 03-May-2001  fredette branches: 1.1.8; 1.1.126; 1.1.128; 1.1.130;
Now define MBIO_SIZE and MBMEM_SIZE in header files,
so they can eventually be used by the bootblocks.
 1.1.130.1 16-May-2008  yamt sync with head.
 1.1.128.1 18-May-2008  yamt sync with head.
 1.1.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 03-May-2001  fredette Now define MBIO_SIZE and MBMEM_SIZE in header files,
so they can eventually be used by the bootblocks.
 1.1.8.1 03-May-2001  fredette file mbio.h was added on branch nathanw_sa on 2001-05-03 03:13:04 +0000
 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 07-Jul-2016  msaitoh branches: 1.20.32;
KNF. Remove extra spaces. No functional change.
 1.19 06-Jul-2008  tsutsui branches: 1.19.40; 1.19.60;
Split device_t/softc with misc cosmetic changes.
 1.18 28-Apr-2008  martin branches: 1.18.2; 1.18.4;
Remove clause 3 and 4 from TNF licenses
 1.17 11-Dec-2005  christos branches: 1.17.74; 1.17.76; 1.17.78;
merge ktrace-lwp.
 1.16 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.15 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14 13-Dec-2004  chs branches: 1.14.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.13 15-Jul-2003  lukem __KERNEL_RCSID()
 1.12 02-Oct-2002  thorpej branches: 1.12.6;
Add trailing ; to CFATTACH_DECL.
 1.11 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 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.8 15-Dec-2001  fredette Be sure to mark in the prototype attach args
that a physical address is required for each
device on this bus.
 1.7 30-Nov-2001  fredette Implement bus_space_mmap.
 1.6 27-Jun-2001  fredette branches: 1.6.2; 1.6.8;
Converted to use the new bus-specific attach args.
 1.5 14-Jun-2001  fredette Now uses the common sun68k bus_space/bus_dma
and autoconf code.
 1.4 03-May-2001  fredette Now define MBIO_SIZE and MBMEM_SIZE in header files,
so they can eventually be used by the bootblocks.
 1.3 18-Apr-2001  fredette branches: 1.3.2;
Added support for creating a bus_dma tag for the mbmem bus.
 1.2 10-Apr-2001  fredette The mainbus doesn't define a device name in the attach args
after attaching the special busses, so just match when it
isn't, instead of calling strcmp with it.
 1.1 06-Apr-2001  fredette Added.
 1.3.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.3.2.1 18-Apr-2001  bouyer file mbmem.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.6.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.6.8.1 27-Jun-2001  nathanw file mbmem.c was added on branch nathanw_sa on 2002-01-08 00:28:12 +0000
 1.6.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.12.6.4 18-Dec-2004  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.14.2.1 29-Apr-2005  kent sync with -current
 1.17.78.2 04-May-2009  yamt sync with head.
 1.17.78.1 16-May-2008  yamt sync with head.
 1.17.76.1 18-May-2008  yamt sync with head.
 1.17.74.2 28-Sep-2008  mjf Sync with HEAD.
 1.17.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.4.1 18-Jul-2008  simonb Sync with head.
 1.18.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.19.60.1 09-Jul-2016  skrll Sync with HEAD
 1.19.40.1 03-Dec-2017  jdolecek update from HEAD
 1.20.32.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.20.32.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.20.32.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.21.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 03-May-2001  fredette branches: 1.1.8; 1.1.126; 1.1.128; 1.1.130;
Now define MBIO_SIZE and MBMEM_SIZE in header files,
so they can eventually be used by the bootblocks.
 1.1.130.1 16-May-2008  yamt sync with head.
 1.1.128.1 18-May-2008  yamt sync with head.
 1.1.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 03-May-2001  fredette Now define MBIO_SIZE and MBMEM_SIZE in header files,
so they can eventually be used by the bootblocks.
 1.1.8.1 03-May-2001  fredette file mbmem.h was added on branch nathanw_sa on 2001-05-03 03:13:04 +0000
 1.17 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.16 10-Mar-2007  thorpej branches: 1.16.38; 1.16.62; 1.16.64; 1.16.74;
Fix more caddr_t fallout.
 1.15 04-Mar-2007  christos branches: 1.15.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14 11-Dec-2005  christos branches: 1.14.26;
merge ktrace-lwp.
 1.13 22-Jan-2005  chs branches: 1.13.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.12 07-Aug-2003  agc branches: 1.12.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 01-Apr-2003  thorpej branches: 1.10.2;
Use PAGE_SIZE rather than NBPG.
 1.9 23-Oct-2002  jdolecek merge kqueue branch into -current

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.8 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.7 22-Mar-2002  fredette branches: 1.7.4;
Added missing DEV_ constants.
 1.6 27-Feb-2002  christos - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.5 30-Nov-2001  fredette vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.4 10-Sep-2001  chris branches: 1.4.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.3 14-Jun-2001  fredette branches: 1.3.2; 1.3.4;
Since physical memory below 0x2000 isn't mapped anywhere
for now, return EFAULT when /dev/mem tries to read it.
Other physical memory not managed by the pmap system is
mapped at the same virtual addresses. Now that we
understand how VME PTEs are constructed, give mmapping
a VME bus a better chance of working..
 1.2 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.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file mem.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 1.3.4.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.3.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.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.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.4.6 11-Nov-2002  nathanw Catch up to -current
 1.4.4.5 17-Sep-2002  nathanw Catch up to -current.
 1.4.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.1 10-Sep-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-01-08 00:28:12 +0000
 1.7.4.1 17-May-2002  gehenna Add the character device switch.
 1.10.2.4 24-Jan-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.8.1 29-Apr-2005  kent sync with -current
 1.13.8.1 03-Sep-2007  yamt sync with head.
 1.14.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.2.1 13-Mar-2007  ad Sync with head.
 1.16.74.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.64.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.16.62.1 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.16.38.1 29-Mar-2008  mjf Add a mem_init() function for each architecture that requests a device
node for /dev/mem, /dev/null, /dev/zero, etc.

This will disappear when I move this code (and others) to be a
pseudo-device. When we have machine-independent mem code this will all be
unnecessary anyway.
 1.3 14-Jun-2011  tsutsui branches: 1.3.2;
Remove duplicated functions that are implemented in machdep.c.

XXX: why do only sun2 and sun3 (and sun3x) have separate mm_md.c?
 1.2 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.1 18-Mar-2010  rmind branches: 1.1.2;
file mm_md.c was initially added on branch rmind-uvmplock.
 1.1.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.3.2.2 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.2.1 14-Jun-2011  cherry file mm_md.c was added on branch cherry-xenmp on 2011-06-23 14:19:44 +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 07-Jul-2016  msaitoh branches: 1.19.32;
KNF. Remove extra spaces. No functional change.
 1.18 06-Jul-2008  tsutsui branches: 1.18.40; 1.18.60;
Split device_t/softc with misc cosmetic changes.
 1.17 28-Apr-2008  martin branches: 1.17.2; 1.17.4;
Remove clause 3 and 4 from TNF licenses
 1.16 11-Dec-2005  christos branches: 1.16.74; 1.16.76; 1.16.78;
merge ktrace-lwp.
 1.15 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.14 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.13 13-Dec-2004  chs branches: 1.13.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 02-Oct-2002  thorpej branches: 1.11.6;
Add trailing ; to CFATTACH_DECL.
 1.10 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 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.7 15-Dec-2001  fredette Be sure to mark in the prototype attach args
that a physical address is required for each
device on this bus.
 1.6 30-Nov-2001  fredette Implement bus_space_mmap.
 1.5 12-Jul-2001  fredette branches: 1.5.6;
Fixed the known obio address range for the Multibus
machines to avoid bwtwo matching on obio.
 1.4 27-Jun-2001  fredette branches: 1.4.2;
Converted to use the new bus-specific attach args.
 1.3 14-Jun-2001  fredette Now uses the common sun68k bus_space/bus_dma
and autoconf code.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
The mainbus doesn't define a device name in the attach args
after attaching the special busses, so just match when it
isn't, instead of calling strcmp with it.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file obio.c was added on branch thorpej_scsipi on 2001-04-21 17:54:56 +0000
 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.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.6.1 12-Jul-2001  nathanw file obio.c was added on branch nathanw_sa on 2002-01-08 00:28:12 +0000
 1.11.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.11.6.4 18-Dec-2004  skrll Sync with HEAD.
 1.11.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.2.1 29-Apr-2005  kent sync with -current
 1.16.78.2 04-May-2009  yamt sync with head.
 1.16.78.1 16-May-2008  yamt sync with head.
 1.16.76.1 18-May-2008  yamt sync with head.
 1.16.74.2 28-Sep-2008  mjf Sync with HEAD.
 1.16.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.1 18-Jul-2008  simonb Sync with head.
 1.17.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.18.60.1 09-Jul-2016  skrll Sync with HEAD
 1.18.40.1 03-Dec-2017  jdolecek update from HEAD
 1.19.32.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.19.32.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.19.32.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 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 07-Jul-2016  msaitoh branches: 1.19.32;
KNF. Remove extra spaces. No functional change.
 1.18 13-Oct-2012  tsutsui branches: 1.18.14;
struct device * -> device_t, struct cfdata * -> cfdata_t (from chs@)
 1.17 06-Jul-2008  tsutsui branches: 1.17.30; 1.17.40;
Split device_t/softc with misc cosmetic changes.
 1.16 28-Apr-2008  martin branches: 1.16.2; 1.16.4;
Remove clause 3 and 4 from TNF licenses
 1.15 11-Dec-2005  christos branches: 1.15.74; 1.15.76; 1.15.78;
merge ktrace-lwp.
 1.14 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.13 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.12 13-Dec-2004  chs branches: 1.12.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 02-Oct-2002  thorpej branches: 1.10.6;
Add trailing ; to CFATTACH_DECL.
 1.9 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 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.6 15-Dec-2001  fredette Be sure to mark in the prototype attach args
that a physical address is required for each
device on this bus.
 1.5 30-Nov-2001  fredette Implement bus_space_mmap.
 1.4 27-Jun-2001  fredette branches: 1.4.2; 1.4.8;
Converted to use the new bus-specific attach args.
 1.3 14-Jun-2001  fredette Now uses the common sun68k bus_space/bus_dma
and autoconf code.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
The mainbus doesn't define a device name in the attach args
after attaching the special busses, so just match when it
isn't, instead of calling strcmp with it.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file obmem.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.4.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 27-Jun-2001  nathanw file obmem.c was added on branch nathanw_sa on 2002-01-08 00:28:13 +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 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.10.6.4 18-Dec-2004  skrll Sync with HEAD.
 1.10.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.1 29-Apr-2005  kent sync with -current
 1.15.78.2 04-May-2009  yamt sync with head.
 1.15.78.1 16-May-2008  yamt sync with head.
 1.15.76.1 18-May-2008  yamt sync with head.
 1.15.74.2 28-Sep-2008  mjf Sync with HEAD.
 1.15.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 18-Jul-2008  simonb Sync with head.
 1.16.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.40.2 03-Dec-2017  jdolecek update from HEAD
 1.17.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.30.1 30-Oct-2012  yamt sync with head
 1.18.14.1 09-Jul-2016  skrll Sync with HEAD
 1.19.32.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.19.32.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.19.32.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.53 27-Jun-2025  andvar Grammar and spelling fixes, mainly in comments. A few in documentation,
logging, test description, and SCSI ASC/ASCQ assignment descriptions.
 1.52 27-Dec-2023  thorpej branches: 1.52.2;
Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.51 22-Dec-2023  thorpej pv_link(): Seed pv_flags for the page with PG_MOD and PG_REF if
the caller pre-set those bits in the PTE (which pmap_enter() does,
based on hints from uvm_fault()), avoiding the slow path in
pmap_is_{referenced,modified}().
 1.50 02-Jun-2023  andvar follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.
also s/beyound/beyond/ and few others along the way, mainly in comments.
 1.49 06-Feb-2022  andvar fix various typos in comments, log messages and documentation.
mainly s/aparently/apparently/ and s/implmented/implemented/.
 1.48 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.47 24-Mar-2014  christos branches: 1.47.6; 1.47.10;
- remove unused
- use cpu_{g,s}etmodel
 1.46 07-Jan-2013  chs branches: 1.46.2;
switch to __USE_TOPDOWN_VM.
 1.45 31-Jan-2012  para branches: 1.45.6;
unbreak the sun2 pmap
 1.44 03-Jun-2011  tsutsui branches: 1.44.2; 1.44.6;
- remove simple_lock(9) and use atomic_ops(3) to account pmap reference count,
perrequest from rmind@
- while here no need to export struct pmap on sun2/sun3/sun3x

No particular problem for a week on hp300 and sun3x kernels with disabled
tcp_vtw which has been broken for a month on low memory machines.
 1.43 11-Dec-2009  tsutsui branches: 1.43.2; 1.43.4; 1.43.6; 1.43.10;
Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun2 pmap sources
and instead define and use sun2_round_seg() and sun2_trunc_seg()
since they are quite pmap implementation dependent
 1.42 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.41 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.40 21-Oct-2009  rmind Remove uarea swap-out functionality:

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

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

Discussed on <tech-kern>, reviewed by <ad>.
 1.39 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.38 10-Dec-2008  pooka branches: 1.38.2;
Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.37 09-Dec-2008  pooka Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.36 28-Apr-2008  martin branches: 1.36.6; 1.36.8;
Remove clause 3 and 4 from TNF licenses
 1.35 27-Apr-2008  tsutsui Make compile with debug options.
 1.34 17-Oct-2007  garbled branches: 1.34.16; 1.34.18; 1.34.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.33 18-May-2007  tsutsui branches: 1.33.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.32 12-Mar-2007  ad branches: 1.32.2; 1.32.8;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.31 22-Feb-2007  thorpej branches: 1.31.4;
TRUE -> true, FALSE -> false
 1.30 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.29 15-Mar-2006  drochner branches: 1.29.16;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.28 11-Dec-2005  christos branches: 1.28.4; 1.28.6; 1.28.8; 1.28.10;
merge ktrace-lwp.
 1.27 29-May-2005  chs branches: 1.27.2;
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.26 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.25 22-Jan-2005  chs branches: 1.25.2; 1.25.6;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.24 15-Jul-2003  lukem branches: 1.24.2; 1.24.6; 1.24.8;
__KERNEL_RCSID()
 1.23 23-Jun-2003  martin branches: 1.23.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.22 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

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

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

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

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

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.20 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.17 08-Mar-2002  thorpej Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:

* Group all information about the backend allocator for a pool in a
separate structure. The pool references this structure, rather than
the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
to become available, but will still fail if it cannot callocate KVA
space for the pages. If this happens, carefully drain all pools using
the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
some pages, and use that information to make draining easier and more
efficient.
* Get rid of PR_URGENT. There was only one use of it, and it could be
dealt with by the caller.

From art@openbsd.org.
 1.16 30-Nov-2001  fredette Catch-up to revision 1.135 of the sun3 pmap. This revision
corresponds tightly to that one.
 1.15 15-Sep-2001  chs branches: 1.15.4;
a whole bunch of changes to improve performance and robustness under load:

- remove special treatment of pager_map mappings in pmaps. this is
required now, since I've removed the globals that expose the address range.
pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
no longer any need to special-case it.
- eliminate struct uvm_vnode by moving its fields into struct vnode.
- rewrite the pageout path. the pager is now responsible for handling the
high-level requests instead of only getting control after a bunch of work
has already been done on its behalf. this will allow us to UBCify LFS,
which needs tighter control over its pages than other filesystems do.
writing a page to disk no longer requires making it read-only, which
allows us to write wired pages without causing all kinds of havoc.
- use a new PG_PAGEOUT flag to indicate that a page should be freed
on behalf of the pagedaemon when it's unlocked. this flag is very similar
to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
pageout fails due to eg. an indirect-block buffer being locked.
this allows us to remove the "version" field from struct vm_page,
and together with shrinking "loan_count" from 32 bits to 16,
struct vm_page is now 4 bytes smaller.
- no longer use PG_RELEASED for swap-backed pages. if the page is busy
because it's being paged out, we can't release the swap slot to be
reallocated until that write is complete, but unlike with vnodes we
don't keep a count of in-progress writes so there's no good way to
know when the write is done. instead, when we need to free a busy
swap-backed page, just sleep until we can get it busy ourselves.
- implement a fast-path for extending writes which allows us to avoid
zeroing new pages. this substantially reduces cpu usage.
- encapsulate the data used by the genfs code in a struct genfs_node,
which must be the first element of the filesystem-specific vnode data
for filesystems which use genfs_{get,put}pages().
- eliminate many of the UVM pagerops, since they aren't needed anymore
now that the pager "put" operation is a higher-level operation.
- enhance the genfs code to allow NFS to use the genfs_{get,put}pages
instead of a modified copy.
- clean up struct vnode by removing all the fields that used to be used by
the vfs_cluster.c code (which we don't use anymore with UBC).
- remove kmem_object and mb_object since they were useless.
instead of allocating pages to these objects, we now just allocate
pages with no object. such pages are mapped in the kernel until they
are freed, so we can use the mapping to find the page to free it.
this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
 1.14 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.13 27-Jun-2001  fredette branches: 1.13.2; 1.13.4;
Don't unmap the PROM's first four physical/virtual pages
inside pmap_bootstrap, instead we will wait until we have
installed our vector table.
 1.12 19-Jun-2001  wiz `accessible' only has one `a'.
 1.11 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.10 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.9 14-May-2001  fredette One bonus of moving to ELF is that the boot loader on the sun2
now loads the kernel into physical memory at the linked address.
So we link the kernel a little lower virtually, but the bootloader
actually will load it higher in physical memory than before.
This allows us to quadruple the size of the msgbuf to 8K, and
we also shuffle around tmp_vpages and the temporary stack.
 1.8 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.7 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.6 22-Apr-2001  thorpej Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
 1.5 21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.4 10-Apr-2001  fredette branches: 1.4.2;
Fixed has_context to return true on the kernel pmap,
which always has context zero. This was causing panics
under DIAGNOSTIC.
 1.3 06-Apr-2001  fredette Now include machine/promlib.h instead of machine/mon.h, and
use the new prom_ functions instead of the old mon_ functions.
Added the internal _pmap_extract_pmeg function, and removed
some old Sun3 cache-related code.
 1.2 28-Mar-2001  fredette Brought up-to-date with revision 1.124 of the Sun3 pmap.
 1.1 28-Mar-2001  fredette Added.
 1.4.2.3 23-Apr-2001  bouyer Sync with HEAD.
 1.4.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.4.2.1 10-Apr-2001  bouyer file pmap.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.13.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.13.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.13.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.15.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.15.4.6 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.15.4.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.15.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.15.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.15.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.15.4.1 15-Sep-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-18 19:45:50 +0000
 1.23.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.23.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.23.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.23.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.23.2.1 03-Aug-2004  skrll Sync with HEAD
 1.24.8.1 29-Apr-2005  kent sync with -current
 1.24.6.1 08-Jun-2005  tron Pull up revision 1.27 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.24.2.1 08-Jun-2005  tron Pull up revision 1.27 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.25.6.1 06-Jun-2005  tron Pull up revision 1.27 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.25.2.1 31-Jan-2005  yamt convert arch/sun2 to new apis.
 1.27.2.3 03-Sep-2007  yamt sync with head.
 1.27.2.2 26-Feb-2007  yamt sync with head.
 1.27.2.1 21-Jun-2006  yamt sync with head.
 1.28.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.28.8.1 01-Apr-2006  yamt sync with head.
 1.28.6.1 22-Apr-2006  simonb Sync with head.
 1.28.4.1 09-Sep-2006  rpaulo sync with head
 1.29.16.2 24-Mar-2007  yamt sync with head.
 1.29.16.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.31.4.2 27-May-2007  ad Sync with head.
 1.31.4.1 13-Mar-2007  ad Sync with head.
 1.32.8.1 22-May-2007  matt Update to HEAD.
 1.32.2.1 11-Jul-2007  mjf Sync with head.
 1.33.10.1 06-Nov-2007  matt sync with HEAD
 1.34.20.3 11-Mar-2010  yamt sync with head
 1.34.20.2 04-May-2009  yamt sync with head.
 1.34.20.1 16-May-2008  yamt sync with head.
 1.34.18.1 18-May-2008  yamt sync with head.
 1.34.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.34.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.36.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.36.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.38.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.43.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.43.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.43.4.1 12-Jun-2011  rmind sync with head
 1.43.2.1 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.44.6.1 18-Feb-2012  mrg merge to -current.
 1.44.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.44.2.2 23-Jan-2013  yamt sync with head
 1.44.2.1 17-Apr-2012  yamt sync with head
 1.45.6.3 03-Dec-2017  jdolecek update from HEAD
 1.45.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45.6.1 25-Feb-2013  tls resync with head
 1.46.2.1 18-May-2014  rmind sync with head
 1.47.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.47.6.1 05-Feb-2017  skrll Sync with HEAD
 1.52.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 07-Dec-2004  chs use the m68k-common procfs_machdep.c on all m68k platforms.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 15-Jul-2001  fredette branches: 1.1.2; 1.1.8; 1.1.24;
Added.
 1.1.24.4 18-Dec-2004  skrll Sync with HEAD.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 15-Jul-2001  fredette Added.
 1.1.8.1 15-Jul-2001  fredette file procfs_machdep.c was added on branch nathanw_sa on 2001-07-15 16:29:30 +0000
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 15-Jul-2001  lukem file procfs_machdep.c was added on branch kqueue on 2001-08-03 04:12:32 +0000
 1.20 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.19 10-Sep-2020  rin Fix tracedump() for sun3 and sun2 by adding __noinline attribute.

It unwinds stack frame by using address of its first argument, which
does not, of course, work if inline-expanded.
 1.18 24-Mar-2014  christos - remove unused
- use cpu_{g,s}etmodel
 1.17 17-Jul-2011  joerg branches: 1.17.2; 1.17.12; 1.17.16;
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.16 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.15 24-Dec-2005  perry branches: 1.15.74; 1.15.76; 1.15.78;
bare asm -> __asm
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 03-Jun-2005  tsutsui branches: 1.13.2;
Add const.
 1.12 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 15-Jul-2003  lukem branches: 1.11.8;
__KERNEL_RCSID()
 1.10 01-Apr-2003  thorpej branches: 1.10.2;
Use PAGE_SIZE rather than NBPG.
 1.9 30-May-2002  thorpej Fix 2 sequence point errors.
 1.8 30-Nov-2001  fredette branches: 1.8.8;
vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.7 01-Oct-2001  fredette branches: 1.7.4;
Added the prom_kbdid function, to help us figure out if
the console keyboard is on the parallel interface or zs1.
 1.6 26-Aug-2001  fredette branches: 1.6.2;
Fixed a bug processing options - we were ORing
an uninitialized auto into boothowto.
 1.5 16-Aug-2001  fredette Made prom_putchar and prom_putstr use the PROM putchar
function instead of framebuffer functions. This makes
serial consoles work again.
 1.4 14-Jun-2001  fredette branches: 1.4.2;
Added a function, prom_sd_target, to translate a PROM
sd unit number into a SCSI target. Now only set up our
g0 and g4 handlers inside prom_abort(), so we're not
normally running with them.
 1.3 14-May-2001  fredette Now, instead of swapping in and out the PROM's segment zero,
swap in and out the mappings for virtual pages zero through three,
which are what the PROM really uses. This is tied to the
move to ELF and the low memory usage changes.
 1.2 10-Apr-2001  fredette branches: 1.2.2;
In prom_init, when making our local copy of the bootparams,
be sure to calculate the shift in terms of chars, not struct
bootparams, and don't shift undefined arguments.
 1.1 06-Apr-2001  fredette Added.
 1.2.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.2.2.1 10-Apr-2001  bouyer file promlib.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.6.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.7.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.7.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.7.4.1 01-Oct-2001  nathanw file promlib.c was added on branch nathanw_sa on 2002-01-08 00:28:13 +0000
 1.8.8.1 15-Jul-2002  gehenna catch up with -current.
 1.10.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.4 24-Jan-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.11.8.1 29-Apr-2005  kent sync with -current
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.15.78.1 16-May-2008  yamt sync with head.
 1.15.76.1 18-May-2008  yamt sync with head.
 1.15.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.16.1 18-May-2014  rmind sync with head
 1.17.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Removed. These files can be found under arch/sun68k now.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file stub.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.8 20-Dec-2007  dsl branches: 1.8.12;
Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.7 09-Feb-2007  ad branches: 1.7.24; 1.7.32; 1.7.36;
Merge newlock2 to head.
 1.6 11-Dec-2005  christos branches: 1.6.20;
merge ktrace-lwp.
 1.5 22-Jan-2005  chs branches: 1.5.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.4 07-Aug-2003  agc branches: 1.4.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 18-Jan-2003  thorpej branches: 1.2.2;
Merge the nathanw_sa branch.
 1.1 06-Apr-2001  fredette branches: 1.1.2; 1.1.10;
Added.
 1.1.10.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.1.10.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.1.10.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.1.10.1 06-Apr-2001  scw file sys_machdep.c was added on branch nathanw_sa on 2001-11-18 19:45:51 +0000
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file sys_machdep.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.2.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.5.8.2 21-Jan-2008  yamt sync with head
 1.5.8.1 26-Feb-2007  yamt sync with head.
 1.6.20.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.7.36.1 02-Jan-2008  bouyer Sync with HEAD
 1.7.32.1 26-Dec-2007  ad Sync with head.
 1.7.24.1 09-Jan-2008  matt sync with HEAD
 1.8.12.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.8.12.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.15 07-Jul-2016  msaitoh KNF. Remove extra spaces. No functional change.
 1.14 06-Jul-2008  tsutsui branches: 1.14.40; 1.14.60;
Split device_t/softc with misc cosmetic changes.
 1.13 03-Sep-2006  gdamore branches: 1.13.56; 1.13.60; 1.13.62; 1.13.64;
Fix compilation error caused by remaining todr_handle. Doh!
 1.12 03-Sep-2006  gdamore Convert to TODR.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.8;
merge ktrace-lwp.
 1.10 22-Jan-2005  chs branches: 1.10.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.9 13-Dec-2004  chs branches: 1.9.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.8 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.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.6;
Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Jun-2001  fredette branches: 1.3.2; 1.3.8;
Converted to use the new bus-specific attach args,
and the bus_space_peek_N functions.
 1.2 11-Jun-2001  fredette Now use hand-defined macros instead of relying
on structure layout to find registers. Added
a VME attachment.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file tod.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.3.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.1 27-Jun-2001  nathanw file tod.c was added on branch nathanw_sa on 2002-10-18 02:40:15 +0000
 1.3.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.6.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.6.6.4 18-Dec-2004  skrll Sync with HEAD.
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.2.1 29-Apr-2005  kent sync with -current
 1.10.8.1 30-Dec-2006  yamt sync with head.
 1.11.8.1 14-Sep-2006  yamt sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.13.64.1 18-Jul-2008  simonb Sync with head.
 1.13.62.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.13.60.1 04-May-2009  yamt sync with head.
 1.13.56.1 28-Sep-2008  mjf Sync with HEAD.
 1.14.60.1 09-Jul-2016  skrll Sync with HEAD
 1.14.40.1 03-Dec-2017  jdolecek update from HEAD
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.2 11-Jun-2001  fredette branches: 1.2.8; 1.2.24; 1.2.32;
Now use hand-defined macros instead of relying
on structure layout to find registers. Added
a VME attachment.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file tod.h was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.2.32.1 29-Apr-2005  kent sync with -current
 1.2.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.2.8.2 11-Jun-2001  fredette Now use hand-defined macros instead of relying
on structure layout to find registers. Added
a VME attachment.
 1.2.8.1 11-Jun-2001  fredette file tod.h was added on branch nathanw_sa on 2001-06-11 21:33:48 +0000
 1.49 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.48 27-Dec-2023  thorpej Re-factor the 680x0 Function Code definitions into their own
separate file (as was done on the sun2/sun3 ports ages ago)
and switch everyone to the common header.
 1.47 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.46 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.45 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

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

Welcome to NetBSD 8.99.37.
 1.44 04-Mar-2015  martin branches: 1.44.18;
Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF
 1.43 19-Feb-2012  rmind branches: 1.43.2; 1.43.16;
Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.42 17-Jan-2011  tsutsui branches: 1.42.6; 1.42.10;
Explicitly include <machine/pcb.h> for struct pcb.
 1.41 20-Dec-2010  matt branches: 1.41.2;
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.40 07-Jul-2010  chs implement ucas_* for m68k.
 1.39 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.38 21-Nov-2009  rmind branches: 1.38.2; 1.38.4;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.37 27-Jan-2009  martin Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.36 15-Oct-2008  wrstuden branches: 1.36.2; 1.36.4;
Merge wrstuden-revivesa into HEAD.
 1.35 24-Apr-2008  ad branches: 1.35.2; 1.35.4; 1.35.8;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.34 05-Nov-2007  ad branches: 1.34.16; 1.34.18;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.33 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.32 12-Jun-2007  mhitch branches: 1.32.8; 1.32.10; 1.32.14;
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.31 18-May-2007  tsutsui Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.30 16-Mar-2007  tsutsui branches: 1.30.4;
Fix compile with options DIAGNOSTIC.
(Hmm, no one has tried it since nathanw_sa merge..)
 1.29 04-Mar-2007  christos branches: 1.29.2; 1.29.4; 1.29.6;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.28 09-Feb-2007  ad branches: 1.28.2;
Merge newlock2 to head.
 1.27 23-Jul-2006  ad branches: 1.27.4; 1.27.8;
Use the LWP cached credentials where sane.
 1.26 19-Jul-2006  ad - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.25 15-May-2006  yamt include kauth.h for kauth_cred_geteuid.
 1.24 14-May-2006  elad integrate kauth.
 1.23 15-Mar-2006  drochner branches: 1.23.2;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.22 25-Feb-2006  wiz branches: 1.22.2; 1.22.4;
Fix some typos.
 1.21 11-Dec-2005  christos branches: 1.21.2; 1.21.4; 1.21.6;
merge ktrace-lwp.
 1.20 03-Jun-2005  tsutsui branches: 1.20.2;
Add const.
 1.19 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 28-Aug-2004  jdolecek branches: 1.18.4;
use uvm_grow() to update stack segment size on stack page fault instead
of MD code
 1.17 14-Mar-2004  cl add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
 1.16 08-Nov-2003  tsutsui Remove obsolete comments about curproc.
 1.15 31-Oct-2003  cl Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

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

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

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.13 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.12 17-Sep-2003  cl add MD part of SA/pthread pagefault handling on all m68k ports
 1.11 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.10 15-Jul-2003  lukem __KERNEL_RCSID()
 1.9 23-Jun-2003  martin branches: 1.9.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 14-May-2002  matt branches: 1.7.6;
Eliminate more commons or redundant declarations.
 1.6 14-Feb-2002  chs allow writing to write-only mappings. fixes PR 3493.
 1.5 30-Nov-2001  fredette vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.4 17-Aug-2001  fredette branches: 1.4.6;
Under DEBUG, have a global buserr_reg that stores the
last value read out of the bus error register.
 1.3 02-Jun-2001  chs branches: 1.3.2;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.2 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file trap.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 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 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.4.6.12 07-Jan-2003  thorpej In the SA universe, the switch-to-this-LWP decision is made at a
different level than where preempt() calls are made, which renders
the "newlwp" argument useless. Replace it with a "more work to do"
boolean argument. Returning to userspace preempt() calls pass 0.
"Voluntary" preemptions in e.g. uiomove() pass 1. This will be used
to indicate to the SA subsystem that the LWP is not yet finished in
the kernel.

Collapse the SA vs. non-SA cases of preempt() together, making the
conditional code block much smaller, and don't call sa_preempt() if
more work is to come.

NOTE: THIS IS NOT A COMPLETE FIX TO THE preempt()-in-uiomove() PROBLEM
THAT CURRENTLY EXISTS FOR SA PROCESSES.
 1.4.6.11 05-Oct-2002  gmcgarry LWPify
 1.4.6.10 26-Sep-2002  nathanw Change "if (l->l_flag & L_SA_UPCALL)" to "while (l->l_flag & L_SA_UPCALL)"
in userret() functions or equivalent, to permit delivery of multiple upcalls
in a single kernel entry.

XXX It's getting crowded in here. Collapsing posting signals, upcalls, and
XXX kernel-exit handling into one mechanism would be nice.
 1.4.6.9 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.4.6.8 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.6.7 20-Jun-2002  nathanw Catch up to -current.
 1.4.6.6 28-Feb-2002  nathanw Catch up to -current.
 1.4.6.5 08-Jan-2002  nathanw Catch up to -current.
 1.4.6.4 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.4.6.3 25-Nov-2001  scw Deal with `want_resched' with trap()'s T_ASTFLT case where it belongs
instead of in userret().
 1.4.6.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.4.6.1 17-Aug-2001  scw file trap.c was added on branch nathanw_sa on 2001-11-18 19:45:51 +0000
 1.7.6.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.9.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.9.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.2 03-Sep-2004  skrll Sync with HEAD
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.18.4.1 29-Apr-2005  kent sync with -current
 1.20.2.5 15-Nov-2007  yamt sync with head.
 1.20.2.4 03-Sep-2007  yamt sync with head.
 1.20.2.3 26-Feb-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.21.6.2 01-Jun-2006  kardel 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.21.2.1 01-Mar-2006  yamt sync with head.
 1.22.4.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.22.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.22.2.3 11-Aug-2006  yamt sync with head
 1.22.2.2 24-May-2006  yamt sync with head.
 1.22.2.1 01-Apr-2006  yamt sync with head.
 1.23.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.27.8.2 18-Jun-2007  liamjfoy Pull up following revision(s) (requested by mhitch in ticket #728):
sys/arch/mvme68k/mvme68k/locore.s: revision 1.98
sys/arch/mac68k/mac68k/trap.c: revision 1.128
sys/arch/next68k/next68k/locore.s: revision 1.48
sys/arch/mac68k/mac68k/locore.s: revision 1.152
sys/arch/sun3/sun3/locore.s: revision 1.88
sys/arch/sun2/sun2/locore.s: revision 1.19
sys/arch/sun2/sun2/trap.c: revision 1.32
sys/arch/m68k/m68k/db_trace.c: revision 1.51
sys/arch/mvme68k/mvme68k/trap.c: revision 1.90
sys/arch/news68k/news68k/trap.c: revision 1.53
sys/arch/luna68k/luna68k/locore.s: revision 1.27
sys/arch/atari/atari/locore.s: revision 1.99
sys/arch/sun3/sun3/trap.c: revision 1.130
sys/arch/x68k/x68k/trap.c: revision 1.89
sys/arch/next68k/next68k/trap.c: revision 1.67
sys/arch/x68k/x68k/locore.s: revision 1.79
sys/arch/news68k/news68k/locore.s: revision 1.43
sys/arch/luna68k/luna68k/trap.c: revision 1.46
sys/arch/hp300/hp300/locore.s: revision 1.140
sys/arch/cesfic/cesfic/locore.s: revision 1.15
sys/arch/cesfic/cesfic/trap.c: revision 1.35
sys/arch/m68k/m68k/trap_subr.s: revision 1.12
sys/arch/amiga/amiga/locore.s: revision 1.143
Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc). Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise. Fixes the getcwd regression
test on most m68k ports.
 1.27.8.1 31-Mar-2007  bouyer branches: 1.27.8.1.2;
Pull up following revision(s) (requested by tsutsui in ticket #527):
sys/arch/sun2/sun2/trap.c: revision 1.30
sys/arch/sun2/include/param.h: revision 1.9
sys/arch/sun2/sun2/machdep.c: revision 1.49
Pass proper args to ksyms_init().
Fix compile with options DIAGNOSTIC.
(Hmm, no one has tried it since nathanw_sa merge..)
Bump MAXBSIZE to 0x4000 because 16KB could be used by default
on newfs(8) in these days and we'll get "buf mem pool index 5" panic
in sys/kern/vfs_bio.c.
 1.27.8.1.2.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.27.4.2 06-Feb-2007  ad Update m68k pasteware.
 1.27.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.28.2.2 24-Mar-2007  yamt sync with head.
 1.28.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.29.6.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.29.4.1 11-Jul-2007  mjf Sync with head.
 1.29.2.4 03-Dec-2007  ad Sync with HEAD.
 1.29.2.3 15-Jul-2007  ad Sync with head.
 1.29.2.2 27-May-2007  ad Sync with head.
 1.29.2.1 10-Apr-2007  ad Sync with head.
 1.30.4.2 26-Jun-2007  garbled Sync with HEAD.
 1.30.4.1 22-May-2007  matt Update to HEAD.
 1.32.14.1 13-Nov-2007  bouyer Sync with HEAD
 1.32.10.1 06-Nov-2007  matt sync with HEAD
 1.32.8.1 06-Nov-2007  joerg Sync with HEAD.
 1.34.18.1 18-May-2008  yamt sync with head.
 1.34.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.34.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.35.8.1 19-Oct-2008  haad Sync with HEAD.
 1.35.4.3 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.35.4.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

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

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

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

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

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

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.35.2.3 11-Aug-2010  yamt sync with head.
 1.35.2.2 11-Mar-2010  yamt sync with head
 1.35.2.1 04-May-2009  yamt sync with head.
 1.36.4.1 02-Feb-2009  snj Pull up following revision(s) (requested by martin in ticket #332):
sys/arch/amiga/amiga/trap.c: revision 1.122
sys/arch/atari/atari/trap.c: revision 1.99
sys/arch/cesfic/cesfic/trap.c: revision 1.43
sys/arch/hp300/hp300/trap.c: revision 1.140
sys/arch/luna68k/luna68k/trap.c: revision 1.55
sys/arch/m68k/include/signal.h: revision 1.25
sys/arch/m68k/m68k/sig_machdep.c: revision 1.41
sys/arch/mac68k/mac68k/trap.c: revision 1.136 via patch
sys/arch/mvme68k/mvme68k/trap.c: revision 1.98
sys/arch/news68k/news68k/trap.c: revision 1.60
sys/arch/next68k/next68k/trap.c: revision 1.75
sys/arch/sun2/sun2/trap.c: revision 1.37
sys/arch/sun3/sun3/trap.c: revision 1.136
sys/arch/x68k/x68k/trap.c: revision 1.97
Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
 1.36.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.38.4.2 05-Mar-2011  rmind sync with head
 1.38.4.1 30-May-2010  rmind sync with head
 1.38.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.38.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.41.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.42.10.1 24-Feb-2012  mrg sync to -current.
 1.42.6.1 17-Apr-2012  yamt sync with head
 1.43.16.1 06-Apr-2015  skrll Sync with HEAD
 1.43.2.1 03-Dec-2017  jdolecek update from HEAD
 1.44.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.44.18.1 10-Jun-2019  christos Sync with HEAD
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Removed. These files can be found under arch/sun68k now.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file vector.c was added on branch thorpej_scsipi on 2001-04-21 17:54:57 +0000
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.2 14-Jun-2001  fredette branches: 1.2.8;
Removed. These files can be found under arch/sun68k now.
 1.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file vector.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.8 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.7 26-Feb-2002  simonb 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.6 30-Nov-2001  fredette vm_offset_t -> vaddr_t or paddr_t or db_addr_t, as appropriate.
vm_size_t -> vsize_t
Purge register qualifiers.
bcopy() -> memcpy(), bzero() -> memset()
 1.5 10-Sep-2001  chris branches: 1.5.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.4 19-Aug-2001  chs branches: 1.4.2;
in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
 1.3 29-Jul-2001  chs use pmap_k* for buffer cache pages.
 1.2 24-Apr-2001  thorpej branches: 1.2.2;
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.1 06-Apr-2001  fredette branches: 1.1.2;
Added.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 06-Apr-2001  bouyer file vm_machdep.c was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.2.2.5 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.5.4.9 11-Nov-2002  nathanw Catch up to -current
 1.5.4.8 05-Oct-2002  gmcgarry LWPify
 1.5.4.7 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.5.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.5.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.4 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.5.4.2 18-Nov-2001  scw MD Scheduler Activation bits for Sun2.

XXX: I can't even compile-test this since the Sun2 config files
XXX: are borked both on the nathanw_sa branch and in -current ...
 1.5.4.1 10-Sep-2001  scw file vm_machdep.c was added on branch nathanw_sa on 2001-11-18 19:45:51 +0000

RSS XML Feed