Home | History | Annotate | only in /src/sys/arch/sun3
History log of /src/sys/arch/sun3
RevisionDateAuthorComments
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 01-Mar-1994  glass cleanup
 1.5 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.4 28-May-2002  nathanw Don't descend into stand; it is being deprecated in favor of sun68k/stand.
 1.3 12-Jun-1998  cgd branches: 1.3.28; 1.3.32; 1.3.40; 1.3.42;
Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.2 05-Jul-1995  gwr SUBDIR=stand
 1.1 21-Apr-1995  gwr Add this so "make cleandir" will work.
(Thanks to Kenneth Stailey)
 1.3.42.1 28-May-2002  tv Pull up revision 1.4 (requested by nathanw in ticket #51):
Don't descend into stand; it is being deprecated in favor of sun68k/stand.
 1.3.40.1 30-May-2002  gehenna Catch up with -current.
 1.3.32.2 07-Jan-2003  thorpej Sync with HEAD.
 1.3.32.1 20-Jun-2002  nathanw Catch up to -current.
 1.3.28.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.8 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.7 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.6 19-Dec-1993  glass re-organization of sun3 status, and todo info for sun3-hackers release
 1.5 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.4 28-Aug-1993  glass some more comments
 1.3 28-Aug-1993  glass last few notes
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.4 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.3 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.2 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.1 19-Dec-1993  glass re-organization of sun3 status, and todo info for sun3-hackers release
 1.6 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.5 31-Mar-1997  thorpej branches: 1.5.42;
Keep the compile/ directory in the distribution.
 1.4 11-Feb-1997  gwr This is obsolete (and has been for a while)
 1.3 26-Oct-1994  cgd branches: 1.3.10;
new RCS ID format.
 1.2 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.1 25-Jun-1993  glass keep the directory from being deleted
 1.3.10.1 12-Mar-1997  is Merge in changes from The Trunk
 1.5.42.1 07-Jan-2003  thorpej Sync with HEAD.
 1.1 06-Jan-2003  lukem branches: 1.1.2;
Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

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

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

Per lengthy discussion with Andrew Brown.
 1.1.2.2 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 06-Jan-2003  thorpej file Makefile was added on branch nathanw_sa on 2003-01-07 21:23:40 +0000
 1.81 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.80 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.79 27-Sep-2020  roy branches: 1.79.2;
vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.78 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.77 19-Jun-2020  tsutsui Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.76 19-Dec-2018  maxv branches: 1.76.4;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.75 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.74 14-Sep-2017  mrg branches: 1.74.2; 1.74.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.73 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.72 07-Aug-2015  maxv Remove the KMEMSTATS option. It no longer exists.
 1.71 23-Aug-2014  dholland branches: 1.71.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.70 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.69 25-Jun-2014  abs Enable ie0 in DISKLESS for sun3/110
 1.68 04-Jun-2014  abs Sync (commented out) some of the network and filesystem related
blocks from GENERIC. Only functional change is to comment out tun
in DISKLESS to match GENERIC.
 1.67 30-Jun-2013  rmind branches: 1.67.4;
G/C PFIL_HOOKS from the kernel configs.
 1.66 27-Apr-2013  christos branches: 1.66.4;
remove confusing numeric locators where they are unused.
 1.65 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.64 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.63 30-Jun-2011  wiz branches: 1.63.2; 1.63.8; 1.63.12;
dependant -> dependent
 1.62 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.61 06-Mar-2009  joerg branches: 1.61.4; 1.61.6; 1.61.8;
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.60 17-Jan-2009  tsutsui branches: 1.60.2;
Add options COMPAT_50.
 1.59 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.58 05-Apr-2008  tsutsui branches: 1.58.4; 1.58.10; 1.58.12;
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 been reached the limit.
 1.57 17-Oct-2007  garbled branches: 1.57.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.56 18-Jul-2007  tsutsui branches: 1.56.6;
- add options COMPAT_40
- use options<space><tab>
 1.55 27-Sep-2006  manu branches: 1.55.8; 1.55.16; 1.55.20; 1.55.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.54 26-Aug-2006  christos branches: 1.54.2; 1.54.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.53 05-Feb-2006  cube branches: 1.53.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.52 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.51 11-Dec-2005  christos branches: 1.51.2; 1.51.4; 1.51.6;
merge ktrace-lwp.
 1.50 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.49 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.48 19-Aug-2005  christos 64 bit inode changes.
 1.47 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.46 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.45 21-Jan-2005  tsutsui branches: 1.45.8;
Remove options COMPAT_15 and add options COMPAT_20.
 1.44 10-Nov-2004  christos branches: 1.44.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.43 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.42 22-Sep-2003  cl branches: 1.42.2;
add COMPAT_15/COMPAT_16
 1.41 10-Apr-2003  christos branches: 1.41.2;
Bye Bye UCONSOLE
 1.40 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.39 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.38 25-Apr-2002  atatat branches: 1.38.2; 1.38.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.37 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.36 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.35 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.34 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.33 08-Jul-2001  abs branches: 1.33.2; 1.33.4; 1.33.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.32 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.31 22-Feb-2001  chs branches: 1.31.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.30 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.29 29-Jul-1999  augustss branches: 1.29.2;
It's time to be COMPAT_14.
 1.28 08-Apr-1999  gwr branches: 1.28.2; 1.28.4;
Slim this down so it can be used as an Xkernel.
 1.27 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.26 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.25 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.24 28-Jan-1998  gwr Add NFS_BOOT_BOOTPARAM (fixes PR#4904)
 1.23 13-Dec-1997  gwr branches: 1.23.2;
Sync with GENERIC
 1.22 01-Dec-1997  kleink Add COMPAT_13.
 1.21 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.20 17-Oct-1997  gwr branches: 1.20.2;
Sync with GENERIC
 1.19 07-May-1997  lukem clean up whitespace use
 1.18 11-Mar-1997  gwr Sync up with changes in GENERIC
 1.17 31-Jan-1997  thorpej branches: 1.17.4;
Adopt for new file system and root spec grammar.
 1.16 19-Nov-1996  gwr branches: 1.16.2;
Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.15 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.14 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.13 26-Aug-1996  mrg add COMPAT_12.
 1.12 26-Mar-1996  gwr branches: 1.12.4;
New autoconfig design that controls attach order.
 1.11 17-Nov-1995  gwr Switch to ncr_si (will just do PIO for now) and cleanup
 1.10 08-Oct-1995  gwr branches: 1.10.2;
Add RAMDISK, move some things around.
Add rd*, xd*, xy* (only rd is done).
 1.9 08-Aug-1995  gwr Set TIMEZONE=0, DST=0 (which is correct for the hardware clock).
 1.8 07-Jul-1995  gwr Put back SYMTAB_SPACE so the distributed kernels will have symbols when
loaded by the SunOS boot program. Our netboot works, but our ufsboot
still has a problem on the 3/260, so keep SunOS boot support for now.
 1.7 09-Jun-1995  gwr Retool for native build.
 1.6 26-Mar-1995  gwr Sync with GENERIC
 1.5 11-Feb-1995  gwr Move FPCOPROC out of std.sun3
 1.4 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 29-Jul-1994  gwr branches: 1.1.2;
My config file for testing.
 1.1.2.2 29-Jul-1994  gwr My config file for testing.
 1.1.2.1 29-Jul-1994  gwr file DISKLESS was added on branch netbsd-1-0 on 1994-07-29 04:20:00 +0000
 1.10.2.1 18-Nov-1995  gwr From HEAD: Use ncr_si (in PIO mode), also cleanup
 1.12.4.1 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.16.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.17.4.1 13-Mar-1997  gwr Merge changes from the trunk
 1.20.2.1 14-Dec-1997  mellon Pull rev 1.23 up from trunk (gwr)
 1.23.2.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.23.2.1 27-Jan-1998  gwr Sun3 config.
 1.28.4.1 02-Aug-1999  thorpej Update from trunk.
 1.28.2.2 08-Apr-1999  gwr Slim this down so it can be used as an Xkernel.
 1.28.2.1 08-Apr-1999  gwr file DISKLESS was added on branch netbsd-1-4 on 1999-04-08 07:10:21 +0000
 1.29.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.29.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.31.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.33.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.33.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.33.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.33.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.33.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.33.8.1 08-Jul-2001  nathanw file DISKLESS was added on branch nathanw_sa on 2002-01-08 00:28:15 +0000
 1.33.4.1 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.33.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.33.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.33.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.33.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.33.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.38.4.1 01-Aug-2002  lukem Pull up revision 1.39 (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.38.2.1 15-Jul-2002  gehenna catch up with -current.
 1.41.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.41.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.41.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.41.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.41.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.41.2.1 03-Aug-2004  skrll Sync with HEAD
 1.42.2.1 15-Jul-2004  he Pull up revision 1.43 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.44.4.1 29-Apr-2005  kent sync with -current
 1.45.8.3 03-Sep-2007  yamt sync with head.
 1.45.8.2 30-Dec-2006  yamt sync with head.
 1.45.8.1 21-Jun-2006  yamt sync with head.
 1.51.6.1 22-Apr-2006  simonb Sync with head.
 1.51.4.1 09-Sep-2006  rpaulo sync with head
 1.51.2.1 18-Feb-2006  yamt sync with head.
 1.53.2.1 03-Sep-2006  yamt sync with head.
 1.54.4.1 22-Oct-2006  yamt sync with head
 1.54.2.1 18-Nov-2006  ad Sync with head.
 1.55.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.55.20.1 07-Aug-2007  matt Sync with HEAD.
 1.55.16.1 03-Oct-2007  garbled Sync with HEAD
 1.55.8.1 20-Aug-2007  ad Sync with HEAD.
 1.56.6.1 06-Nov-2007  matt sync with HEAD
 1.57.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.57.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.58.12.2 28-Apr-2009  skrll Sync with HEAD.
 1.58.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.58.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.58.4.1 04-May-2009  yamt sync with head.
 1.60.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.61.8.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.61.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.61.4.1 21-Apr-2011  rmind sync with head
 1.63.12.4 03-Dec-2017  jdolecek update from HEAD
 1.63.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.63.12.2 23-Jun-2013  tls resync from head
 1.63.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.63.8.1 07-Aug-2014  msaitoh Pull up following revision(s) (requested by abs in ticket #1091):
sys/arch/sun3/conf/DISKLESS: revision 1.69
Enable ie0 in DISKLESS for sun3/110
 1.63.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.63.2.1 30-Oct-2012  yamt sync with head
 1.66.4.1 28-Aug-2013  rmind sync with head
 1.67.4.1 10-Aug-2014  tls Rebase.
 1.71.2.2 28-Aug-2017  skrll Sync with HEAD
 1.71.2.1 22-Sep-2015  skrll Sync with HEAD
 1.74.4.1 10-Jun-2019  christos Sync with HEAD
 1.74.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.74.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.76.4.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.79.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.62 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.61 19-Jun-2020  tsutsui branches: 1.61.2;
Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.60 01-Aug-2018  maxv branches: 1.60.4;
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.59 14-Sep-2017  mrg branches: 1.59.2; 1.59.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.58 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.57 07-Aug-2015  maxv Remove the KMEMSTATS option. It no longer exists.
 1.56 23-Aug-2014  dholland branches: 1.56.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.55 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.54 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.53 27-Apr-2013  christos branches: 1.53.4;
remove confusing numeric locators where they are unused.
 1.52 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.51 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.50 30-Jun-2011  wiz branches: 1.50.2; 1.50.12;
dependant -> dependent
 1.49 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.48 06-Mar-2009  joerg branches: 1.48.4; 1.48.6; 1.48.8;
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.47 17-Jan-2009  tsutsui branches: 1.47.2;
Add options COMPAT_50.
 1.46 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.45 05-Apr-2008  tsutsui branches: 1.45.4; 1.45.10; 1.45.12;
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 been reached the limit.
 1.44 17-Oct-2007  garbled branches: 1.44.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.43 18-Jul-2007  tsutsui branches: 1.43.6;
- add options COMPAT_40
- use options<space><tab>
 1.42 27-Sep-2006  manu branches: 1.42.8; 1.42.16; 1.42.20; 1.42.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.41 26-Aug-2006  christos branches: 1.41.2; 1.41.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.40 05-Feb-2006  cube branches: 1.40.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.39 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.38 11-Dec-2005  christos branches: 1.38.2; 1.38.4; 1.38.6;
merge ktrace-lwp.
 1.37 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.36 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.35 19-Aug-2005  christos 64 bit inode changes.
 1.34 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.33 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.32 21-Jan-2005  tsutsui branches: 1.32.8;
Remove options COMPAT_15 and add options COMPAT_20.
 1.31 10-Nov-2004  christos branches: 1.31.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.30 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.29 22-Sep-2003  cl branches: 1.29.2;
add COMPAT_15/COMPAT_16
 1.28 10-Apr-2003  christos branches: 1.28.2;
Bye Bye UCONSOLE
 1.27 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.26 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.25 25-Apr-2002  atatat branches: 1.25.2; 1.25.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.24 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.23 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.22 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.21 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.20 08-Jul-2001  abs branches: 1.20.2; 1.20.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.19 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.18 22-Feb-2001  chs branches: 1.18.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.17 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.16 29-Jul-1999  augustss branches: 1.16.2;
It's time to be COMPAT_14.
 1.15 08-Apr-1999  gwr branches: 1.15.2; 1.15.4;
Slim this down so it can be used as an Xkernel.
 1.14 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.13 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.12 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.11 01-Dec-1997  kleink branches: 1.11.4;
Add COMPAT_13.
 1.10 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.9 17-Oct-1997  gwr Sync with GENERIC
 1.8 07-Oct-1997  gwr Sync with GENERIC
 1.7 15-May-1997  jeremy branches: 1.7.4;
Things are stable enough that DDB, PMAP_DEBUG and DIAGNOSTIC aren't needed
anymore.
 1.6 07-May-1997  lukem cleanup use of whitespace
 1.5 24-Mar-1997  gwr No longer need SYMTAB_SPACE now that sun3x/stand/* works.
(Thanks, Jeremy!)
 1.4 21-Mar-1997  jeremy Fixed address for bwtwo framebuffer.
 1.3 11-Feb-1997  gwr Fix some comments
 1.2 31-Jan-1997  thorpej branches: 1.2.2;
Adopt for new file system and root spec grammar.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.4.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.11.4.1 27-Jan-1998  gwr Sun3X config.
 1.15.4.1 02-Aug-1999  thorpej Update from trunk.
 1.15.2.2 08-Apr-1999  gwr Slim this down so it can be used as an Xkernel.
 1.15.2.1 08-Apr-1999  gwr file DISKLESS3X was added on branch netbsd-1-4 on 1999-04-08 07:10:21 +0000
 1.16.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.16.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.20.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.20.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.20.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.20.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.20.8.1 08-Jul-2001  nathanw file DISKLESS3X was added on branch nathanw_sa on 2002-01-08 00:28:15 +0000
 1.20.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.20.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.20.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.20.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.20.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.25.4.1 01-Aug-2002  lukem Pull up revision 1.26 (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.25.2.1 15-Jul-2002  gehenna catch up with -current.
 1.28.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.28.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.28.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.2.1 15-Jul-2004  he Pull up revision 1.30 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.31.4.1 29-Apr-2005  kent sync with -current
 1.32.8.3 03-Sep-2007  yamt sync with head.
 1.32.8.2 30-Dec-2006  yamt sync with head.
 1.32.8.1 21-Jun-2006  yamt sync with head.
 1.38.6.1 22-Apr-2006  simonb Sync with head.
 1.38.4.1 09-Sep-2006  rpaulo sync with head
 1.38.2.1 18-Feb-2006  yamt sync with head.
 1.40.2.1 03-Sep-2006  yamt sync with head.
 1.41.4.1 22-Oct-2006  yamt sync with head
 1.41.2.1 18-Nov-2006  ad Sync with head.
 1.42.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.42.20.1 07-Aug-2007  matt Sync with HEAD.
 1.42.16.1 03-Oct-2007  garbled Sync with HEAD
 1.42.8.1 20-Aug-2007  ad Sync with HEAD.
 1.43.6.1 06-Nov-2007  matt sync with HEAD
 1.44.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.44.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.45.12.2 28-Apr-2009  skrll Sync with HEAD.
 1.45.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.45.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.45.4.1 04-May-2009  yamt sync with head.
 1.47.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.48.8.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.48.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.48.4.1 21-Apr-2011  rmind sync with head
 1.50.12.4 03-Dec-2017  jdolecek update from HEAD
 1.50.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.12.2 23-Jun-2013  tls resync from head
 1.50.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.50.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.50.2.1 30-Oct-2012  yamt sync with head
 1.53.4.1 28-Aug-2013  rmind sync with head
 1.56.2.2 28-Aug-2017  skrll Sync with HEAD
 1.56.2.1 22-Sep-2015  skrll Sync with HEAD
 1.59.4.1 10-Jun-2019  christos Sync with HEAD
 1.59.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.60.4.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.61.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.54 05-Dec-2021  msaitoh s/ommit/omit/ in comment.
 1.53 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.52 18-Jul-2007  tsutsui branches: 1.52.6;
Just include GENERIC and use <no> keyword of config(9).
 1.51 27-Sep-2006  manu branches: 1.51.8; 1.51.16; 1.51.20; 1.51.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.50 26-Aug-2006  christos branches: 1.50.2; 1.50.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.49 05-Feb-2006  cube branches: 1.49.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.48 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.47 07-Dec-2005  tsutsui branches: 1.47.2; 1.47.4; 1.47.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.46 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.45 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.44 19-Aug-2005  christos 64 bit inode changes.
 1.43 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.42 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.41 18-Feb-2005  dsl branches: 1.41.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.40 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.39 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.38 21-Jan-2005  tsutsui branches: 1.38.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.37 10-Nov-2004  christos branches: 1.37.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.36 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.35 22-Sep-2003  cl branches: 1.35.2;
add COMPAT_15/COMPAT_16
 1.34 10-Apr-2003  christos branches: 1.34.2;
Bye Bye UCONSOLE
 1.33 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.32 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.31 25-Apr-2002  atatat branches: 1.31.2; 1.31.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.30 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.29 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.28 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.27 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.26 08-Jul-2001  abs branches: 1.26.2; 1.26.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.25 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.24 22-Feb-2001  chs branches: 1.24.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.23 19-Dec-2000  tsutsui Remove "rnd is EXPERIMANTAL" comments.
 1.22 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.21 29-Jul-1999  augustss branches: 1.21.2;
It's time to be COMPAT_14.
 1.20 08-Apr-1999  gwr branches: 1.20.2; 1.20.4;
sync with GENERIC
 1.19 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.18 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.17 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.16 28-Jan-1998  gwr Add NFS_BOOT_BOOTPARAM (fixes PR#4904)
 1.15 22-Jan-1998  gwr branches: 1.15.2;
Add config flags for tty[cd] to set TIOCFLAG_SOFTCAR.
Remove the framebuffer devices (not useful here).
 1.14 22-Jan-1998  gwr Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.13 13-Dec-1997  gwr Sync with GENERIC
 1.12 01-Dec-1997  kleink Add COMPAT_13.
 1.11 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.10 07-May-1997  lukem branches: 1.10.8;
clean up whitespace use
 1.9 11-Mar-1997  gwr Sync up with changes in GENERIC
 1.8 10-Feb-1997  gwr Actually works now.
 1.7 31-Jan-1997  thorpej branches: 1.7.2;
Adopt for new file system and root spec grammar.
 1.6 28-Dec-1996  pk branches: 1.6.2;
rename: ramdisk => md
 1.5 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.4 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.3 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.2 26-Aug-1996  mrg add COMPAT_12.
 1.1 26-Mar-1996  gwr branches: 1.1.4;
Document how to configure a kernel with ttyc,ttyd instead of kbd/ms
 1.1.4.1 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.6.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.7.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.7.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10.8.1 14-Dec-1997  mellon Pull rev 1.13 up from trunk (gwr)
 1.15.2.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.15.2.1 27-Jan-1998  gwr Sun3 config.
 1.20.4.1 02-Aug-1999  thorpej Update from trunk.
 1.20.2.2 08-Apr-1999  gwr sync with GENERIC
 1.20.2.1 08-Apr-1999  gwr file FOUR_TTYS was added on branch netbsd-1-4 on 1999-04-08 07:00:59 +0000
 1.21.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.21.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.21.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.26.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.26.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.26.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.26.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.26.8.1 08-Jul-2001  nathanw file FOUR_TTYS was added on branch nathanw_sa on 2002-01-08 00:28:15 +0000
 1.26.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.26.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.26.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.26.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.26.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.31.4.1 01-Aug-2002  lukem Pull up revision 1.32 (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.31.2.1 15-Jul-2002  gehenna catch up with -current.
 1.34.2.10 11-Dec-2005  christos Sync with head.
 1.34.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.34.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.34.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.34.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.34.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.34.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.2.1 15-Jul-2004  he Pull up revision 1.36 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.37.4.1 29-Apr-2005  kent sync with -current
 1.38.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.38.2.1 12-Feb-2005  yamt sync with head.
 1.41.6.3 03-Sep-2007  yamt sync with head.
 1.41.6.2 30-Dec-2006  yamt sync with head.
 1.41.6.1 21-Jun-2006  yamt sync with head.
 1.47.6.1 22-Apr-2006  simonb Sync with head.
 1.47.4.1 09-Sep-2006  rpaulo sync with head
 1.47.2.1 18-Feb-2006  yamt sync with head.
 1.49.2.1 03-Sep-2006  yamt sync with head.
 1.50.4.1 22-Oct-2006  yamt sync with head
 1.50.2.1 18-Nov-2006  ad Sync with head.
 1.51.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.51.20.1 07-Aug-2007  matt Sync with HEAD.
 1.51.16.1 03-Oct-2007  garbled Sync with HEAD
 1.51.8.1 20-Aug-2007  ad Sync with HEAD.
 1.52.6.1 06-Nov-2007  matt sync with HEAD
 1.192 13-Jan-2024  tsutsui Disable more several pseudo-devices to shrink binary size.

My 3/60 fails to boot from a SCSI disk without this change.
https://mail-index.netbsd.org/port-sun3/2024/01/13/msg000207.html

Should be pulled up to netbsd-10.
 1.191 13-Jan-2024  simonb Revert mistaken "no obmem0" that I added when enabling UFS_DIRHASH.

Thanks tsutsui@ for pointing this out.
 1.190 12-Feb-2023  abs Add optoion GENERIC.local include to the end of ~all GENERIC configs

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

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

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

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

PR kern/29702
 1.188 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.187 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.186 27-Sep-2020  roy branches: 1.186.2;
vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.185 10-Sep-2020  rin Build in debug symbols.
 1.184 10-Aug-2020  rin Add -fno-omit-frame-pointer to m68k kernels with DDB for backtraces.
-omit-frame-pointer is enabled for -O1 and higher for GCC8 by default.
 1.183 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.182 19-Jun-2020  tsutsui Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.181 26-Apr-2019  sevan branches: 1.181.2;
Use veriexec.config to reduce duplication
 1.180 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.179 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.178 07-Mar-2018  mrg branches: 1.178.2;
also disable SYSCTL_INCLUDE_DESCR.
copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.
 1.177 03-Mar-2018  mrg branches: 1.177.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.176 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.175 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.174 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.173 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.172 12-Aug-2015  maxv branches: 1.172.10;
Remove KMEMSTATS.
 1.171 16-Nov-2014  manu branches: 1.171.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.170 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.169 24-Aug-2014  jnemeth Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR". This
option turns on module autoloading by default (which is the current
default). This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
 1.168 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.167 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.166 30-Jun-2013  rmind branches: 1.166.6;
G/C PFIL_HOOKS from the kernel configs.
 1.165 05-Jun-2013  christos branches: 1.165.2;
remove obsolete networking options
 1.164 27-Apr-2013  christos the bogus number police
 1.163 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.162 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.161 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.160 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.159 10-Mar-2012  joerg branches: 1.159.2;
P1003_1B_SEMAPHORE is no longer optional.
 1.158 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.157 22-Nov-2011  tls branches: 1.157.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.156 30-Jun-2011  wiz branches: 1.156.2;
dependant -> dependent
 1.155 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.154 03-Jan-2011  tsutsui branches: 1.154.2; 1.154.4;
Xref module(7) in comments.
 1.153 23-Nov-2010  hannken Remove unused count from pseudo-device md.
 1.152 16-Oct-2010  tsutsui Add commented out options MODULAR.
 1.151 07-Jul-2010  chs enable DDB_HISTORY_SIZE in a few more configs where DDB is enabled.
 1.150 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.149 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.148 17-Jan-2009  tsutsui branches: 1.148.4; 1.148.6;
Add options COMPAT_50.
 1.147 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.145 10-Aug-2008  tls branches: 1.145.2;
Add accept filters to GENERIC kernels where they exist.
 1.144 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.143 05-Apr-2008  tsutsui branches: 1.143.4; 1.143.6; 1.143.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 been reached the limit.
 1.142 31-Dec-2007  ad branches: 1.142.6;
Remove systrace. Ok core@.
 1.141 04-Nov-2007  xtraeme branches: 1.141.2; 1.141.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.140 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.139 18-Jul-2007  tsutsui branches: 1.139.4; 1.139.6; 1.139.10;
- add options COMPAT_40
- use options<space><tab>
 1.138 04-Jun-2007  martin branches: 1.138.2; 1.138.4;
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.137 11-Nov-2006  jmmv branches: 1.137.2; 1.137.8; 1.137.10; 1.137.16; 1.137.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.136 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

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

ok: christos
 1.131 28-Mar-2006  pavel branches: 1.131.4;
Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
 1.130 05-Feb-2006  cube branches: 1.130.2; 1.130.4; 1.130.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.129 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.128 02-Feb-2006  reinoud branches: 1.128.2;
Add commented out UDF file-system entry in all GENERIC configurations.
 1.127 09-Dec-2005  elad branches: 1.127.2; 1.127.4;
Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
 1.126 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.125 06-Oct-2005  tsutsui cosmetics.
 1.124 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.123 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.122 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.121 19-Aug-2005  christos 64 bit inode changes.
 1.120 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.119 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.118 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.117 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.116 25-Jun-2005  rpaulo branches: 1.116.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.115 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.114 18-Feb-2005  dsl branches: 1.114.4;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.113 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.112 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.111 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.110 21-Jan-2005  tsutsui branches: 1.110.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.109 17-Jan-2005  cube Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.108 10-Nov-2004  christos branches: 1.108.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.107 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.106 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.105 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.104 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.103 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.102 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.101 22-Sep-2003  cl branches: 1.101.2;
add COMPAT_15/COMPAT_16
 1.100 26-Apr-2003  ragge branches: 1.100.2;
Add pseudo-device ksyms.
 1.99 10-Apr-2003  christos Bye Bye UCONSOLE
 1.98 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.97 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.96 18-Oct-2002  junyoung Add NEW_BUFQ_STRATEGY (disabled by default).
 1.95 14-Oct-2002  elric Added commented out cgd(4)s to GENERIC configs.
 1.94 06-Oct-2002  provos add SYSTRACE; approved perry.
 1.93 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.92 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.91 25-Apr-2002  atatat branches: 1.91.2; 1.91.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.90 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.89 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.88 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.87 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.86 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.85 23-Nov-2001  atatat The bridge(4) pseudo-device no longer requires the port to
__HAVE_GENERIC_SOFT_INTERRUPTS, so add it back to all GENERIC configs.
 1.84 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.83 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.82 01-Sep-2001  atatat branches: 1.82.6;
Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS. bridge(4) doesn't compile there.
 1.81 01-Sep-2001  atatat Add bridge pseudo devices to GENERIC configs
 1.80 08-Jul-2001  abs branches: 1.80.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.79 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.78 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.77 22-Feb-2001  chs branches: 1.77.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.76 19-Dec-2000  tsutsui Remove "rnd is EXPERIMENTAL" comments.
 1.75 19-Dec-2000  bouyer Add pseudo-device vlan
 1.74 04-Oct-2000  itojun enable rnd device. they are now mandatory for ssh/sshd support,
so it makes more sense to enable it.
please disable them if there's any issues, but in that case, in-tree
ssh/sshd won't work.
 1.73 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.72 13-Aug-2000  itojun move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
 1.71 27-Jul-2000  mason Moving to a default of 64 PTYs.
 1.70 30-Jun-2000  itojun add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
 1.69 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.68 14-Jun-2000  veego branches: 1.68.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.67 09-Jun-2000  tsutsui Enable vnd.
 1.66 19-Apr-2000  itojun branches: 1.66.2;
add stf pseudo interface (commented out due to possible security risks)
 1.65 29-Feb-2000  simonb Do the "<space><tab>" thing with the RAID_AUTOCONFIG option.
 1.64 26-Feb-2000  oster Defopt 'RAID_AUTOCONFIG'. Adding 'options RAID_AUTOCONFIG' turns on
the component auto-detection and auto-configuration of RAID sets.
Also, add "#options RAID_AUTOCONFIG" to the GENERIC config files.
 1.63 23-Jan-2000  hubertf Add commented out "ident"-command
 1.62 20-Jan-2000  wrstuden Add overlay to kernel configs.
 1.61 21-Nov-1999  itojun bring in content of GENERIC.v6 into GENERIC.
remove GENERIC.v6 file (as it is part of GENERIC now).

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

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

XXX what to do with arch/arm32/SHARK{,.v6}?
 1.60 15-Nov-1999  fvdl Add commented out option SOFTDEP to all GENERIC kernels.
 1.59 29-Jul-1999  augustss branches: 1.59.2; 1.59.8;
It's time to be COMPAT_14.
 1.58 20-Jul-1999  christos enable PPP_BSDCOMP, PPP_DEFLATE, PPP_FILTER, PFIL_HOOKS, IPFILTER_LOG
on the GENERIC kernels that had them commented out.
XXX: Please note, that not all the kernels have all the options defined!
 1.57 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.56 15-Dec-1998  itohy branches: 1.56.2; 1.56.4;
Added options COMPAT_LINUX and EXEC_ELF32 as comments
to GENERIC configuration files.
 1.55 25-Nov-1998  hwr Add (commented out) 'gre' pseudo device line. Feedback is welcome.
Inspired by Klaus Klein.
 1.54 16-Nov-1998  oster Added a (commented out) configuration line for the RAIDframe device driver.
 1.53 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.52 11-Jun-1998  fair turn on LKM by default, per PR#4423
 1.51 18-Mar-1998  bouyer Add commented out "options FFS_EI"
 1.50 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.49 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.48 28-Jan-1998  gwr Add NFS_BOOT_BOOTPARAM (fixes PR#4904)
 1.47 22-Jan-1998  gwr branches: 1.47.2;
Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.46 13-Dec-1997  gwr Move Sun3/E stuff
 1.45 01-Dec-1997  kleink Add COMPAT_13.
 1.44 20-Nov-1997  fair add pseudo-device rnd, commented out
 1.43 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.42 17-Oct-1997  gwr branches: 1.42.2;
typo
 1.41 17-Oct-1997  gwr Add Sun3/E stuff, and re-organize.
 1.40 23-Aug-1997  mjacob add a before tab to SCSIVERBOSE
 1.39 20-Aug-1997  mjacob add commented out reference SCSIVERBOSE option
 1.38 07-May-1997  lukem branches: 1.38.4;
clean up whitespace use
 1.37 11-Mar-1997  gwr Update the description of the flags for "si" devices.
Remove wired-down scsi disk targets (no longer needed).
Add ch, ss, uk (scsi devcies) at mycroft's requst.
 1.36 10-Feb-1997  gwr update comments
 1.35 31-Jan-1997  thorpej branches: 1.35.2;
Adopt for new file system and root spec grammar.
 1.34 11-Jan-1997  mikel branches: 1.34.2;
add 'pseudo-device ccd' where necessary; PR kern/1830.
 1.33 28-Dec-1996  pk rename: ramdisk => md
 1.32 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.31 30-Oct-1996  gwr Use explicit addresses for obio devices.
 1.30 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.29 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.28 26-Aug-1996  mrg add COMPAT_12.
 1.27 26-Mar-1996  gwr branches: 1.27.4;
New autoconfig design that controls attach order.
 1.26 20-Feb-1996  gwr kill SCSIDEBUG
 1.25 17-Nov-1995  gwr Switch to ncr_si (will just do PIO for now) and cleanup
 1.24 08-Oct-1995  gwr branches: 1.24.2;
Add RAMDISK, move some things around.
Add rd*, xd*, xy* (only rd is done).
 1.23 08-Aug-1995  gwr Set TIMEZONE=0, DST=0 (which is correct for the hardware clock).
 1.22 07-Jul-1995  gwr Put back SYMTAB_SPACE so the distributed kernels will have symbols when
loaded by the SunOS boot program. Our netboot works, but our ufsboot
still has a problem on the 3/260, so keep SunOS boot support for now.
 1.21 09-Jun-1995  gwr Retool for native build.
 1.20 07-Apr-1995  gwr Yet more SYMTAB_SPACE
 1.19 03-Apr-1995  gwr Add FDESC FIFO NULLFS UNION file systems.
 1.18 26-Mar-1995  gwr Nuke FPCOPROC
 1.17 10-Mar-1995  gwr Add more stuff! (/kern /proc bpf, ppp, sp, ...)
 1.16 10-Mar-1995  gwr Add bwtwo, cgfour, fb
 1.15 01-Mar-1995  gwr Add option FPU_EMULATE
 1.14 24-Feb-1995  gwr Make scsi device mappings Sun compatible.
 1.13 11-Feb-1995  gwr Move FPCOPROC out of std.sun3
 1.12 24-Jan-1995  gwr Enable the ie and si drivers on VME.
 1.11 21-Dec-1994  gwr Add the 110, 160, 260 now that ie and zs both work.
 1.10 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 20-Sep-1994  gwr branches: 1.7.2;
GENERIC kernel works.
 1.6 27-May-1994  gwr Goodbye to MAXFDESCS
 1.5 05-May-1994  gwr Oops - had some options in twice.
 1.4 04-May-1994  gwr Add zs driver, organize like TIMESINK
 1.3 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.2 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.1 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.7.2.2 20-Sep-1994  gwr GENERIC kernel works.
 1.7.2.1 20-Sep-1994  gwr file GENERIC was added on branch netbsd-1-0 on 1994-09-20 16:17:09 +0000
 1.24.2.1 18-Nov-1995  gwr From HEAD: Use ncr_si (in PIO mode), also cleanup
 1.27.4.1 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.34.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.35.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.35.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.38.4.2 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.38.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.42.2.1 20-Nov-1997  mellon Pull rev 1.44 up from trunk (fair)
 1.47.2.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.47.2.1 27-Jan-1998  gwr Sun3 config.
 1.56.4.2 02-Aug-1999  thorpej Update from trunk.
 1.56.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.56.2.2 03-Jun-2000  he Apply patch (requested by he):
Disable the UNION file system, to avoid a repeat of the 1.4.1
and 1.4.2 LAST_MINUTE changes. It is reportedly buggy, and can
be used by ordinary users to crash the system.
 1.56.2.1 29-Feb-2000  he Apply patch (requested by toddpw):
Add 4 vnd pseudo-devices to GENERIC and ``MAKEDEV all'' for sun3.
 1.59.8.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.59.8.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

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

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

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.59.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.59.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.59.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.66.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.68.2.4 01-May-2001  he Pull up revisions 1.75-1.76 (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.68.2.3 04-Oct-2000  itojun pullup (approved by releng-1-5)

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

cvs rdiff -r1.166 -r1.167 syssrc/sys/arch/alpha/conf/GENERIC
cvs rdiff -r1.149 -r1.150 syssrc/sys/arch/amiga/conf/GENERIC
cvs rdiff -r1.11 -r1.12 syssrc/sys/arch/arm26/conf/GENERIC
cvs rdiff -r1.72 -r1.73 syssrc/sys/arch/atari/conf/GENERIC
cvs rdiff -r1.60 -r1.61 syssrc/sys/arch/hp300/conf/GENERIC
cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/luna68k/conf/GENERIC
cvs rdiff -r1.35 -r1.36 syssrc/sys/arch/next68k/conf/GENERIC
cvs rdiff -r1.32 -r1.33 syssrc/sys/arch/ofppc/conf/GENERIC
cvs rdiff -r1.73 -r1.74 syssrc/sys/arch/sun3/conf/GENERIC
cvs rdiff -r1.80 -r1.81 syssrc/sys/arch/vax/conf/GENERIC
cvs rdiff -r1.52 -r1.53 syssrc/sys/arch/x68k/conf/GENERIC
 1.68.2.2 11-Aug-2000  mason Move to default of 64 PTYs in GENERIC kernel config.
Requested by mason, approved by jhawk.
 1.68.2.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.77.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.80.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.80.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.80.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.80.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.80.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.80.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.82.6.8 11-Dec-2002  thorpej Sync with HEAD.
 1.82.6.7 11-Nov-2002  nathanw Catch up to -current
 1.82.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.82.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.82.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.82.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.82.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.82.6.1 01-Sep-2001  nathanw file GENERIC was added on branch nathanw_sa on 2002-01-08 00:28:15 +0000
 1.91.4.1 01-Aug-2002  lukem Pull up revision 1.92 (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.91.2.1 15-Jul-2002  gehenna catch up with -current.
 1.100.2.10 11-Dec-2005  christos Sync with head.
 1.100.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.100.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.100.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.100.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.100.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.100.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.100.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.100.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.100.2.1 03-Aug-2004  skrll Sync with HEAD
 1.101.2.3 15-Jul-2004  he Pull up revision 1.107 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.101.2.2 02-Jul-2004  he Pull up revision 1.106 (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.101.2.1 30-Jun-2004  jdc Pull up revision 1.105 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.108.4.1 29-Apr-2005  kent sync with -current
 1.110.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.110.2.1 12-Feb-2005  yamt sync with head.
 1.114.4.2 14-Aug-2005  riz Pull up revision 1.118 (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.114.4.1 18-Jul-2005  riz Pull up revision 1.117 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.116.2.5 21-Jan-2008  yamt sync with head
 1.116.2.4 15-Nov-2007  yamt sync with head.
 1.116.2.3 03-Sep-2007  yamt sync with head.
 1.116.2.2 30-Dec-2006  yamt sync with head.
 1.116.2.1 21-Jun-2006  yamt sync with head.
 1.127.4.1 09-Sep-2006  rpaulo sync with head
 1.127.2.1 18-Feb-2006  yamt sync with head.
 1.128.2.1 22-Apr-2006  simonb Sync with head.
 1.130.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.130.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.130.2.3 03-Sep-2006  yamt sync with head.
 1.130.2.2 11-Aug-2006  yamt sync with head
 1.130.2.1 01-Apr-2006  yamt sync with head.
 1.131.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.132.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.132.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.135.4.2 10-Dec-2006  yamt sync with head.
 1.135.4.1 22-Oct-2006  yamt sync with head
 1.135.2.1 18-Nov-2006  ad Sync with head.
 1.137.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.137.16.2 03-Oct-2007  garbled Sync with HEAD
 1.137.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.137.10.1 11-Jul-2007  mjf Sync with head.
 1.137.8.3 03-Dec-2007  ad Sync with HEAD.
 1.137.8.2 20-Aug-2007  ad Sync with HEAD.
 1.137.8.1 09-Jun-2007  ad Sync with head.
 1.137.2.1 05-Jun-2007  bouyer Pull up following revision(s) (requested by martin in ticket #699):
sys/arch/hpcmips/conf/GENERIC: revision 1.196
sys/arch/hp700/conf/GENERIC: revision 1.74
sys/arch/i386/conf/GENERIC: revision 1.831
sys/arch/next68k/conf/GENERIC: revision 1.108
sys/arch/alpha/conf/GENERIC: revision 1.313
sys/arch/arc/conf/GENERIC: revision 1.146
sys/arch/cats/conf/GENERIC: revision 1.115
sys/arch/ews4800mips/conf/GENERIC: revision 1.18
sys/arch/landisk/conf/GENERIC: revision 1.8 via patch
sys/arch/sparc64/conf/GENERIC: revision 1.85
sys/arch/pmax/conf/GENERIC: revision 1.152
sys/arch/iyonix/conf/GENERIC: revision 1.38 via patch
sys/arch/amiga/conf/GENERIC: revision 1.245
sys/arch/vax/conf/GENERIC: revision 1.157
sys/arch/prep/conf/GENERIC: revision 1.135
sys/arch/pc532/conf/GENERIC: revision 1.70
sys/arch/sbmips/conf/GENERIC: revision 1.61
sys/arch/mipsco/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.108
sys/arch/ofppc/conf/GENERIC: revision 1.98
sys/arch/amd64/conf/GENERIC: revision 1.148
sys/arch/acorn26/conf/GENERIC: revision 1.50
sys/arch/dreamcast/conf/GENERIC: revision 1.78
sys/arch/mac68k/conf/GENERIC: revision 1.181
sys/arch/hp300/conf/GENERIC: revision 1.139
sys/arch/mmeye/conf/GENERIC: revision 1.88
sys/arch/news68k/conf/GENERIC: revision 1.88
sys/arch/mvme68k/conf/GENERIC: revision 1.71
sys/arch/acorn32/conf/GENERIC: revision 1.79
sys/arch/sparc/conf/GENERIC: revision 1.199
sys/arch/luna68k/conf/GENERIC: revision 1.78
sys/arch/bebox/conf/GENERIC: revision 1.105
sys/arch/macppc/conf/GENERIC: revision 1.256 via patch
sys/arch/x68k/conf/GENERIC: revision 1.134
sys/arch/sun3/conf/GENERIC: revision 1.138
sys/arch/newsmips/conf/GENERIC: revision 1.98
Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.138.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.138.2.1 07-Aug-2007  matt Sync with HEAD.
 1.139.10.1 13-Nov-2007  bouyer Sync with HEAD
 1.139.6.2 09-Jan-2008  matt sync with HEAD
 1.139.6.1 06-Nov-2007  matt sync with HEAD
 1.139.4.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.141.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.141.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.142.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.142.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.142.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.143.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.143.10.1 19-Oct-2008  haad Sync with HEAD.
 1.143.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.143.4.2 11-Aug-2010  yamt sync with head.
 1.143.4.1 04-May-2009  yamt sync with head.
 1.145.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.148.6.3 21-Apr-2011  rmind sync with head
 1.148.6.2 05-Mar-2011  rmind sync with head
 1.148.6.1 30-May-2010  rmind sync with head
 1.148.4.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.148.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.148.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.154.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.154.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.156.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.156.2.2 30-Oct-2012  yamt sync with head
 1.156.2.1 17-Apr-2012  yamt sync with head
 1.157.2.2 11-Mar-2012  mrg sync to latest -current
 1.157.2.1 18-Feb-2012  mrg merge to -current.
 1.159.2.4 03-Dec-2017  jdolecek update from HEAD
 1.159.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.159.2.2 23-Jun-2013  tls resync from head
 1.159.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.165.2.1 28-Aug-2013  rmind sync with head
 1.166.6.3 15-May-2015  snj Pull up following revision(s) (requested by jnemeth in ticket #762):
share/man/man4/options.4: revision 1.442
sys/arch/amd64/conf/ALL: revision 1.18
sys/arch/amd64/conf/GENERIC: revision 1.396
sys/arch/dreamcast/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.6
sys/arch/evbarm/conf/BCM5301X: revision 1.24
sys/arch/evbarm/conf/BCM56340: revision 1.9
sys/arch/evbarm/conf/IMX23_OLINUXINO: revision 1.9
sys/arch/evbarm/conf/std.beagle: revision 1.13
sys/arch/evbarm/conf/std.kobo: revision 1.2
sys/arch/evbarm/conf/std.netwalker: revision 1.10
sys/arch/evbppc/conf/P2020DS: revision 1.25
sys/arch/evbppc/conf/RB800: revision 1.30
sys/arch/evbppc/conf/TWRP1025: revision 1.18
sys/arch/hp300/conf/GENERIC: revision 1.187
sys/arch/hpcsh/conf/GENERIC: revision 1.104
sys/arch/i386/conf/GENERIC: revision 1.1111
sys/arch/i386/conf/MONOLITHIC: revision 1.17
sys/arch/landisk/conf/GENERIC: revision 1.43
sys/arch/luna68k/conf/GENERIC: revision 1.117
sys/arch/macppc/conf/GENERIC: revision 1.316
sys/arch/macppc/conf/GENERIC_601: revision 1.5
sys/arch/mmeye/conf/MMEYE_WLF: revision 1.16
sys/arch/news68k/conf/GENERIC: revision 1.123
sys/arch/sandpoint/conf/GENERIC: revision 1.85
sys/arch/shark/conf/GENERIC: revision 1.119
sys/arch/sparc/conf/GENERIC: revision 1.246
sys/arch/sparc64/conf/GENERIC: revision 1.174
sys/arch/sun3/conf/GENERIC3X: revision 1.125
sys/arch/sun3/conf/GENERIC: revision 1.169
sys/arch/x68k/conf/GENERIC: revision 1.177
sys/arch/zaurus/conf/GENERIC: revision 1.62
sys/conf/files: revision 1.1099
sys/kern/kern_module.c: revisions 1.98, 1.99
Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR". This
option turns on module autoloading by default (which is the current
default). This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
--
fix typo. (s/MODULE_DEFAULT_AUTOLOAD/MODULAR_DEFAULT_AUTOLOAD/)
 1.166.6.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.166.6.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.171.2.2 28-Aug-2017  skrll Sync with HEAD
 1.171.2.1 22-Sep-2015  skrll Sync with HEAD
 1.172.10.2 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- 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.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.172.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.177.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.177.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.177.2.1 15-Mar-2018  pgoyette Synch with HEAD
 1.178.2.1 10-Jun-2019  christos Sync with HEAD
 1.181.2.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.186.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.189.4.1 14-Jan-2024  martin Pull up following revision(s) (requested by tsutsui in ticket #550):

sys/arch/sun3/conf/GENERIC: revision 1.191
sys/arch/sun3/conf/GENERIC: revision 1.192

Revert mistaken "no obmem0" that I added when enabling UFS_DIRHASH.
Thanks tsutsui@ for pointing this out.

Disable more several pseudo-devices to shrink binary size.
My 3/60 fails to boot from a SCSI disk without this change.
https://mail-index.netbsd.org/port-sun3/2024/01/13/msg000207.html
 1.3 21-Nov-1999  itojun bring in content of GENERIC.v6 into GENERIC.
remove GENERIC.v6 file (as it is part of GENERIC now).

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

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

XXX what to do with arch/arm32/SHARK{,.v6}?
 1.2 09-Jul-1999  thorpej branches: 1.2.2; 1.2.8;
Add examples for including the kernel crypto bits from either crypto-us
or crypto-intl, commented out, with instructions to use only one, and
adjust the prefix as necessary.
 1.1 01-Jul-1999  itojun branches: 1.1.2;
kernel configuration for IPv6/IPsec. should be in GENERIC in the future.
(source code will be committed soon)
 1.1.2.3 02-Aug-1999  thorpej Update from trunk.
 1.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.1.2.1 01-Jul-1999  thorpej file GENERIC.v6 was added on branch chs-ubc2 on 1999-07-01 23:24:09 +0000
 1.2.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.2.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.141 17-Aug-2022  tsutsui Add bwtwo0 config on P4 cgfour overlay plane on 3/80, as 3/60 in bw2.sun3.

Note the ancient Xsun server supports multiple framebuffers with both
cgfour (at DISPLAY :0) and overlay bwtwo (at DISPLAY :0.1).
 1.140 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.139 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.138 27-Sep-2020  roy branches: 1.138.2;
vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.137 10-Aug-2020  rin Add -fno-omit-frame-pointer to m68k kernels with DDB for backtraces.
-omit-frame-pointer is enabled for -O1 and higher for GCC8 by default.
 1.136 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.135 19-Jun-2020  tsutsui Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.134 26-Apr-2019  sevan branches: 1.134.2;
Use veriexec.config to reduce duplication
 1.133 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.132 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.131 07-Mar-2018  mrg branches: 1.131.2;
also disable SYSCTL_INCLUDE_DESCR.
copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.
 1.130 23-Jan-2018  sevan branches: 1.130.2;
Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.129 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.128 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.127 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.126 12-Aug-2015  maxv branches: 1.126.10;
Remove KMEMSTATS.
 1.125 24-Aug-2014  jnemeth branches: 1.125.2;
Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR". This
option turns on module autoloading by default (which is the current
default). This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
 1.124 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.123 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.122 30-Jun-2013  rmind branches: 1.122.6;
G/C PFIL_HOOKS from the kernel configs.
 1.121 05-Jun-2013  christos branches: 1.121.2;
remove obsolete networking options
 1.120 27-Apr-2013  christos the bogus number police
 1.119 27-Apr-2013  christos remove confusing numeric locators where they are unused.
 1.118 02-Mar-2013  christos Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it.
 1.117 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.116 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.115 10-Mar-2012  joerg branches: 1.115.2;
P1003_1B_SEMAPHORE is no longer optional.
 1.114 18-Dec-2011  dholland WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.113 22-Nov-2011  tls branches: 1.113.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.112 30-Jun-2011  wiz branches: 1.112.2;
dependant -> dependent
 1.111 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.110 03-Jan-2011  tsutsui branches: 1.110.2; 1.110.4;
Xref module(7) in comments.
 1.109 23-Nov-2010  hannken Remove unused count from pseudo-device md.
 1.108 16-Oct-2010  tsutsui Add commented out options MODULAR.
 1.107 29-Apr-2010  chs enable TMPFS in all GENERICs that have MFS enabled.
 1.106 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.105 17-Jan-2009  tsutsui branches: 1.105.4; 1.105.6;
Add options COMPAT_50.
 1.104 24-Nov-2008  ad Remove softdep, pass 1. We are focused on improving journalling.

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

Proposed on tech-kern@.
 1.102 15-Aug-2008  tsutsui branches: 1.102.2;
Add accept filters to sync with GENERIC.
 1.101 31-Jul-2008  simonb Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.100 05-Apr-2008  tsutsui branches: 1.100.4; 1.100.6; 1.100.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 been reached the limit.
 1.99 31-Dec-2007  ad branches: 1.99.6;
Remove systrace. Ok core@.
 1.98 04-Nov-2007  xtraeme branches: 1.98.2; 1.98.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.97 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.96 18-Jul-2007  tsutsui branches: 1.96.4; 1.96.6; 1.96.10;
- add options COMPAT_40
- use options<space><tab>
 1.95 06-Jun-2007  martin branches: 1.95.2; 1.95.4;
Add pseudo-device agr to more kernels
 1.94 11-Nov-2006  jmmv branches: 1.94.2; 1.94.8; 1.94.10; 1.94.16; 1.94.18;
Remove tmpfs's experimental status. OK'ed by core@.
 1.93 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.92 26-Aug-2006  christos branches: 1.92.2; 1.92.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.91 26-Aug-2006  tsutsui Remove obsolete #options VERIFIED_EXEC, found by grep(1).
 1.90 12-Aug-2006  christos Disable SYSTRACE by default on all kernels (discussed with core)
 1.89 28-Jun-2006  tsutsui branches: 1.89.2;
Sync with GENERIC:
> Add CARP to GENERIC kernel configs. CARP is not enabled by default.
 1.88 28-Mar-2006  pavel branches: 1.88.4;
Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
 1.87 05-Feb-2006  cube branches: 1.87.2; 1.87.4; 1.87.6;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.86 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.85 03-Feb-2006  tsutsui branches: 1.85.2;
Sync with GENERIC:
> Add commented out UDF file-system entry in all GENERIC configurations.
 1.84 10-Dec-2005  tsutsui branches: 1.84.2; 1.84.4;
Sync with GENERIC:
> Add (commented out) Veriexec options and pseudo-device to GENERIC kernels
 1.83 07-Dec-2005  tsutsui Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.82 06-Oct-2005  tsutsui Sync with GENERIC:
- add indent
- add commented out file-system TMPFS
- enable PFIL_HOOLS
- space cosmetics
 1.81 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.80 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.79 19-Aug-2005  christos 64 bit inode changes.
 1.78 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.77 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.76 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.75 07-Jul-2005  tron Add (commented out) IPSEC_NAT_T option.
 1.74 25-Jun-2005  rpaulo branches: 1.74.2;
Add file-system PTYFS (commented out) so that people know its existence.

Ok'ed by Christos Zoulas and Hubert Feyrer.
 1.73 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.72 18-Feb-2005  dsl branches: 1.72.4;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.71 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.70 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.69 30-Jan-2005  tsutsui Enable disconnect/reselect for esp(4) on 3/80 by default.

It also implies to enable tagged queueing, which works fine on my 3/80:
---
NetBSD 2.99.15 (CHARIOT) #184: Sun Jan 30 07:13:08 JST 2005
tsutsui@mirage:/usr/src/sys/arch/sun3/compile/CHARIOT
Model: sun3x 80
fpu: mc68882
total memory = 65536 KB
avail memory = 62496 KB
mainbus0 (root)
obio0 at mainbus0
:
dma0 at obio0 addr 0x66001000 ipl 2: rev 0
esp0 at obio0 addr 0x66000000 ipl 2: ESP100, 20MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
:
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST31230N, HP04> disk fixed
sd0: 1001 MB, 3992 cyl, 5 head, 102 sec, 512 bytes/sect x 2051460 sectors
sd0: async, 8-bit transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <FUJITSU, M1606S-512, 6237> disk fixed
sd1: 1041 MB, 3457 cyl, 6 head, 102 sec, 512 bytes/sect x 2131992 sectors
sd1: async, 8-bit transfers, tagged queueing
boot device: sd0a
:
---
(yes, async but tagged queueing :-)
 1.68 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.67 21-Jan-2005  tsutsui branches: 1.67.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.66 17-Jan-2005  cube Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also. With the exception of i386's
GENERIC_TINY.

XXX: we _need_ some way of making this more simple.
 1.65 10-Nov-2004  christos branches: 1.65.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.64 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.63 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.62 26-Jun-2004  abs Add (commented out) ALTQ options to all GENERIC-like files
 1.61 22-Jun-2004  itojun have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
 1.60 18-Jun-2004  christos ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM
 1.59 16-Jun-2004  christos Add pseudo-device ptm on all the generic flavored kernels.
 1.58 22-Sep-2003  cl branches: 1.58.2;
add COMPAT_15/COMPAT_16
 1.57 27-Apr-2003  tsutsui branches: 1.57.2;
Sync with GENERIC:
- add #options BRIDGE_IPF
- add pseudo-device ksyms
 1.56 10-Apr-2003  christos Bye Bye UCONSOLE
 1.55 22-Nov-2002  wiz Fix typo (responsiness -> responsiveness).
 1.54 18-Oct-2002  tsutsui Add (commented out) options NEW_BUFQ_STRATEGY and pseudo-device cgd.
(sync with GENERIC)
 1.53 06-Oct-2002  tsutsui Sync with GENERIC:
- Add options SYSTRACE
- Add (commented out) options for semaphores
 1.52 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.51 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.50 25-Apr-2002  atatat branches: 1.50.2; 1.50.4;
Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
 1.49 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.48 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.47 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.46 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.45 23-Nov-2001  atatat The bridge(4) pseudo-device no longer requires the port to
__HAVE_GENERIC_SOFT_INTERRUPTS, so add it back to all GENERIC configs.
 1.44 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.43 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.42 01-Sep-2001  atatat branches: 1.42.6;
Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS. bridge(4) doesn't compile there.
 1.41 01-Sep-2001  atatat Add bridge pseudo devices to GENERIC configs
 1.40 08-Jul-2001  abs branches: 1.40.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.39 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.38 22-Feb-2001  chs branches: 1.38.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.37 19-Dec-2000  tsutsui Remove "rnd is EXPERIMENTAL" comments.
 1.36 19-Dec-2000  tsutsui Add pseudo-device vlan.
 1.35 28-Oct-2000  tsutsui Enable options SOFTDEP.
 1.34 04-Oct-2000  itojun enable rnd(4)
 1.33 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.32 14-Jun-2000  veego branches: 1.32.2;
Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
 1.31 09-Jun-2000  tsutsui Add (commented out) stf. (sync with GENERIC)
 1.30 09-Jun-2000  tsutsui Enable vnd.
 1.29 01-Apr-2000  tsutsui branches: 1.29.2;
Add OVERLAY and RAID_AUTOCONFIG. (sync with GENERIC)
 1.28 10-Jan-2000  tsutsui Add IPv6 stuff.
 1.27 15-Nov-1999  fvdl Add commented out option SOFTDEP to all GENERIC kernels.
 1.26 29-Jul-1999  augustss branches: 1.26.2; 1.26.8;
It's time to be COMPAT_14.
 1.25 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.24 08-Apr-1999  gwr branches: 1.24.2; 1.24.4;
Make "dma" a real device so it can attach before esp.
 1.23 17-Dec-1998  gwr Sync with GENERIC
 1.22 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.21 11-Jun-1998  fair turn on LKM by default, per PR#4423
 1.20 18-Mar-1998  bouyer Add commented out "options FFS_EI"
 1.19 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.18 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.17 22-Jan-1998  gwr branches: 1.17.4;
Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.16 01-Dec-1997  kleink Add COMPAT_13.
 1.15 20-Nov-1997  fair add pseudo-device rnd, commented out
 1.14 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.13 17-Oct-1997  gwr branches: 1.13.2;
Add COMPAT_1?
 1.12 16-Oct-1997  gwr Add VME support
 1.11 07-Oct-1997  gwr cosmetic
 1.10 07-Oct-1997  gwr Add the ie driver (and reorder some things)
 1.9 23-Aug-1997  mjacob add a before tab to SCSIVERBOSE
 1.8 20-Aug-1997  mjacob add commented out reference SCSIVERBOSE option
 1.7 07-May-1997  lukem branches: 1.7.4;
cleanup use of whitespace
 1.6 12-Apr-1997  gwr Document the flags accepted by the esp driver.
 1.5 09-Apr-1997  jeremy Add floppy controller and floppy drive. Also add MS-DOS filesystem for
use with floppies. Remove 'SYMTAB_SPACE' now that we have our own
bootloader.
 1.4 24-Mar-1997  gwr No longer need SYMTAB_SPACE now that sun3x/stand/* works.
(Thanks, Jeremy!)
 1.3 21-Mar-1997  jeremy Fixed address for bwtwo framebuffer.
 1.2 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.1 24-Feb-1997  jeremy branches: 1.1.2;
The first GENERIC config for sun3x. Includes new esp driver.
 1.1.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.4.2 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.13.2.1 20-Nov-1997  mellon Pull rev 1.15 up from trunk (fair)
 1.17.4.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.17.4.1 27-Jan-1998  gwr Sun3X config.
 1.24.4.2 02-Aug-1999  thorpej Update from trunk.
 1.24.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.24.2.3 03-Jun-2000  he Apply patch (requested by he):
Disable the UNION file system, to avoid a repeat of the 1.4.1
and 1.4.2 LAST_MINUTE changes. It is reportedly buggy, and can
be used by ordinary users to crash the system.
 1.24.2.2 29-Feb-2000  he Apply patch (requested by toddpw):
Add 4 vnd pseudo-devices to GENERIC and ``MAKEDEV all'' for sun3.
 1.24.2.1 08-Apr-1999  he file GENERIC3X was added on branch netbsd-1-4 on 2000-02-29 23:45:27 +0000
 1.26.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.26.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.26.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.26.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.26.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.29.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.32.2.3 01-May-2001  he Pull up revisions 1.36-1.37 (requested by he):
Add pseudo-device vlan.
Make sure "rnd is EXPERIMENTAL" comment is removed.
 1.32.2.2 30-Oct-2000  tv Pullup 1.35 [tsutsui]:
Enable options SOFTDEP.
 1.32.2.1 05-Oct-2000  itojun pullup (approved by releng-1-5)
enable rnd(4).

> cvs rdiff -r1.33 -r1.34 syssrc/sys/arch/sun3/conf/GENERIC3X
> cvs rdiff -r1.33 -r1.34 syssrc/sys/arch/bebox/conf/GENERIC
> cvs rdiff -r1.14 -r1.15 syssrc/sys/arch/mvme68k/conf/GENERIC
 1.38.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.40.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.40.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.40.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.40.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.40.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.40.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.42.6.8 11-Dec-2002  thorpej Sync with HEAD.
 1.42.6.7 11-Nov-2002  nathanw Catch up to -current
 1.42.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.42.6.5 20-Jun-2002  nathanw Catch up to -current.
 1.42.6.4 17-Apr-2002  nathanw Catch up to -current.
 1.42.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.42.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.42.6.1 01-Sep-2001  nathanw file GENERIC3X was added on branch nathanw_sa on 2002-01-08 00:28:16 +0000
 1.50.4.1 01-Aug-2002  lukem Pull up revision 1.51 (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.50.2.1 15-Jul-2002  gehenna catch up with -current.
 1.57.2.10 11-Dec-2005  christos Sync with head.
 1.57.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.57.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.57.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.57.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.57.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.57.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.57.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.57.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.57.2.1 03-Aug-2004  skrll Sync with HEAD
 1.58.2.3 15-Jul-2004  he Pull up revision 1.64 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.58.2.2 02-Jul-2004  he Pull up revision 1.63 (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.58.2.1 30-Jun-2004  jdc Pull up revision 1.62 (requested by abs in ticket #567).

Add (commented out) ALTQ options to all GENERIC-like files
 1.65.4.1 29-Apr-2005  kent sync with -current
 1.67.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.67.2.1 12-Feb-2005  yamt sync with head.
 1.72.4.2 14-Aug-2005  riz Pull up revision 1.76 (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.72.4.1 18-Jul-2005  riz Pull up revision 1.75 (requested by tron in ticket #566):
Add (commented out) IPSEC_NAT_T option.
 1.74.2.5 21-Jan-2008  yamt sync with head
 1.74.2.4 15-Nov-2007  yamt sync with head.
 1.74.2.3 03-Sep-2007  yamt sync with head.
 1.74.2.2 30-Dec-2006  yamt sync with head.
 1.74.2.1 21-Jun-2006  yamt sync with head.
 1.84.4.1 09-Sep-2006  rpaulo sync with head
 1.84.2.1 18-Feb-2006  yamt sync with head.
 1.85.2.1 22-Apr-2006  simonb Sync with head.
 1.87.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.87.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.87.2.3 03-Sep-2006  yamt sync with head.
 1.87.2.2 11-Aug-2006  yamt sync with head
 1.87.2.1 01-Apr-2006  yamt sync with head.
 1.88.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.89.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.89.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.92.4.2 10-Dec-2006  yamt sync with head.
 1.92.4.1 22-Oct-2006  yamt sync with head
 1.92.2.1 18-Nov-2006  ad Sync with head.
 1.94.18.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.94.16.2 03-Oct-2007  garbled Sync with HEAD
 1.94.16.1 26-Jun-2007  garbled Sync with HEAD.
 1.94.10.1 11-Jul-2007  mjf Sync with head.
 1.94.8.3 03-Dec-2007  ad Sync with HEAD.
 1.94.8.2 20-Aug-2007  ad Sync with HEAD.
 1.94.8.1 09-Jun-2007  ad Sync with head.
 1.94.2.1 06-Jun-2007  bouyer pullup the following revisions (requested my martin in ticket #699):
sys/arch/acorn26/conf/GENERIC 1.50
sys/arch/acorn32/conf/GENERIC 1.79
sys/arch/alpha/conf/GENERIC 1.313
sys/arch/amd64/conf/GENERIC 1.148
sys/arch/amiga/conf/GENERIC 1.245
sys/arch/arc/conf/GENERIC 1.146
sys/arch/bebox/conf/GENERIC 1.105
sys/arch/cats/conf/GENERIC 1.115
sys/arch/cobalt/conf/GENERIC 1.108
sys/arch/dreamcast/conf/GENERIC 1.78
sys/arch/ews4800mips/conf/GENERIC 1.18
sys/arch/hp300/conf/GENERIC 1.139
sys/arch/hp700/conf/GENERIC 1.74
sys/arch/hpcmips/conf/GENERIC 1.196
sys/arch/i386/conf/GENERIC 1.831
sys/arch/iyonix/conf/GENERIC 1.38 via patch
sys/arch/landisk/conf/GENERIC 1.8 via patch
sys/arch/luna68k/conf/GENERIC 1.78
sys/arch/mac68k/conf/GENERIC 1.181
sys/arch/macppc/conf/GENERIC 1.256 via patch
sys/arch/mipsco/conf/GENERIC 1.65
sys/arch/mmeye/conf/GENERIC 1.88
sys/arch/mvme68k/conf/GENERIC 1.71
sys/arch/news68k/conf/GENERIC 1.88
sys/arch/newsmips/conf/GENERIC 1.98
sys/arch/next68k/conf/GENERIC 1.108
sys/arch/ofppc/conf/GENERIC 1.98
sys/arch/pc532/conf/GENERIC 1.70
sys/arch/pmax/conf/GENERIC 1.152
sys/arch/prep/conf/GENERIC 1.135
sys/arch/sbmips/conf/GENERIC 1.61
sys/arch/sparc/conf/GENERIC 1.199
sys/arch/sparc64/conf/GENERIC 1.85
sys/arch/sun3/conf/GENERIC 1.138
sys/arch/vax/conf/GENERIC 1.157
sys/arch/x68k/conf/GENERIC 1.134
sys/arch/amiga/conf/GENERIC.in 1.59
sys/arch/sgimips/conf/GENERIC32_IP2x 1.66
sys/arch/sgimips/conf/GENERIC32_IP3x 1.63
sys/arch/sun3/conf/GENERIC3X 1.95
sys/arch/atari/conf/GENERIC.in 1.66

Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
 1.95.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.95.2.1 07-Aug-2007  matt Sync with HEAD.
 1.96.10.1 13-Nov-2007  bouyer Sync with HEAD
 1.96.6.2 09-Jan-2008  matt sync with HEAD
 1.96.6.1 06-Nov-2007  matt sync with HEAD
 1.96.4.1 04-Nov-2007  jmcneill Sync with HEAD.
 1.98.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.98.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.99.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.99.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.99.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.100.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.100.10.1 19-Oct-2008  haad Sync with HEAD.
 1.100.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.100.4.2 11-Aug-2010  yamt sync with head.
 1.100.4.1 04-May-2009  yamt sync with head.
 1.102.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.105.6.3 21-Apr-2011  rmind sync with head
 1.105.6.2 05-Mar-2011  rmind sync with head
 1.105.6.1 30-May-2010  rmind sync with head
 1.105.4.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.105.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.105.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.110.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.110.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.112.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.112.2.2 30-Oct-2012  yamt sync with head
 1.112.2.1 17-Apr-2012  yamt sync with head
 1.113.2.2 11-Mar-2012  mrg sync to latest -current
 1.113.2.1 18-Feb-2012  mrg merge to -current.
 1.115.2.4 03-Dec-2017  jdolecek update from HEAD
 1.115.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.115.2.2 23-Jun-2013  tls resync from head
 1.115.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.121.2.1 28-Aug-2013  rmind sync with head
 1.122.6.1 15-May-2015  snj Pull up following revision(s) (requested by jnemeth in ticket #762):
share/man/man4/options.4: revision 1.442
sys/arch/amd64/conf/ALL: revision 1.18
sys/arch/amd64/conf/GENERIC: revision 1.396
sys/arch/dreamcast/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.6
sys/arch/evbarm/conf/BCM5301X: revision 1.24
sys/arch/evbarm/conf/BCM56340: revision 1.9
sys/arch/evbarm/conf/IMX23_OLINUXINO: revision 1.9
sys/arch/evbarm/conf/std.beagle: revision 1.13
sys/arch/evbarm/conf/std.kobo: revision 1.2
sys/arch/evbarm/conf/std.netwalker: revision 1.10
sys/arch/evbppc/conf/P2020DS: revision 1.25
sys/arch/evbppc/conf/RB800: revision 1.30
sys/arch/evbppc/conf/TWRP1025: revision 1.18
sys/arch/hp300/conf/GENERIC: revision 1.187
sys/arch/hpcsh/conf/GENERIC: revision 1.104
sys/arch/i386/conf/GENERIC: revision 1.1111
sys/arch/i386/conf/MONOLITHIC: revision 1.17
sys/arch/landisk/conf/GENERIC: revision 1.43
sys/arch/luna68k/conf/GENERIC: revision 1.117
sys/arch/macppc/conf/GENERIC: revision 1.316
sys/arch/macppc/conf/GENERIC_601: revision 1.5
sys/arch/mmeye/conf/MMEYE_WLF: revision 1.16
sys/arch/news68k/conf/GENERIC: revision 1.123
sys/arch/sandpoint/conf/GENERIC: revision 1.85
sys/arch/shark/conf/GENERIC: revision 1.119
sys/arch/sparc/conf/GENERIC: revision 1.246
sys/arch/sparc64/conf/GENERIC: revision 1.174
sys/arch/sun3/conf/GENERIC3X: revision 1.125
sys/arch/sun3/conf/GENERIC: revision 1.169
sys/arch/x68k/conf/GENERIC: revision 1.177
sys/arch/zaurus/conf/GENERIC: revision 1.62
sys/conf/files: revision 1.1099
sys/kern/kern_module.c: revisions 1.98, 1.99
Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR". This
option turns on module autoloading by default (which is the current
default). This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
--
fix typo. (s/MODULE_DEFAULT_AUTOLOAD/MODULAR_DEFAULT_AUTOLOAD/)
 1.125.2.2 28-Aug-2017  skrll Sync with HEAD
 1.125.2.1 22-Sep-2015  skrll Sync with HEAD
 1.126.10.2 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- 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.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.126.10.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.130.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.130.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.130.2.1 15-Mar-2018  pgoyette Synch with HEAD
 1.131.2.1 10-Jun-2019  christos Sync with HEAD
 1.134.2.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.138.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.15 22-Jan-1998  gwr branches: 1.15.2;
Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.14 13-Dec-1997  gwr Sync with GENERIC
 1.13 01-Dec-1997  kleink Add COMPAT_13.
 1.12 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.11 07-May-1997  lukem branches: 1.11.8;
clean up whitespace use
 1.10 11-Mar-1997  gwr Sync up with changes in GENERIC
 1.9 10-Feb-1997  gwr Actually works now.
 1.8 31-Jan-1997  thorpej branches: 1.8.2;
Adopt for new file system and root spec grammar.
 1.7 11-Jan-1997  mikel branches: 1.7.2;
add 'pseudo-device ccd' where necessary; PR kern/1830.
 1.6 28-Dec-1996  pk rename: ramdisk => md
 1.5 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.4 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.3 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.2 26-Aug-1996  mrg add COMPAT_12.
 1.1 15-Jun-1996  gwr branches: 1.1.2;
Add KGDB support
 1.1.2.2 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.1.2.1 15-Jun-1996  gwr file GENERIC_KGDB was added on branch netbsd-1-2 on 1996-08-19 23:35:07 +0000
 1.7.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.8.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.8.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.11.8.1 14-Dec-1997  mellon Pull rev 1.14 up from trunk (gwr)
 1.15.2.1 25-Jan-1998  gwr Now just KGDB
 1.63 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.62 19-Jun-2020  tsutsui branches: 1.62.2;
Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.61 01-Aug-2018  maxv branches: 1.61.4;
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.60 14-Sep-2017  mrg branches: 1.60.2; 1.60.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.59 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.58 07-Aug-2015  maxv Remove the KMEMSTATS option. It no longer exists.
 1.57 23-Aug-2014  dholland branches: 1.57.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.56 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.55 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.54 27-Apr-2013  christos branches: 1.54.4;
remove confusing numeric locators where they are unused.
 1.53 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.52 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.51 18-Dec-2011  dholland branches: 1.51.6;
WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.50 22-Nov-2011  tls branches: 1.50.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.49 30-Jun-2011  wiz branches: 1.49.2;
dependant -> dependent
 1.48 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.47 23-Nov-2010  hannken branches: 1.47.2; 1.47.4;
Remove unused count from pseudo-device md.
 1.46 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.45 06-Mar-2009  joerg branches: 1.45.2; 1.45.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.44 17-Jan-2009  tsutsui branches: 1.44.2;
Add options COMPAT_50.
 1.43 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.42 31-Jul-2008  simonb branches: 1.42.2;
Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.41 17-Oct-2007  garbled branches: 1.41.16; 1.41.20; 1.41.22; 1.41.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.40 18-Jul-2007  tsutsui branches: 1.40.6;
- add options COMPAT_40
- use options<space><tab>
 1.39 29-Dec-2006  yamt branches: 1.39.6; 1.39.14; 1.39.16; 1.39.18;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.38 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.37 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

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

XXX: This option should be mentioned in options(4).
 1.31 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.30 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.29 19-Aug-2005  christos 64 bit inode changes.
 1.28 18-Feb-2005  dsl branches: 1.28.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.27 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.26 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

- File system snapshot device fss(4) added to all kernel configs that
have a disk. Device is commented out on all non-GENERIC kernels.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.25 21-Jan-2005  tsutsui branches: 1.25.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.24 10-Nov-2004  christos branches: 1.24.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.23 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.22 22-Sep-2003  cl branches: 1.22.2;
add COMPAT_15/COMPAT_16
 1.21 06-Sep-2003  itojun add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more. see tech-security
 1.20 10-Apr-2003  christos branches: 1.20.2;
Bye Bye UCONSOLE
 1.19 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.18 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.17 25-Apr-2002  atatat branches: 1.17.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.16 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.15 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.14 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.13 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.12 08-Jul-2001  abs branches: 1.12.2; 1.12.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.11 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.10 22-Feb-2001  chs branches: 1.10.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.9 19-Dec-2000  tsutsui Remove "rnd is EXPERIMANTAL" comments.
 1.8 02-Oct-2000  abs Ensure all INSTALL* kernels have two ptys, and a note explaining why:
pseudo-device pty 2 # pseudo-terminals (Sysinst needs two)
(Some installers may not be using sysinst, in which case this just reduces
the number of ptys from 16 that are not used to 2 that are not used)
For i386 conf files, no change other than comments.
 1.7 25-Sep-2000  abs Use "options<SPACE><TAB>" not "options<TAB>" - noted by simonb.
Move VNODE_OP_NOINLINE and NFS_V2_ONLY into '# Filesystem options' section.
Consistently label '# Filesystem options' and '#File systems' sections.
 1.6 25-Sep-2000  abs Ensure all INSTALL config files have (at least) COPTS="-Os", cincluding bebox
based on it working already for macppc.
Also add commented out:
#options VNODE_OP_NOINLINE # Don't inline vnode op calls
#options NFS_V2_ONLY # Exclude NFS3 and NQNFS code
as suggestions for additional savings
 1.5 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.4 29-Jul-1999  augustss branches: 1.4.2;
It's time to be COMPAT_14.
 1.3 08-Apr-1999  gwr branches: 1.3.2; 1.3.4;
sync with GENERIC
 1.2 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.1 08-Mar-1998  gwr branches: 1.1.2;
Leaner configurations for the installation media.
(Small enough to work on all machines.)
 1.1.2.2 29-May-1998  mycroft Pull up patch from gwr.
 1.1.2.1 08-Mar-1998  mycroft file INSTALL was added on branch netbsd-1-3 on 1998-05-29 17:41:21 +0000
 1.3.4.1 02-Aug-1999  thorpej Update from trunk.
 1.3.2.2 08-Apr-1999  gwr sync with GENERIC
 1.3.2.1 08-Apr-1999  gwr file INSTALL was added on branch netbsd-1-4 on 1999-04-08 07:00:59 +0000
 1.4.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.4.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.4.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.12.8.6 01-Aug-2002  nathanw Catch up to -current.
 1.12.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.12.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.12.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.12.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.12.8.1 08-Jul-2001  nathanw file INSTALL was added on branch nathanw_sa on 2002-01-08 00:28:16 +0000
 1.12.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.12.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.12.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.17.2.1 17-Jul-2002  gehenna catch up with -current.
 1.20.2.10 11-Dec-2005  christos Sync with head.
 1.20.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.20.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.20.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.20.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.2.1 15-Jul-2004  he Pull up revision 1.23 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.24.4.1 29-Apr-2005  kent sync with -current
 1.25.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.25.2.1 12-Feb-2005  yamt sync with head.
 1.28.6.3 03-Sep-2007  yamt sync with head.
 1.28.6.2 30-Dec-2006  yamt sync with head.
 1.28.6.1 21-Jun-2006  yamt sync with head.
 1.33.6.1 22-Apr-2006  simonb Sync with head.
 1.33.4.1 09-Sep-2006  rpaulo sync with head
 1.33.2.1 18-Feb-2006  yamt sync with head.
 1.35.2.1 03-Sep-2006  yamt sync with head.
 1.36.4.1 22-Oct-2006  yamt sync with head
 1.36.2.2 12-Jan-2007  ad Sync with head.
 1.36.2.1 18-Nov-2006  ad Sync with head.
 1.39.18.1 15-Aug-2007  skrll Sync with HEAD.
 1.39.16.1 07-Aug-2007  matt Sync with HEAD.
 1.39.14.1 03-Oct-2007  garbled Sync with HEAD
 1.39.6.1 20-Aug-2007  ad Sync with HEAD.
 1.40.6.1 06-Nov-2007  matt sync with HEAD
 1.41.26.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.41.26.1 19-Oct-2008  haad Sync with HEAD.
 1.41.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.41.20.2 11-Aug-2010  yamt sync with head.
 1.41.20.1 04-May-2009  yamt sync with head.
 1.41.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.41.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.42.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.42.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.44.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.45.4.3 21-Apr-2011  rmind sync with head
 1.45.4.2 05-Mar-2011  rmind sync with head
 1.45.4.1 30-May-2010  rmind sync with head
 1.45.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.47.4.1 08-Feb-2011  bouyer Add QUOTA2 where QUOTA is enabled (and QUOTA2 commented out where QUOTA
is commented out)
 1.47.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.49.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.49.2.2 30-Oct-2012  yamt sync with head
 1.49.2.1 17-Apr-2012  yamt sync with head
 1.50.2.1 18-Feb-2012  mrg merge to -current.
 1.51.6.4 03-Dec-2017  jdolecek update from HEAD
 1.51.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.51.6.2 23-Jun-2013  tls resync from head
 1.51.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.54.4.1 28-Aug-2013  rmind sync with head
 1.57.2.2 28-Aug-2017  skrll Sync with HEAD
 1.57.2.1 22-Sep-2015  skrll Sync with HEAD
 1.60.4.1 10-Jun-2019  christos Sync with HEAD
 1.60.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.61.4.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.62.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.62 21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.61 19-Jun-2020  tsutsui branches: 1.61.2;
Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.60 01-Aug-2018  maxv branches: 1.60.4;
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.59 14-Sep-2017  mrg branches: 1.59.2; 1.59.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.58 28-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.57 07-Aug-2015  maxv Remove the KMEMSTATS option. It no longer exists.
 1.56 23-Aug-2014  dholland branches: 1.56.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.55 16-Aug-2014  apb Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.54 30-Jun-2013  rmind G/C PFIL_HOOKS from the kernel configs.
 1.53 27-Apr-2013  christos branches: 1.53.4;
remove confusing numeric locators where they are unused.
 1.52 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.51 17-Oct-2012  apb Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
 1.50 18-Dec-2011  dholland branches: 1.50.6;
WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
 1.49 22-Nov-2011  tls branches: 1.49.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.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-Mar-2009  joerg branches: 1.44.2; 1.44.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.43 17-Jan-2009  tsutsui branches: 1.43.2;
Add options COMPAT_50.
 1.42 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.41 31-Jul-2008  simonb branches: 1.41.2;
Add "options WAPBL" to standard GENERIC/INSTALL type configs.
 1.40 17-Oct-2007  garbled branches: 1.40.16; 1.40.20; 1.40.22; 1.40.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.39 18-Jul-2007  tsutsui branches: 1.39.6;
- add options COMPAT_40
- use options<space><tab>
 1.38 29-Dec-2006  yamt branches: 1.38.6; 1.38.14; 1.38.16; 1.38.18;
update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
 1.37 02-Oct-2006  chs remove MALLOC_NOINLINE, it doesn't do anything anymore.
 1.36 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

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

XXX: This option should be mentioned in options(4).
 1.30 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.29 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.28 19-Aug-2005  christos 64 bit inode changes.
 1.27 18-Feb-2005  dsl branches: 1.27.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.26 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.25 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.24 30-Jan-2005  tsutsui Enable disconnect/reselect for esp(4) on 3/80 by default.

It also implies to enable tagged queueing, which works fine on my 3/80:
---
NetBSD 2.99.15 (CHARIOT) #184: Sun Jan 30 07:13:08 JST 2005
tsutsui@mirage:/usr/src/sys/arch/sun3/compile/CHARIOT
Model: sun3x 80
fpu: mc68882
total memory = 65536 KB
avail memory = 62496 KB
mainbus0 (root)
obio0 at mainbus0
:
dma0 at obio0 addr 0x66001000 ipl 2: rev 0
esp0 at obio0 addr 0x66000000 ipl 2: ESP100, 20MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
:
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST31230N, HP04> disk fixed
sd0: 1001 MB, 3992 cyl, 5 head, 102 sec, 512 bytes/sect x 2051460 sectors
sd0: async, 8-bit transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <FUJITSU, M1606S-512, 6237> disk fixed
sd1: 1041 MB, 3457 cyl, 6 head, 102 sec, 512 bytes/sect x 2131992 sectors
sd1: async, 8-bit transfers, tagged queueing
boot device: sd0a
:
---
(yes, async but tagged queueing :-)
 1.23 21-Jan-2005  tsutsui branches: 1.23.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.22 15-Jul-2004  atatat branches: 1.22.4;
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.21 22-Sep-2003  cl branches: 1.21.2;
add COMPAT_15/COMPAT_16
 1.20 10-Apr-2003  christos branches: 1.20.2;
Bye Bye UCONSOLE
 1.19 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.18 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.17 25-Apr-2002  atatat branches: 1.17.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.16 12-Apr-2002  gmcgarry Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
 1.15 27-Jan-2002  jdolecek add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
 1.14 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.13 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.12 08-Jul-2001  abs branches: 1.12.2; 1.12.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.11 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.10 22-Feb-2001  chs branches: 1.10.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.9 19-Dec-2000  tsutsui Remove "rnd is EXPERIMANTAL" comments.
 1.8 02-Oct-2000  abs Ensure all INSTALL* kernels have two ptys, and a note explaining why:
pseudo-device pty 2 # pseudo-terminals (Sysinst needs two)
(Some installers may not be using sysinst, in which case this just reduces
the number of ptys from 16 that are not used to 2 that are not used)
For i386 conf files, no change other than comments.
 1.7 25-Sep-2000  abs Use "options<SPACE><TAB>" not "options<TAB>" - noted by simonb.
Move VNODE_OP_NOINLINE and NFS_V2_ONLY into '# Filesystem options' section.
Consistently label '# Filesystem options' and '#File systems' sections.
 1.6 25-Sep-2000  abs Ensure all INSTALL config files have (at least) COPTS="-Os", cincluding bebox
based on it working already for macppc.
Also add commented out:
#options VNODE_OP_NOINLINE # Don't inline vnode op calls
#options NFS_V2_ONLY # Exclude NFS3 and NQNFS code
as suggestions for additional savings
 1.5 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.4 29-Jul-1999  augustss branches: 1.4.2;
It's time to be COMPAT_14.
 1.3 08-Apr-1999  gwr branches: 1.3.2; 1.3.4;
sync with GENERIC3X
 1.2 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.1 08-Mar-1998  gwr Leaner configurations for the installation media.
(Small enough to work on all machines.)
 1.3.4.1 02-Aug-1999  thorpej Update from trunk.
 1.3.2.2 08-Apr-1999  gwr sync with GENERIC3X
 1.3.2.1 08-Apr-1999  gwr file INSTALL3X was added on branch netbsd-1-4 on 1999-04-08 06:49:55 +0000
 1.4.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.4.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.4.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.8.7 18-Oct-2002  nathanw Catch up to -current.
 1.12.8.6 01-Aug-2002  nathanw Catch up to -current.
 1.12.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.12.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.12.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.12.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.12.8.1 08-Jul-2001  nathanw file INSTALL3X was added on branch nathanw_sa on 2002-01-08 00:28:16 +0000
 1.12.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.12.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.12.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.12.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.17.2.1 17-Jul-2002  gehenna catch up with -current.
 1.20.2.9 11-Dec-2005  christos Sync with head.
 1.20.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.20.2.6 15-Feb-2005  skrll Sync with HEAD.
 1.20.2.5 04-Feb-2005  skrll Sync with HEAD.
 1.20.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.2.1 15-Jul-2004  he Pull up revision 1.22 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.22.4.1 29-Apr-2005  kent sync with -current
 1.23.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.23.2.1 12-Feb-2005  yamt sync with head.
 1.27.6.3 03-Sep-2007  yamt sync with head.
 1.27.6.2 30-Dec-2006  yamt sync with head.
 1.27.6.1 21-Jun-2006  yamt sync with head.
 1.32.6.1 22-Apr-2006  simonb Sync with head.
 1.32.4.1 09-Sep-2006  rpaulo sync with head
 1.32.2.1 18-Feb-2006  yamt sync with head.
 1.34.2.1 03-Sep-2006  yamt sync with head.
 1.35.4.1 22-Oct-2006  yamt sync with head
 1.35.2.2 12-Jan-2007  ad Sync with head.
 1.35.2.1 18-Nov-2006  ad Sync with head.
 1.38.18.1 15-Aug-2007  skrll Sync with HEAD.
 1.38.16.1 07-Aug-2007  matt Sync with HEAD.
 1.38.14.1 03-Oct-2007  garbled Sync with HEAD
 1.38.6.1 20-Aug-2007  ad Sync with HEAD.
 1.39.6.1 06-Nov-2007  matt sync with HEAD
 1.40.26.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.40.26.1 19-Oct-2008  haad Sync with HEAD.
 1.40.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.40.20.2 11-Aug-2010  yamt sync with head.
 1.40.20.1 04-May-2009  yamt sync with head.
 1.40.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.40.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.41.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.41.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.43.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.44.4.3 21-Apr-2011  rmind sync with head
 1.44.4.2 05-Mar-2011  rmind sync with head
 1.44.4.1 30-May-2010  rmind sync with head
 1.44.2.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.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.48.2.2 30-Oct-2012  yamt sync with head
 1.48.2.1 17-Apr-2012  yamt sync with head
 1.49.2.1 18-Feb-2012  mrg merge to -current.
 1.50.6.4 03-Dec-2017  jdolecek update from HEAD
 1.50.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.6.2 23-Jun-2013  tls resync from head
 1.50.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.53.4.1 28-Aug-2013  rmind sync with head
 1.56.2.2 28-Aug-2017  skrll Sync with HEAD
 1.56.2.1 22-Sep-2015  skrll Sync with HEAD
 1.59.4.1 10-Jun-2019  christos Sync with HEAD
 1.59.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.60.4.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.61.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.53 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.52 18-Jul-2007  tsutsui branches: 1.52.6;
Make KGDB config files just include GENERIC{,3X} and
use <no> keyword of config(9).
 1.51 27-Sep-2006  manu branches: 1.51.8; 1.51.16; 1.51.20; 1.51.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.50 26-Aug-2006  christos branches: 1.50.2; 1.50.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.49 05-Feb-2006  cube branches: 1.49.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.48 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.47 07-Dec-2005  tsutsui branches: 1.47.2; 1.47.4; 1.47.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.46 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.45 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.44 19-Aug-2005  christos 64 bit inode changes.
 1.43 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.42 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.41 18-Feb-2005  dsl branches: 1.41.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.40 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.39 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.38 21-Jan-2005  tsutsui branches: 1.38.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.37 10-Nov-2004  christos branches: 1.37.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.36 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.35 22-Sep-2003  cl branches: 1.35.2;
add COMPAT_15/COMPAT_16
 1.34 10-Apr-2003  christos branches: 1.34.2;
Bye Bye UCONSOLE
 1.33 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.32 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.31 25-Apr-2002  atatat branches: 1.31.2; 1.31.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.30 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.29 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.28 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.27 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.26 08-Jul-2001  abs branches: 1.26.2; 1.26.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.25 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.24 22-Feb-2001  chs branches: 1.24.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.23 19-Dec-2000  tsutsui Remove "rnd is EXPERIMANTAL" comments.
 1.22 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.21 29-Jul-1999  augustss branches: 1.21.2;
It's time to be COMPAT_14.
 1.20 08-Apr-1999  gwr branches: 1.20.2; 1.20.4;
sync with GENERIC
 1.19 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.18 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.17 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.16 28-Jan-1998  gwr Add NFS_BOOT_BOOTPARAM (fixes PR#4904)
 1.15 22-Jan-1998  gwr branches: 1.15.4;
Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.14 13-Dec-1997  gwr Sync with GENERIC
 1.13 01-Dec-1997  kleink Add COMPAT_13.
 1.12 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.11 07-May-1997  lukem branches: 1.11.8;
clean up whitespace use
 1.10 11-Mar-1997  gwr Sync up with changes in GENERIC
 1.9 10-Feb-1997  gwr Actually works now.
 1.8 31-Jan-1997  thorpej branches: 1.8.2;
Adopt for new file system and root spec grammar.
 1.7 11-Jan-1997  mikel branches: 1.7.2;
add 'pseudo-device ccd' where necessary; PR kern/1830.
 1.6 28-Dec-1996  pk rename: ramdisk => md
 1.5 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.4 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.3 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.2 26-Aug-1996  mrg add COMPAT_12.
 1.1 15-Jun-1996  gwr branches: 1.1.2;
Add KGDB support
 1.1.2.2 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.1.2.1 15-Jun-1996  gwr file KGDB was added on branch netbsd-1-2 on 1996-08-19 23:35:07 +0000
 1.7.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.8.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.8.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.11.8.1 14-Dec-1997  mellon Pull rev 1.14 up from trunk (gwr)
 1.15.4.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.15.4.1 27-Jan-1998  gwr Sun3 config.
 1.20.4.1 02-Aug-1999  thorpej Update from trunk.
 1.20.2.2 08-Apr-1999  gwr sync with GENERIC
 1.20.2.1 08-Apr-1999  gwr file KGDB was added on branch netbsd-1-4 on 1999-04-08 07:00:59 +0000
 1.21.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.21.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.21.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.26.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.26.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.26.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.26.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.26.8.1 08-Jul-2001  nathanw file KGDB was added on branch nathanw_sa on 2002-01-08 00:28:16 +0000
 1.26.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.26.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.26.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.26.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.26.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.31.4.1 01-Aug-2002  lukem Pull up revision 1.32 (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.31.2.1 15-Jul-2002  gehenna catch up with -current.
 1.34.2.10 11-Dec-2005  christos Sync with head.
 1.34.2.9 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.8 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.34.2.7 15-Feb-2005  skrll Sync with HEAD.
 1.34.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.34.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.34.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.34.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.2.1 15-Jul-2004  he Pull up revision 1.36 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.37.4.1 29-Apr-2005  kent sync with -current
 1.38.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.38.2.1 12-Feb-2005  yamt sync with head.
 1.41.6.3 03-Sep-2007  yamt sync with head.
 1.41.6.2 30-Dec-2006  yamt sync with head.
 1.41.6.1 21-Jun-2006  yamt sync with head.
 1.47.6.1 22-Apr-2006  simonb Sync with head.
 1.47.4.1 09-Sep-2006  rpaulo sync with head
 1.47.2.1 18-Feb-2006  yamt sync with head.
 1.49.2.1 03-Sep-2006  yamt sync with head.
 1.50.4.1 22-Oct-2006  yamt sync with head
 1.50.2.1 18-Nov-2006  ad Sync with head.
 1.51.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.51.20.1 07-Aug-2007  matt Sync with HEAD.
 1.51.16.1 03-Oct-2007  garbled Sync with HEAD
 1.51.8.1 20-Aug-2007  ad Sync with HEAD.
 1.52.6.1 06-Nov-2007  matt sync with HEAD
 1.55 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.54 18-Jul-2007  tsutsui branches: 1.54.6;
Make KGDB config files just include GENERIC{,3X} and
use <no> keyword of config(9).
 1.53 27-Sep-2006  manu branches: 1.53.8; 1.53.16; 1.53.20; 1.53.22;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.52 26-Aug-2006  christos branches: 1.52.2; 1.52.4;
PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
 1.51 05-Feb-2006  cube branches: 1.51.2;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.50 04-Feb-2006  rpaulo bpfilter doesn't accept count anymore.
 1.49 07-Dec-2005  tsutsui branches: 1.49.2; 1.49.4; 1.49.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.48 04-Sep-2005  isaki typo in comment. (since 1994?!)
 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 18-Feb-2005  dsl branches: 1.43.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.42 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.41 30-Jan-2005  tsutsui Enable disconnect/reselect for esp(4) on 3/80 by default.

It also implies to enable tagged queueing, which works fine on my 3/80:
---
NetBSD 2.99.15 (CHARIOT) #184: Sun Jan 30 07:13:08 JST 2005
tsutsui@mirage:/usr/src/sys/arch/sun3/compile/CHARIOT
Model: sun3x 80
fpu: mc68882
total memory = 65536 KB
avail memory = 62496 KB
mainbus0 (root)
obio0 at mainbus0
:
dma0 at obio0 addr 0x66001000 ipl 2: rev 0
esp0 at obio0 addr 0x66000000 ipl 2: ESP100, 20MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
:
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST31230N, HP04> disk fixed
sd0: 1001 MB, 3992 cyl, 5 head, 102 sec, 512 bytes/sect x 2051460 sectors
sd0: async, 8-bit transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <FUJITSU, M1606S-512, 6237> disk fixed
sd1: 1041 MB, 3457 cyl, 6 head, 102 sec, 512 bytes/sect x 2131992 sectors
sd1: async, 8-bit transfers, tagged queueing
boot device: sd0a
:
---
(yes, async but tagged queueing :-)
 1.40 21-Jan-2005  tsutsui branches: 1.40.2;
Remove options COMPAT_15 and add options COMPAT_20.
 1.39 10-Nov-2004  christos branches: 1.39.4;
Add COMPAT_BSDPTY to the rest of the config files.
 1.38 15-Jul-2004  atatat Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.37 22-Sep-2003  cl branches: 1.37.2;
add COMPAT_15/COMPAT_16
 1.36 10-Apr-2003  christos branches: 1.36.2;
Bye Bye UCONSOLE
 1.35 18-Sep-2002  lukem enable USERCONF by default; it's small and extremely useful to have available.
 1.34 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.33 25-Apr-2002  atatat branches: 1.33.2; 1.33.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.32 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.31 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.30 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.29 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.28 08-Jul-2001  abs branches: 1.28.2; 1.28.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.27 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.26 22-Feb-2001  chs branches: 1.26.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.25 19-Dec-2000  tsutsui Remove "rnd is EXPERIMANTAL" comments.
 1.24 24-Sep-2000  jdolecek don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
 1.23 29-Jul-1999  augustss branches: 1.23.2;
It's time to be COMPAT_14.
 1.22 08-Apr-1999  gwr branches: 1.22.2; 1.22.4;
sync with GENERIC3X
 1.21 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.20 08-Mar-1998  gwr Make comments refer to GENERIC3X, not GENERIC
 1.19 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.18 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.17 22-Jan-1998  gwr branches: 1.17.4;
Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.16 01-Dec-1997  kleink Add COMPAT_13.
 1.15 20-Nov-1997  fair add pseudo-device rnd, commented out
 1.14 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.13 17-Oct-1997  gwr branches: 1.13.2;
Add COMPAT_1?
 1.12 16-Oct-1997  gwr Add VME support
 1.11 07-Oct-1997  gwr cosmetic
 1.10 07-Oct-1997  gwr Add the ie driver (and reorder some things)
 1.9 23-Aug-1997  mjacob add a before tab to SCSIVERBOSE
 1.8 20-Aug-1997  mjacob add commented out reference SCSIVERBOSE option
 1.7 07-May-1997  lukem branches: 1.7.4;
cleanup use of whitespace
 1.6 12-Apr-1997  gwr Document the flags accepted by the esp driver.
 1.5 09-Apr-1997  jeremy Add floppy controller and floppy drive. Also add MS-DOS filesystem for
use with floppies. Remove 'SYMTAB_SPACE' now that we have our own
bootloader.
 1.4 24-Mar-1997  gwr No longer need SYMTAB_SPACE now that sun3x/stand/* works.
(Thanks, Jeremy!)
 1.3 21-Mar-1997  jeremy Fixed address for bwtwo framebuffer.
 1.2 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.1 24-Feb-1997  jeremy branches: 1.1.2;
The first GENERIC config for sun3x. Includes new esp driver.
 1.1.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.4.2 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.13.2.1 20-Nov-1997  mellon Pull rev 1.15 up from trunk (fair)
 1.17.4.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.17.4.1 27-Jan-1998  gwr Sun3X config.
 1.22.4.1 02-Aug-1999  thorpej Update from trunk.
 1.22.2.2 08-Apr-1999  gwr sync with GENERIC3X
 1.22.2.1 08-Apr-1999  gwr file KGDB3X was added on branch netbsd-1-4 on 1999-04-08 06:49:55 +0000
 1.23.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.23.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.23.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.26.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.28.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.28.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.28.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.28.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.28.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.28.8.1 08-Jul-2001  nathanw file KGDB3X was added on branch nathanw_sa on 2002-01-08 00:28:16 +0000
 1.28.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.28.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.28.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.28.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.28.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.33.4.1 01-Aug-2002  lukem Pull up revision 1.34 (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.33.2.1 15-Jul-2002  gehenna catch up with -current.
 1.36.2.9 11-Dec-2005  christos Sync with head.
 1.36.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.36.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.36.2.6 04-Feb-2005  skrll Sync with HEAD.
 1.36.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.36.2.4 14-Nov-2004  skrll Sync with HEAD.
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.37.2.1 15-Jul-2004  he Pull up revision 1.38 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.39.4.1 29-Apr-2005  kent sync with -current
 1.40.2.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.40.2.1 12-Feb-2005  yamt sync with head.
 1.43.6.3 03-Sep-2007  yamt sync with head.
 1.43.6.2 30-Dec-2006  yamt sync with head.
 1.43.6.1 21-Jun-2006  yamt sync with head.
 1.49.6.1 22-Apr-2006  simonb Sync with head.
 1.49.4.1 09-Sep-2006  rpaulo sync with head
 1.49.2.1 18-Feb-2006  yamt sync with head.
 1.51.2.1 03-Sep-2006  yamt sync with head.
 1.52.4.1 22-Oct-2006  yamt sync with head
 1.52.2.1 18-Nov-2006  ad Sync with head.
 1.53.22.1 15-Aug-2007  skrll Sync with HEAD.
 1.53.20.1 07-Aug-2007  matt Sync with HEAD.
 1.53.16.1 03-Oct-2007  garbled Sync with HEAD
 1.53.8.1 20-Aug-2007  ad Sync with HEAD.
 1.54.6.1 06-Nov-2007  matt sync with HEAD
 1.111 03-Jun-2023  lukem bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
CLANG_NO_ADDR_OF_PACKED_MEMBER
CC_NO_ADDR_OF_PACKED_MEMBER
GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.110 07-Sep-2020  mrg don't error array-bounds and packed-member issues with GCC 9.
 1.109 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.108 22-Sep-2018  rin No need to specify COMPAT_AS anymore.
Now, it is automatically determined from OPT_MODULAR.
 1.107 07-Mar-2018  maya branches: 1.107.2;
Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.106 03-Mar-2018  mrg branches: 1.106.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.105 25-Feb-2018  mrg add a special rule to build m68k/fpu.c to avoid passing -msoft-float.
fixes GCC 6 kernel builds that use this file.
 1.104 15-Apr-2015  mrg branches: 1.104.10;
remove various HAVE_GCC=45 fragments.
 1.103 09-Jul-2011  mrg branches: 1.103.12; 1.103.30;
fix previous and use a correct make construct
 1.102 08-Jul-2011  mrg don't use -msoft-float for GCC 4.5. -msoft-float passes down -mno-float
to the assembler, which barfs, and i can't see any way to disable it just
for sun3/fpu.c.
 1.101 21-Jan-2011  joerg Switch remaining platforms to modern CPP for assembler.
 1.100 19-Feb-2008  joerg branches: 1.100.32; 1.100.38; 1.100.40;
Add missing assym.h dependency.
 1.99 11-Dec-2005  christos branches: 1.99.50;
merge ktrace-lwp.
 1.98 31-May-2005  christos branches: 1.98.2;
s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
 1.97 04-Jun-2004  thorpej Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
 1.96 26-Nov-2002  thorpej branches: 1.96.6; 1.96.10;
The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
 1.95 04-Jun-2002  thorpej Don't use -traditional-cpp if HAVE_GCC3.
 1.94 30-May-2002  thorpej Get rid of the XDEFS thing; the new toolchain provides a proper
cross compilation environment.
 1.93 10-Feb-2002  chs branches: 1.93.8; 1.93.10;
add "-m68030" for sun3x, addresses PR 15312.
 1.92 09-Dec-2001  atatat Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
 1.91 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.90 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.89 26-Oct-2001  jmc branches: 1.89.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.88 23-Oct-2001  thorpej branches: 1.88.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.87 29-May-2001  mrg branches: 1.87.2;
define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
 1.86 22-Feb-2001  chs branches: 1.86.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.85 04-Feb-2001  tsutsui Add -D__m68k__ to XDEF.
It is required by sys/compat/linux/common/linux_exec.h.

XXX: -undef is still required?
 1.84 17-Dec-2000  jdolecek delete obsolete comment
 1.83 07-Dec-2000  jdolecek convert to use genassym.cf & genassym.sh, as other ports do
 1.82 09-May-2000  hubertf Add "install" target, so "make install" after building the kernel
does something useful. The target can be redefined by putting a
install-kernel-${MACHINE_NAME} target that fits your needs into
/etc/mk.conf.
 1.81 09-May-2000  thorpej HAVE_GCC28 -> HAVE_EGCS, and make it match gcc 2.9 as well. Also,
make the use of -Wno-uninitialized explicit, don't rely on a compiler
hack to do it for us.
 1.80 01-Feb-2000  tsutsui Revert STRIPPROG -> STRIP
 1.79 24-Jan-2000  tron Add "dependall" target for comfort.
 1.78 19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.77 19-Jan-2000  tsutsui Change STRIPFLAGS=-g for cross-toolchains.
 1.76 26-Jul-1999  cgd branches: 1.76.2;
be more efficient when doing the SYSTEM_LD_TAIL for -g kernels: don't
copy them just to strip them, use strip -o.
 1.75 09-Jul-1999  mrg clean up a bit after jason :)

- fix emitrules() like emitfiles() to deal with the prefix (otherwise it
would attempt to find the file in the normal base for the NORMAL_C rule).
- add emitincludes() which adds include directives for each prefix to the
$INCLUDES variable in the makefile.
- add %INCLUDES to each Makefile.arch to deal with the above.

this makes "prefix" actually work in a usable manner, and now i can move
on to fixing compiler warnings (errors) in the ESP code. :)
 1.74 15-Jan-1999  thorpej branches: 1.74.4;
Don't define "mc68020". Nothing uses it.
 1.73 08-Jan-1999  augustss Add -Wpointer-arith warning since `void *' arithmetic is not ANSI C.
 1.72 13-Dec-1998  kleink Add -Werror and -Wmissing-prototypes, like most other ports do.
 1.71 15-Oct-1998  drochner change handling of libkern:
-sys/lib/libkern builds as library per default (as it was documented all
the time)
-ports able to LKM set "KERN_AS=obj" explicitely in their Makefiles
(for now; should depend on actual "option LKM" or -better- functions
included for LKM use should be pulled in by a stub)
-always link libcompat before libkern - libkern stuff can be referred to
by libcompat, but not the other way
 1.70 05-Sep-1998  lukem distclean is a synonym for cleandir
 1.69 31-May-1998  thorpej Specify a non-profiling C rule.
 1.68 12-Apr-1998  tv Add -Wno-main conditional on compiler being gcc 2.8 or egcs. (This adds
a HAVE_GCC28 check-variable that can now be used to add other gcc-2.8
flags in cases where they may be useful, or to remove gcc 2.7.2 "bug
workaround" flags.)
 1.67 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.66 12-Nov-1997  thorpej branches: 1.66.2;
Make sure CPP, AR, AS, and RANLIB are defined.
 1.65 12-Nov-1997  thorpej Define LORDER, NM, and TSORT here, like we do the rest of the tools.
 1.64 23-Oct-1997  gwr Generate assym.h into assym.h.tmp first, then move it. (safety)
Add a dependency for stub.o:Makefile
 1.63 04-Oct-1997  gwr branches: 1.63.2;
use common genassym.awk
 1.62 03-Oct-1997  lukem define SIZE?=size, and use ${SIZE} instead of size. makes cross
compilation easier
 1.61 30-Sep-1997  christos PR/4162: Chris Jones: make cleandir does not work properly; it does not
remove the object files and the .depend file in the kernel build directory.
 1.60 12-Sep-1997  mycroft Kill vestiges of Locore.c.
 1.59 17-Mar-1997  gwr branches: 1.59.4;
Fixup dependencies
 1.58 10-Feb-1997  gwr Add -fno-defer-pop to COPTS (helps ddb backtrace).
Add AFLAGS=-m68020 and use it with ${AS} commands.
Depend kgdb_stub.o on Makefile (KGDBDEV, KGDBRATE).
 1.57 07-Feb-1997  gwr Get rid of HOSTED_CC.
 1.56 04-Feb-1997  gwr branches: 1.56.2;
change :: to :
 1.55 04-Feb-1997  perry Nuke some options GENERIC residue.
 1.54 04-Feb-1997  perry Nuke some GENERIC residue.
 1.53 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.52 01-Dec-1996  jonathan * Replace explicit -O2 in CFLAGS with COPTS macro. Default COPTS?= -O2.
Lets users over-ride with makeoptions COPTS="..." in kernel config files.

Leave `mandatory' flags (like -msoft-float which on m68k enforces no
FP in kernel) in CFLAGS.
 1.51 09-Sep-1996  mycroft Move strip(1) flags into a separate variable, so that $STRIP can
be passed to subordinate make(1)s. Remove $TOUCH. Add HOSTED_CC,
HOSTED_CPPFLAGS, and HOSTED_CFLAGS, and use them when depending genassym.
 1.50 31-Aug-1996  mycroft Wrap the default definition of `S' in `.ifndef'.
 1.49 12-Aug-1996  mycroft Put into . Remove hooks for `config-dependent' and
`device-driver' flags.
 1.48 10-Aug-1996  mycroft * Add a HOSTED_C_C variable, which strips `-p', `-pg', and
`-nostdinc', and use it when building genassym.
* Use `-nostdinc' just to be sure we're self-contained.
 1.47 10-Aug-1996  mycroft * Define CWARNFLAGS and MKDEP in some moderately consistent fashion.
* Make S expand to an absolute path at compile time.
* Use `-S' rather than `-x' to remove debugging symbols.
* Garbage collect unused variables.
* Reverse a handful of port-specific changes that do not correspond to
the common build model and are not needed.
 1.46 20-Jun-1996  gwr branches: 1.46.2;
Take control over the kernel libraries so cross-build is easier.
 1.45 18-Jun-1996  gwr Several minor changes to make cross-compilation easier.
(I do most compiles on a sparc these days...)
 1.44 11-May-1996  mycroft Make `make depend' work for libraries.
 1.43 29-Feb-1996  cgd Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them. From PR 2142, OK'd
by mycroft.
 1.42 26-Feb-1996  mycroft Define build programs with `?=', so they can be overridden with `makeoptions'.
 1.41 20-Feb-1996  gwr keep static symbols
 1.40 09-Feb-1996  mycroft Fix mkdep problems due to missing flags.
 1.39 03-Feb-1996  mycroft Use `-traditional-cpp' when building .s and .S files.
 1.38 02-Feb-1996  mycroft Clone these, and fix many bugs.
 1.37 02-Feb-1996  mycroft assym.s -> assym.h
(Some ports did this already.)
 1.36 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.35 17-Nov-1995  gwr Switch to ncr_si (will just do PIO for now) and cleanup
 1.34 19-Sep-1995  thorpej branches: 1.34.2;
Compile the kernel with -Werror -fno-builtin.
 1.33 01-Jul-1995  gwr Add ${LIBKERN} ${LIBCOMPAT} to SYSTEM_DEP so they are built.
Move ${DEBUG} from ${CC} to ${CFLAGS} for compatibility.
 1.32 24-Jun-1995  christos Makefile.`arch`: - Add -lcompat
- Change clean: target to be a double dep one,
so libraries can use the clean target too
- Add genassym to the clean targets
 1.31 09-Jun-1995  gwr Retool for native build.
 1.30 24-May-1995  gwr Merged locore code back into locore.s
 1.29 16-May-1995  jtc Removing -DKERNEL, transition to _KERNEL has been completed
 1.28 23-Mar-1995  jtc Added -D_KERNEL to CFLAGS alongside each -DKERNEL.
 1.27 01-Mar-1995  gwr Minor tweaks: avoid accidental FPU instructions,
allow DEBUG=-O override on the make command line.
 1.26 24-Jan-1995  gwr Include vnode_if.c in mkdep args.
 1.25 11-Jan-1995  gwr Cleanup (cpp flags just once)
 1.24 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.23 26-Oct-1994  cgd new RCS ID format.
 1.22 20-Sep-1994  gwr branches: 1.22.2;
Turn on optimization.
 1.21 18-Jul-1994  gwr Add mising dependency
 1.20 28-Jun-1994  gwr branches: 1.20.2;
Move vnode_if.o earlier in the OBJ list.
 1.19 13-Jun-1994  gwr Update for new FS code (vnode_if.*)
 1.18 13-May-1994  gwr SCSI driver works!
 1.17 04-May-1994  gwr Make conf.o depend on the Makefile
 1.16 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.15 01-Mar-1994  glass cleanup
 1.14 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.13 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.12 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.11 10-Nov-1993  deraadt some cleanup, better than sending adam reminder notes
 1.10 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.9 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.8 16-Aug-1993  glass cute bug that mycroft fixed in the hp300 stuff
 1.7 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.6 08-Aug-1993  glass make config -g work, add timesink config
 1.5 05-Aug-1993  glass gets to consinit() and blows up
 1.4 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.3 30-Jul-1993  glass Fri Jul 30 16:52:00 PDT 1993:
snapshot. things compile but don't link. pmap stuff compiles but
just starting work on interfacing it to the vm system. current projects
appear to be both physical memory and virtual memory maps.
 1.2 27-Jun-1993  glass use gas; add support for more stuff
 1.1 25-Jun-1993  glass initial commit. little of this actually works
 1.20.2.1 19-Jul-1994  cgd from trunk, per gwr.
 1.22.2.2 20-Sep-1994  gwr Turn on optimization.
 1.22.2.1 20-Sep-1994  gwr file Makefile.sun3 was added on branch netbsd-1-0 on 1994-09-20 16:17:54 +0000
 1.34.2.1 18-Nov-1995  gwr From HEAD: Use ncr_si (in PIO mode), also cleanup
 1.46.2.2 20-Jun-1996  gwr Take control over the kernel libraries so cross-build is easier.
 1.46.2.1 20-Jun-1996  gwr file Makefile.sun3 was added on branch netbsd-1-2 on 1996-06-20 03:47:28 +0000
 1.56.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.59.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.59.4.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.63.2.1 12-Nov-1997  thorpej Sync w/ trunk: tool definitions, generate assym.h in a safer way,
stub.o depends on Makefile.
 1.66.2.1 27-Jan-1998  gwr Let ${MACHTYPE} select sun3 vs sun3x differences.
 1.74.4.1 02-Aug-1999  thorpej Update from trunk.
 1.76.2.5 12-Mar-2001  bouyer Sync with HEAD.
 1.76.2.4 11-Feb-2001  bouyer Sync with HEAD.
 1.76.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.76.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.76.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.86.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.87.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.87.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.87.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.88.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.89.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.89.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.89.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.89.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.89.2.1 26-Oct-2001  nathanw file Makefile.sun3 was added on branch nathanw_sa on 2002-01-08 00:28:17 +0000
 1.93.10.1 30-May-2002  tv Pull up revision 1.94 (requested by thorpej in ticket #99):
Get rid of the XDEFS thing; the new toolchain provides a proper
cross compilation environment.
 1.93.8.1 15-Jul-2002  gehenna catch up with -current.
 1.96.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.96.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.96.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.96.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.96.6.1 03-Aug-2004  skrll Sync with HEAD
 1.98.2.1 27-Feb-2008  yamt sync with head.
 1.99.50.1 23-Mar-2008  matt sync with HEAD
 1.100.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.100.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.100.32.1 05-Mar-2011  rmind sync with head
 1.103.30.1 06-Jun-2015  skrll Sync with HEAD
 1.103.12.1 03-Dec-2017  jdolecek update from HEAD
 1.104.10.1 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- 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.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.106.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.106.2.1 15-Mar-2018  pgoyette Synch with HEAD
 1.107.2.1 10-Jun-2019  christos Sync with HEAD
 1.56 19-Jun-2020  tsutsui Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.55 07-Feb-2019  mrg branches: 1.55.4;
bump ramdisk sizes to cope with GCC 7 bloat.
 1.54 28-Jul-2017  maxv branches: 1.54.4;
Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.53 27-Apr-2013  christos branches: 1.53.12;
remove confusing numeric locators where they are unused.
 1.52 23-Nov-2010  hannken branches: 1.52.8; 1.52.18;
Remove unused count from pseudo-device md.
 1.51 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.50 06-Feb-2009  jym branches: 1.50.4; 1.50.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.49 16-May-2008  he branches: 1.49.6;
Bump ramdisk size from 500k to 600k to compensate for recent bloat,
probably caused by ifconfig now needing proplib.
 1.48 05-Apr-2008  tsutsui branches: 1.48.2; 1.48.4; 1.48.6;
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 been reached the limit.
 1.47 17-Oct-2007  garbled branches: 1.47.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.46 18-Jul-2007  tsutsui branches: 1.46.6;
Use options<space><tab>.
 1.45 05-Feb-2006  cube branches: 1.45.24; 1.45.32; 1.45.36; 1.45.38;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.44 07-Dec-2005  tsutsui branches: 1.44.2; 1.44.4; 1.44.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.43 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.42 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.41 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.40 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.39 18-Feb-2005  dsl branches: 1.39.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.38 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.37 15-Jul-2004  atatat branches: 1.37.4; 1.37.6;
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.36 02-Nov-2003  chs branches: 1.36.2;
commands have grown, make the ramdisk bigger.
 1.35 18-Sep-2002  lukem branches: 1.35.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.34 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.33 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.32 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.31 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.30 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.29 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.28 04-Oct-2001  chs branches: 1.28.4;
reduce ramdisk size back to what it was before.
everything fits since tsutsui fixed libhack.
 1.27 30-Jul-2001  chs branches: 1.27.2;
increase the memory disk size, it needs to be bigger with ELF.
 1.26 08-Jul-2001  abs branches: 1.26.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.25 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.24 10-Jun-2000  tsutsui branches: 1.24.4;
We cannot specify root on md0a because md is pseudo-device.
"options MEMORY_DISK_IS_ROOT" is enough for this.
 1.23 09-Jun-2000  tsutsui - Sync MINIROOTSIZE with etc/disktab.
- Remove ppp. (ramdisk does not have pppd, anyway)
 1.22 07-Jun-2000  tsutsui Config root on md0a, not md0.
 1.21 26-Jun-1998  lukem branches: 1.21.14; 1.21.22;
remove options FIFO; it's now the default
 1.20 08-Jun-1998  gwr Uh, something went wrong last time?
 1.19 08-Jun-1998  gwr Sync with 1.3.2 release branch:
No need for any COMPAT_* options in the ramdisk kernel
Can do without the uk driver also...
 1.18 08-Mar-1998  gwr Like INSTALL and INSTALL3X, leave out DDB.
(Can patch using the PROM if needed.)
 1.17 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.16 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.15 28-Jan-1998  gwr No need for NFS_BOOT_RWSIZE here (root is always md0)
 1.14 22-Jan-1998  gwr branches: 1.14.2;
Remove the config flags from "si" lines so the driver default will
be used. That also makes it possible to patch the kernel in case
the default option causes boot failures or something...
 1.13 13-Dec-1997  gwr Need MEMORY_DISK_IS_ROOT now also.
Sync with GENERIC
 1.12 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.11 07-May-1997  lukem branches: 1.11.8;
clean up whitespace use
 1.10 11-Mar-1997  gwr Sync up with changes in GENERIC
 1.9 31-Jan-1997  thorpej branches: 1.9.4;
Adopt for new file system and root spec grammar.
 1.8 28-Dec-1996  pk branches: 1.8.2;
rename: ramdisk => md
 1.7 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.6 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.5 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.4 26-Aug-1996  mrg add COMPAT_12.
 1.3 26-Mar-1996  gwr branches: 1.3.4;
New autoconfig design that controls attach order.
 1.2 17-Nov-1995  gwr Switch to ncr_si (will just do PIO for now) and cleanup
 1.1 08-Oct-1995  gwr branches: 1.1.2;
Add RAMDISK, move some things around.
Add rd*, xd*, xy* (only rd is done).
 1.1.2.1 18-Nov-1995  gwr From HEAD: Use ncr_si (in PIO mode), also cleanup
 1.3.4.1 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.8.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.9.4.1 13-Mar-1997  gwr Merge changes from the trunk
 1.11.8.2 29-May-1998  mycroft Pull up patch from gwr.
 1.11.8.1 14-Dec-1997  mellon Pull rev 1.13 up from trunk (gwr)
 1.14.2.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.14.2.1 27-Jan-1998  gwr Sun3 config.
 1.21.22.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.21.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.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.26.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.26.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.26.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.26.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.26.2.1 03-Aug-2001  lukem update to -current
 1.27.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.28.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.28.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.28.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.28.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.28.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.28.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.28.4.1 04-Oct-2001  nathanw file RAMDISK was added on branch nathanw_sa on 2002-01-08 00:28:17 +0000
 1.35.6.7 11-Dec-2005  christos Sync with head.
 1.35.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.35.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.35.6.4 04-Feb-2005  skrll Sync with HEAD.
 1.35.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.35.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.35.6.1 03-Aug-2004  skrll Sync with HEAD
 1.36.2.1 15-Jul-2004  he Pull up revision 1.37 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.37.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.37.6.1 12-Feb-2005  yamt sync with head.
 1.37.4.1 29-Apr-2005  kent sync with -current
 1.39.6.2 03-Sep-2007  yamt sync with head.
 1.39.6.1 21-Jun-2006  yamt sync with head.
 1.44.6.1 22-Apr-2006  simonb Sync with head.
 1.44.4.1 09-Sep-2006  rpaulo sync with head
 1.44.2.1 18-Feb-2006  yamt sync with head.
 1.45.38.1 15-Aug-2007  skrll Sync with HEAD.
 1.45.36.1 07-Aug-2007  matt Sync with HEAD.
 1.45.32.1 03-Oct-2007  garbled Sync with HEAD
 1.45.24.1 20-Aug-2007  ad Sync with HEAD.
 1.46.6.1 06-Nov-2007  matt sync with HEAD
 1.47.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.48.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.48.4.2 11-Aug-2010  yamt sync with head.
 1.48.4.1 04-May-2009  yamt sync with head.
 1.48.2.1 18-May-2008  yamt sync with head.
 1.49.6.1 03-Mar-2009  skrll Sync with HEAD.
 1.50.6.2 05-Mar-2011  rmind sync with head
 1.50.6.1 30-May-2010  rmind sync with head
 1.50.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.52.18.2 03-Dec-2017  jdolecek update from HEAD
 1.52.18.1 23-Jun-2013  tls resync from head
 1.52.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.53.12.1 28-Aug-2017  skrll Sync with HEAD
 1.54.4.1 10-Jun-2019  christos Sync with HEAD
 1.55.4.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.44 19-Jun-2020  tsutsui Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd

sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.43 07-Feb-2019  mrg branches: 1.43.4;
bump ramdisk sizes to cope with GCC 7 bloat.
 1.42 28-Jul-2017  maxv branches: 1.42.4;
Remove TCP_COMPAT_42 from the config files. Pass 1.
 1.41 27-Apr-2013  christos branches: 1.41.12;
remove confusing numeric locators where they are unused.
 1.40 23-Nov-2010  hannken branches: 1.40.8; 1.40.18;
Remove unused count from pseudo-device md.
 1.39 16-Apr-2010  pooka Remove unused count (invariably "4") from pseudo-device fss.
 1.38 06-Feb-2009  jym branches: 1.38.4; 1.38.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.37 16-May-2008  he branches: 1.37.6;
Bump ramdisk size from 500k to 600k to compensate for recent bloat,
probably caused by ifconfig now needing proplib.
 1.36 05-Apr-2008  tsutsui branches: 1.36.2; 1.36.4; 1.36.6;
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 been reached the limit.
 1.35 17-Oct-2007  garbled branches: 1.35.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.34 18-Jul-2007  tsutsui branches: 1.34.6;
Use options<space><tab>.
 1.33 05-Feb-2006  cube branches: 1.33.24; 1.33.32; 1.33.36; 1.33.38;
Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
 1.32 07-Dec-2005  tsutsui branches: 1.32.2; 1.32.4; 1.32.6;
Adjust comments for options FFS_NO_SNAPSHOT.

XXX: This option should be mentioned in options(4).
 1.31 04-Sep-2005  isaki typo in comment. (since 1994?!)
 1.30 19-Aug-2005  christos Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels
 1.29 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.28 30-Jul-2005  yamt add "options VMSWAP" to non INSTALL kernels.
 1.27 18-Feb-2005  dsl branches: 1.27.6;
Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT
 1.26 31-Jan-2005  hannken Add file system snapshots to kernel configs.

- Ffs internal snapshots get compiled in unconditionally.

- File system snapshot device fss(4) added to all kernel configs that
have a disk. Device is commented out on all non-GENERIC kernels.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.25 30-Jan-2005  tsutsui Enable disconnect/reselect for esp(4) on 3/80 by default.

It also implies to enable tagged queueing, which works fine on my 3/80:
---
NetBSD 2.99.15 (CHARIOT) #184: Sun Jan 30 07:13:08 JST 2005
tsutsui@mirage:/usr/src/sys/arch/sun3/compile/CHARIOT
Model: sun3x 80
fpu: mc68882
total memory = 65536 KB
avail memory = 62496 KB
mainbus0 (root)
obio0 at mainbus0
:
dma0 at obio0 addr 0x66001000 ipl 2: rev 0
esp0 at obio0 addr 0x66000000 ipl 2: ESP100, 20MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
:
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST31230N, HP04> disk fixed
sd0: 1001 MB, 3992 cyl, 5 head, 102 sec, 512 bytes/sect x 2051460 sectors
sd0: async, 8-bit transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <FUJITSU, M1606S-512, 6237> disk fixed
sd1: 1041 MB, 3457 cyl, 6 head, 102 sec, 512 bytes/sect x 2131992 sectors
sd1: async, 8-bit transfers, tagged queueing
boot device: sd0a
:
---
(yes, async but tagged queueing :-)
 1.24 15-Jul-2004  atatat branches: 1.24.4; 1.24.6;
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
 1.23 02-Nov-2003  chs branches: 1.23.2;
commands have grown, make the ramdisk bigger.
 1.22 18-Sep-2002  lukem branches: 1.22.6;
enable USERCONF by default; it's small and extremely useful to have available.
 1.21 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.20 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.19 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.18 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.17 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.16 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.15 04-Oct-2001  chs branches: 1.15.4;
reduce ramdisk size back to what it was before.
everything fits since tsutsui fixed libhack.
 1.14 30-Jul-2001  chs branches: 1.14.2;
increase the memory disk size, it needs to be bigger with ELF.
 1.13 08-Jul-2001  abs branches: 1.13.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.12 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.11 10-Jun-2000  tsutsui branches: 1.11.4;
We cannot specify root on md0a because md is pseudo-device.
"options MEMORY_DISK_IS_ROOT" is enough for this.
 1.10 09-Jun-2000  tsutsui - Sync MINIROOTSIZE with etc/disktab.
- Remove ppp. (ramdisk does not have pppd, anyway)
 1.9 07-Jun-2000  tsutsui Config root on md0a, not md0.
 1.8 08-Apr-1999  gwr branches: 1.8.2; 1.8.8; 1.8.16;
sync with GENERIC3X
 1.7 26-Jun-1998  lukem remove options FIFO; it's now the default
 1.6 08-Jun-1998  gwr Sync with RAMDISK:
No need for any COMPAT_* options in the ramdisk kernel
Can do without the uk driver also...
 1.5 08-Mar-1998  gwr Like INSTALL and INSTALL3X, leave out DDB.
(Can patch using the PROM if needed.)
 1.4 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.3 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.2 07-Oct-1997  gwr branches: 1.2.4;
Sync with GENERIC
 1.1 27-May-1997  jeremy branches: 1.1.4;
Config file for a RAMDISK kernel.
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.4.2 28-Jan-1998  gwr Merge changes from the head (NFS_BOOT_BOOTPARAM)
 1.2.4.1 27-Jan-1998  gwr Sun3X config.
 1.8.16.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.2.2 08-Apr-1999  gwr sync with GENERIC3X
 1.8.2.1 08-Apr-1999  gwr file RAMDISK3X was added on branch netbsd-1-4 on 1999-04-08 06:49:56 +0000
 1.11.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.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.13.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.13.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.13.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.1 03-Aug-2001  lukem update to -current
 1.14.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.15.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.15.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.15.4.5 17-Apr-2002  nathanw Catch up to -current.
 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 28-Feb-2002  nathanw Catch up to -current.
 1.15.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.15.4.1 04-Oct-2001  nathanw file RAMDISK3X was added on branch nathanw_sa on 2002-01-08 00:28:17 +0000
 1.22.6.7 11-Dec-2005  christos Sync with head.
 1.22.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.22.6.4 04-Feb-2005  skrll Sync with HEAD.
 1.22.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.6.1 03-Aug-2004  skrll Sync with HEAD
 1.23.2.1 15-Jul-2004  he Pull up revision 1.24 (requested by atatat in ticket #663):
Add "options SYSCTL_INCLUDE_DESCR" to a lot of configurations,
but commented out in most of them.
 1.24.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.24.6.1 12-Feb-2005  yamt sync with head.
 1.24.4.1 29-Apr-2005  kent sync with -current
 1.27.6.2 03-Sep-2007  yamt sync with head.
 1.27.6.1 21-Jun-2006  yamt sync with head.
 1.32.6.1 22-Apr-2006  simonb Sync with head.
 1.32.4.1 09-Sep-2006  rpaulo sync with head
 1.32.2.1 18-Feb-2006  yamt sync with head.
 1.33.38.1 15-Aug-2007  skrll Sync with HEAD.
 1.33.36.1 07-Aug-2007  matt Sync with HEAD.
 1.33.32.1 03-Oct-2007  garbled Sync with HEAD
 1.33.24.1 20-Aug-2007  ad Sync with HEAD.
 1.34.6.1 06-Nov-2007  matt sync with HEAD
 1.35.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.36.4.2 11-Aug-2010  yamt sync with head.
 1.36.4.1 04-May-2009  yamt sync with head.
 1.36.2.1 18-May-2008  yamt sync with head.
 1.37.6.1 03-Mar-2009  skrll Sync with HEAD.
 1.38.6.2 05-Mar-2011  rmind sync with head
 1.38.6.1 30-May-2010  rmind sync with head
 1.38.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.40.18.2 03-Dec-2017  jdolecek update from HEAD
 1.40.18.1 23-Jun-2013  tls resync from head
 1.40.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.41.12.1 28-Aug-2017  skrll Sync with HEAD
 1.42.4.1 10-Jun-2019  christos Sync with HEAD
 1.43.4.1 07-Jul-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #984):

sys/arch/sun3/conf/DISKLESS3X: revision 1.61
sys/arch/sun3/conf/GENERIC3X: revision 1.135
sys/arch/sun3/conf/INSTALL3X: revision 1.61
sys/arch/sun3/conf/INSTALL: revision 1.62
sys/arch/sun3/conf/DISKLESS: revision 1.77
sys/arch/sun3/conf/GENERIC: revision 1.182
sys/arch/sun3/conf/RAMDISK3X: revision 1.44
sys/arch/sun3/conf/RAMDISK: revision 1.56

Use "-fno-unwind-tables" to shrink binaries more.

sun3 GENERIC -Os
text data bss dec hex filename
1762862 75292 93032 1931186 1d77b2 netbsd
sun3 GENERIC -Os -fno-unwind-tables
text data bss dec hex filename
1545726 75292 93032 1714050 1a2782 netbsd

GENERIC is tested on TME.
 1.7 08-Aug-1995  gwr Not really useful anymore.
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 23-Jul-1994  gwr branches: 1.4.2;
Fix config line, clean up.
 1.3 27-May-1994  gwr branches: 1.3.2;
Goodbye to MAXFDESCS
 1.2 13-May-1994  gwr SCSI driver works!
 1.1 23-Feb-1994  glass test config for scsi
 1.3.2.1 24-Jul-1994  cgd update per gwr
 1.4.2.2 23-Jul-1994  gwr Fix config line, clean up.
 1.4.2.1 23-Jul-1994  gwr file SCSITEST was added on branch netbsd-1-0 on 1994-07-23 03:39:03 +0000
 1.13 13-Dec-1997  gwr obsolete
 1.12 01-Dec-1997  kleink Add COMPAT_13.
 1.11 17-Nov-1997  lukem * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
 1.10 07-May-1997  lukem branches: 1.10.8;
clean up whitespace use
 1.9 11-Mar-1997  gwr Sync up with changes in GENERIC
 1.8 31-Jan-1997  thorpej branches: 1.8.4;
Adopt for new file system and root spec grammar.
 1.7 28-Dec-1996  pk branches: 1.7.2;
rename: ramdisk => md
 1.6 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.5 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.4 08-Oct-1996  jtc Changed "std.sun3" to "arch/sun3/conf/std.sun3" because of config changes
 1.3 26-Aug-1996  mrg add COMPAT_12.
 1.2 26-Mar-1996  gwr branches: 1.2.4;
New autoconfig design that controls attach order.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file SMD_TEST was added on branch netbsd-1-1 on 1995-10-30 20:58:05 +0000
 1.2.4.1 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.7.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.8.4.1 13-Mar-1997  gwr Merge changes from the trunk
 1.10.8.1 14-Dec-1997  mellon Obsolete (gwr)
 1.5 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 09-Mar-1994  ws Make FFS optional
 1.2 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.1 25-Jun-1993  glass initial commit. little of this actually works
 1.15 08-Aug-1995  gwr Not really useful anymore.
 1.14 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 27-May-1994  gwr Goodbye to MAXFDESCS
 1.11 17-Apr-1994  glass compiles again. also cleanup of development printfs. and trap stuff
 1.10 01-Mar-1994  glass cleanup
 1.9 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 12-Dec-1993  glass snapshot of my private sources
 1.7 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.6 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.5 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 08-Aug-1993  glass make config -g work, add timesink config
 1.3 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.2 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.1 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.3 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.2 19-Feb-1998  gwr branches: 1.2.28; 1.2.32;
can not use star
 1.1 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.2.32.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.2 21-Mar-1998  gwr branches: 1.2.28; 1.2.32;
Deal with missing P4 register on old 3/60 machines.
 1.1 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.2.32.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 25-Jun-1993  glass initial commit. little of this actually works
 1.83 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.82 25-Feb-2018  mrg branches: 1.82.2; 1.82.4;
add a special rule to build m68k/fpu.c to avoid passing -msoft-float.
fixes GCC 6 kernel builds that use this file.
 1.81 05-May-2012  macallan make sure opt_sunkbd.h exists
 1.80 15-Nov-2011  tsutsui branches: 1.80.4;
Merge copy-and-pasted fpu_probe() function (to share it among more m68k ports).
Tested on TT030, Sun3/80, and X68030.
 1.79 12-Jun-2011  rmind branches: 1.79.2;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.78 20-Feb-2008  drochner branches: 1.78.32; 1.78.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.77 05-Oct-2006  tsutsui branches: 1.77.28;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.76 04-Oct-2006  tsutsui Make sun3 port use MI mk48txx(4) and intersil7170(4) TOD clock drivers
with bus_space(9) support.
Note clock device name in obio.sun3 is renamed to oclock to use the same
MI attribute (intersil7170) with sun3x.

Tested on 3/80 and TME emulating 3/120 (but not on 3/4xx VME monsters).
 1.75 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.74 30-May-2006  he branches: 1.74.6; 1.74.8;
Remove local declaration of the 'fb' attribute now that it's declared
globally.
 1.73 11-Dec-2005  christos branches: 1.73.4; 1.73.6; 1.73.8; 1.73.14;
merge ktrace-lwp.
 1.72 07-Dec-2004  chs branches: 1.72.12;
use the m68k-common procfs_machdep.c on all m68k platforms.
 1.71 15-Nov-2003  bouyer Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
groveling code to find a NetBSD disklabel in the first sector (so that it
can find a label at the old sun3 LABELOFFSET) as a fallback is not
label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
a DIOCWDINFO after writing the disklabel to the raw partition in the
-r/-I case (so that the kernel can convert the label if needed).
 1.70 27-Jul-2003  thorpej Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
 1.69 03-Nov-2002  chs branches: 1.69.6;
merge all the m68k copies of kgdb_machdep.c.
 1.68 02-Nov-2002  chs finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
 1.67 27-Oct-2002  chs include wscons definitions, dev/sun/kbdvar.h needs it now.
 1.66 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.65 20-Oct-2002  chs merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
 1.64 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.63 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.62 20-Nov-2001  lukem branches: 1.62.8;
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.61 18-Jun-2001  christos branches: 1.61.2; 1.61.8;
Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.60 22-Feb-2001  chs branches: 1.60.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.59 17-Jan-2001  fvdl Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.58 03-Nov-2000  tsutsui Switch to MI md_root.c. Tested on RAMDISK3X kernel.
 1.57 27-Mar-2000  scottr The declaration for esp has moved to conf/files. (Hi Charles!)
 1.56 14-Mar-2000  oster Add the RAIDframe device major to the machine-dependent config files
so that the right entries get added to dev_name2blk[]. Needed for / on RAID.
(Whoops! I missed checking these in when adding the RAID_AUTOCONFIG stuff.)
 1.55 09-Jul-1999  thorpej branches: 1.55.2;
Normalize include paths.
 1.54 07-Jun-1999  thorpej Only declare block major numbers for devices which can be the root device.
 1.53 14-May-1999  mrg split the sun ms/kbd drivers into frontend/backend parts at the serial
interface border, so that other serial interfaces can be attached to the
ms/kbd. zero functional changes and mostly involves moving code around
a bit. tested on the SS2.

this is necessary to attach the PCI ultrasparc keyboard/mouse drivers.
 1.52 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.51 16-Apr-1999  kleink Normalize path of files.sunos.
 1.50 08-Apr-1999  gwr branches: 1.50.2; 1.50.4;
Make "dma" a real device so it can attach before esp.
 1.49 15-Dec-1998  itohy Added COMPAT_LINUX support.
 1.48 23-Jul-1998  gwr Add xyc to the dev/xy.c line, similar for xd.
 1.47 21-Jul-1998  drochner adapt to LANCE driver split
 1.46 16-Feb-1998  thorpej Remove "class" declarations, and add "devclass" declarations where
appropriate. Fix several inconsistencies between device class and
attributes. Mostly from Chris Demetriou.
 1.45 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.44 01-Feb-1998  is Amiga uses the common m68k/sig_machdep.c now. Also moved its definition from
the other 68k ports' files.${port} to arch/m68k/conf/files.m68k.
 1.43 12-Jan-1998  thorpej branches: 1.43.2;
Update for changes to config.
 1.42 17-Oct-1997  gwr Add Sun3/E stuff, and re-organize.
 1.41 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.40 28-Apr-1997  gwr branches: 1.40.2; 1.40.4;
Kill an obsolete comment.
 1.39 09-Apr-1997  thorpej Remove redundant file directives
 1.38 18-Mar-1997  gwr Add /dev/leds (closes PR#2172 from der Mouse)
 1.37 17-Mar-1997  gwr Separate bcopy and copypage stuff from copy.s
 1.36 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.35 13-Mar-1997  gwr Use arch/m68k/m68k/sig_machdep.c
 1.34 19-Feb-1997  gwr Add dev/clock_subr.c
 1.33 18-Feb-1997  gwr Add bus_subr.c
 1.32 14-Feb-1997  gwr Add sun3/regdump.c
 1.31 13-Feb-1997  gwr Add sun3/sig_machdep.c
 1.30 13-Feb-1997  gwr Replace sun3/kgdb_stub.c with sun3/kgdb_machdep.c
 1.29 27-Jan-1997  gwr branches: 1.29.4;
Add sun3/sunmon.c (also kill trailing spaces)
 1.28 21-Jan-1997  thorpej "md" is declared in sys/conf/files, now.
 1.27 28-Dec-1996  pk rename: ramdisk => md
 1.26 29-Oct-1996  gwr The new cg4 driver does not use dev/bt_subr.c
 1.25 08-Oct-1996  jtc Changed "../../m68k/fpe/files.fpe" to "arch/m68k/fpe/files.fpe" because of config changes
 1.24 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.
 1.23 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.22 17-Mar-1996  cgd adjust to deal with expression support for optional file specs
 1.21 17-Mar-1996  cgd fix typos in recent attachment changes.
 1.20 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.19 16-Feb-1996  gwr Add some things needed by KGDB
 1.18 30-Jan-1996  gwr Include m68k/fpe/files.fpe for FPU emulation support (fixes PR 1773)
 1.17 24-Jan-1996  gwr Update for the new z8530 driver
 1.16 01-Jan-1996  thorpej ncr5380sbc attribute is now defined in sys/conf/files.
 1.15 30-Oct-1995  gwr The xy goes on VME16, not VME32.
 1.14 29-Oct-1995  gwr New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.13 10-Oct-1995  gwr branches: 1.13.2;
Use sys/scsi/files.scsi
 1.12 08-Oct-1995  gwr Add RAMDISK, move some things around.
Add rd*, xd*, xy* (only rd is done).
 1.11 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.10 12-Jun-1995  gwr Leave pseudo-device prom in for now (even though it doesn't work)
so config will create prom.h
 1.9 09-Jun-1995  gwr Retool for native build.
 1.8 24-May-1995  gwr Merged locore code back into locore.s
 1.7 28-Apr-1995  cgd rename files files for new config/config.old naming
 1.6 08-Aug-1993  glass make config -g work, add timesink config
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.3 30-Jul-1993  glass added more files. marked idprom as a device-driver
 1.2 27-Jun-1993  glass use gas; add support for more stuff
 1.1 25-Jun-1993  glass initial commit. little of this actually works
 1.13.2.1 30-Oct-1995  gwr Sync. with HEAD: adds suport for SCSITEST and SMD_TEST kernels.
 1.29.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.40.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.40.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.43.2.1 27-Jan-1998  gwr Union of all sun3 and sun3x files, with those that apply to only one
or the other marked as dependent on the _sun3_ or _sun3x_ options.
 1.50.4.2 02-Aug-1999  thorpej Update from trunk.
 1.50.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.50.2.2 08-Apr-1999  gwr Make "dma" a real device so it can attach before esp.
 1.50.2.1 08-Apr-1999  gwr file files.sun3 was added on branch netbsd-1-4 on 1999-04-08 04:37:01 +0000
 1.55.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.55.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.55.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.55.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.60.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.61.8.5 11-Nov-2002  nathanw Catch up to -current
 1.61.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.61.8.3 17-Sep-2002  nathanw Catch up to -current.
 1.61.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.61.8.1 18-Jun-2001  nathanw file files.sun3 was added on branch nathanw_sa on 2002-01-08 00:28:18 +0000
 1.61.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.61.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.62.8.2 17-May-2002  gehenna Remove old block majors list.
 1.62.8.1 16-May-2002  gehenna Include the list of block/character major numbers.
 1.69.6.4 18-Dec-2004  skrll Sync with HEAD.
 1.69.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.69.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.69.6.1 03-Aug-2004  skrll Sync with HEAD
 1.72.12.3 27-Feb-2008  yamt sync with head.
 1.72.12.2 30-Dec-2006  yamt sync with head.
 1.72.12.1 21-Jun-2006  yamt sync with head.
 1.73.14.1 19-Jun-2006  chap Sync with head.
 1.73.8.1 26-Jun-2006  yamt sync with head.
 1.73.6.1 01-Jun-2006  kardel Sync with head.
 1.73.4.1 09-Sep-2006  rpaulo sync with head
 1.74.8.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.74.6.1 18-Nov-2006  ad Sync with head.
 1.77.28.1 23-Mar-2008  matt sync with HEAD
 1.78.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.78.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.79.2.2 23-May-2012  yamt sync with head.
 1.79.2.1 17-Apr-2012  yamt sync with head
 1.80.4.1 02-Jun-2012  mrg sync to latest -current.
 1.82.4.1 10-Jun-2019  christos Sync with HEAD
 1.82.2.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.32 28-Apr-1995  cgd rename files files for new config/config.old naming
 1.31 27-Apr-1995  christos Use new files.sunos
 1.30 22-Apr-1995  christos Moved sunos_machdep.c to m68k
 1.29 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.28 13-Apr-1995  gwr Add cache.c
 1.27 11-Apr-1995  mellon Reference cninit.c as well as cons.c
 1.26 10-Apr-1995  gwr Oops, sparc -> sun3
 1.25 07-Apr-1995  gwr Add cgtwo
 1.24 24-Mar-1995  gwr Determine FPU type during autoconfig.
 1.23 10-Mar-1995  gwr Add bwtwo, cgfour, fb
 1.22 01-Mar-1995  gwr Add arch/m68k/fpe/fpu_emulate.c
 1.21 07-Feb-1995  gwr db_memrw ==> db_machdep
 1.20 25-Jan-1995  cgd add 'maxpartitions' keyword as first 'intesting' thing in the file, to
facilitate the solution of config.new's hardcoded partition number
problems.
 1.19 24-Jan-1995  gwr Enable the ie and si drivers on VME.
 1.18 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.17 23-Nov-1994  gwr sun_* -> sunos_*
 1.16 21-Nov-1994  gwr branches: 1.16.2;
Lots of changes. Fairly stable now.
 1.15 26-Oct-1994  cgd new RCS ID format.
 1.14 20-Sep-1994  gwr branches: 1.14.2;
Add dev/eeprom.c
 1.13 27-May-1994  gwr Add m68k/copy.s
 1.12 10-May-1994  gwr Uncomment scsi stuff so config.new makes sd.h,st.h,...
(The new conf.c needs those generated headers.)
 1.11 04-May-1994  gwr Add zs driver files.
 1.10 01-Mar-1994  glass cleanup
 1.9 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.7 09-Jan-1994  cgd ddb code now common
 1.6 08-Jan-1994  cgd delete dupes
 1.5 12-Dec-1993  glass snapshot of my private sources
 1.4 10-Nov-1993  deraadt some cleanup, better than sending adam reminder notes
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.14.2.2 20-Sep-1994  gwr Add dev/eeprom.c
 1.14.2.1 20-Sep-1994  gwr file files.sun3.newconf was added on branch netbsd-1-0 on 1994-09-20 16:18:35 +0000
 1.16.2.1 30-Nov-1994  gwr Make a branch that works with the 1.0 code base.
 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 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.9 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.8 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
 1.7 22-Aug-2003  itojun create /dev/crypto
 1.6 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.5 25-Apr-2003  ragge branches: 1.5.2;
Add ksyms device major.
 1.4 20-Oct-2002  christos add ipfilter as 37
 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.sun3 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.4 11-Nov-2002  nathanw Catch up to -current
 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.sun3 was added on branch nathanw_sa on 2002-09-17 21:18:13 +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.sun3 was added on branch kqueue on 2002-10-10 18:37:00 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.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.4 04-Oct-2006  tsutsui Make sun3 port use MI mk48txx(4) and intersil7170(4) TOD clock drivers
with bus_space(9) support.
Note clock device name in obio.sun3 is renamed to oclock to use the same
MI attribute (intersil7170) with sun3x.

Tested on 3/80 and TME emulating 3/120 (but not on 3/4xx VME monsters).
 1.3 20-Nov-2001  lukem branches: 1.3.32; 1.3.62; 1.3.64;
cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.2 05-Feb-1998  gwr branches: 1.2.28; 1.2.32;
Merge arch/sun3x into arch/sun3
 1.1 27-Jan-1998  gwr branches: 1.1.2;
file obio.sun3 was initially added on branch gwr-3x3.
 1.1.2.1 27-Jan-1998  gwr Required OBIO stuff that used to be in std.sun3 is now here.
 1.2.32.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.64.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.3.62.1 18-Nov-2006  ad Sync with head.
 1.3.32.1 30-Dec-2006  yamt sync with head.
 1.3 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.2 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.1 27-Jan-1998  gwr branches: 1.1.2;
file obio.sun3x was initially added on branch gwr-3x3.
 1.1.2.1 27-Jan-1998  gwr Required OBIO stuff that used to be in std.sun3 is now here.
 1.35 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.34 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.33 01-Oct-2006  tsutsui branches: 1.33.56; 1.33.76; 1.33.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.32 11-Dec-2005  christos branches: 1.32.20; 1.32.22;
merge ktrace-lwp.
 1.31 17-Sep-2005  yamt include "conf/std".
 1.30 20-Oct-2002  chs branches: 1.30.6; 1.30.22;
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.29 22-Feb-2001  chs branches: 1.29.8;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.28 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.27 15-Nov-1999  fvdl branches: 1.27.4;
Add

prefix ../gnu/sys
cinclude "conf/files.softdep"
prefix

to all std.* files, so that soft dependencies can be activated using
"options SOFTDEP".
 1.26 12-Sep-1999  chs branches: 1.26.2; 1.26.8;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.25 24-Mar-1999  mrg clean up kernel/config files files for machVM lossage.
 1.24 23-Dec-1998  mrg move sun3 to UVM by default. only pica/arc & x68k left.
 1.23 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.22 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.21 07-May-1997  lukem branches: 1.21.10;
clean up whitespace use
 1.20 18-Jan-1997  gwr Moved MACHINE_NONCONTIG into include/vmparam.h
Also kill obsolete "options NEWCONFIG" line.
 1.19 19-Nov-1996  gwr Move SWAPPAGER, VNODEPAGER, DEVPAGER to std.sun3
 1.18 30-Oct-1996  gwr Use explicit addresses for obio devices.
 1.17 23-Oct-1996  gwr Add options EXEC_AOUT and EXEC_SCRIPT
 1.16 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.15 26-Mar-1996  gwr branches: 1.15.4;
New autoconfig design that controls attach order.
 1.14 24-Jan-1996  gwr Update for the new z8530 driver
 1.13 08-Oct-1995  gwr Add RAMDISK, move some things around.
Add rd*, xd*, xy* (only rd is done).
 1.12 24-Mar-1995  gwr Determine FPU type during autoconfig.
 1.11 11-Feb-1995  gwr Move FPCOPROC out of std.sun3
 1.10 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 01-Mar-1994  glass cleanup
 1.6 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 08-Jan-1994  cgd add id and machine arch spec
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.15.4.1 19-Aug-1996  gwr Add MFS to GENERIC and make most others similar to GENERIC.
 1.21.10.1 26-Jan-1998  gwr Move obio stuff out into separate files.
 1.26.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.26.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.26.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.27.4.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.29.8.1 11-Nov-2002  nathanw Catch up to -current
 1.30.22.2 30-Dec-2006  yamt sync with head.
 1.30.22.1 21-Jun-2006  yamt sync with head.
 1.30.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.32.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.32.20.1 18-Nov-2006  ad Sync with head.
 1.33.78.1 05-Mar-2011  rmind sync with head
 1.33.76.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.33.56.1 09-Oct-2010  yamt sync with head
 1.13 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.12 01-Oct-2006  tsutsui branches: 1.12.56; 1.12.76; 1.12.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.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 17-Sep-2005  yamt include "conf/std".
 1.9 20-Oct-2002  chs branches: 1.9.6; 1.9.22;
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.8 10-Feb-2002  chs add "-m68030" for sun3x, addresses PR 15312.
 1.7 22-Feb-2001  chs branches: 1.7.4; 1.7.8;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.6 22-Jun-2000  fvdl Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC.
 1.5 15-Nov-1999  fvdl branches: 1.5.4;
Add

prefix ../gnu/sys
cinclude "conf/files.softdep"
prefix

to all std.* files, so that soft dependencies can be activated using
"options SOFTDEP".
 1.4 12-Sep-1999  chs branches: 1.4.2; 1.4.8;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.3 24-Mar-1999  mrg clean up kernel/config files files for machVM lossage.
 1.2 23-Dec-1998  mrg move sun3 to UVM by default. only pica/arc & x68k left.
 1.1 08-Feb-1998  gwr Move the sun3-vs-sun3x stuff into std.sun3 and std.sun3x
Configure P4 frame buffers at the address of their P4 reg.
Move messy Sun3 bw2 and cg4 configs to included files.
 1.4.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.4.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.4.1 23-Jun-2000  fvdl As on the trunk, update these for the move of ffs_softdep.c into the
kernel source itself. Remove prefix construction, and add the SOFTDEP
option to GENERIC kernels.
 1.7.8.2 11-Nov-2002  nathanw Catch up to -current
 1.7.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.7.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.9.22.2 30-Dec-2006  yamt sync with head.
 1.9.22.1 21-Jun-2006  yamt sync with head.
 1.9.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.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.11.20.1 18-Nov-2006  ad Sync with head.
 1.12.78.1 05-Mar-2011  rmind sync with head
 1.12.76.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.12.56.1 09-Oct-2010  yamt sync with head
 1.3 19-Nov-1996  gwr kill some outdated stuff
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 30-Jul-1993  glass add todo list for dev directory
 1.3 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.2 03-May-2003  wiz branches: 1.2.230;
DMA, not dma nor Dma.
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.2 29-Oct-1995  gwr New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.1 29-Oct-1995  gwr file am9516.h was added on branch netbsd-1-1 on 1995-10-29 21:19:07 +0000
 1.2.230.1 02-Aug-2025  perseant Sync with HEAD
 1.10 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.9 11-Dec-2005  christos branches: 1.9.202;
merge ktrace-lwp.
 1.8 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.7 07-Aug-2003  agc branches: 1.7.8;
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 03-Aug-2002  itojun branches: 1.5.6;
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.4 19-Sep-2001  thorpej branches: 1.4.4; 1.4.12; 1.4.14;
machine/fbio.h -> dev/sun/fbio.h
 1.3 05-Sep-2001  tsutsui branches: 1.3.2;
Remove register prefixes.
 1.2 10-Apr-1995  gwr branches: 1.2.44; 1.2.48;
Oops, sparc -> sun3
 1.1 10-Mar-1995  gwr New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.2.48.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.48.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.48.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.44.1 04-Sep-2002  itojun pullup (itojun)

sys/arch/amiga/dev/grf_cv3d.c 1.11
sys/arch/hpcmips/dev/mq200.c 1.21
sys/arch/i386/i386/sys_machdep.c 1.64
sys/arch/luna68k/dev/lunafb.c 1.9
sys/arch/sparc/dev/bt_subr.c via patch
sys/arch/sparc64/dev/bt_subr.c via patch
sys/arch/sun3/dev/bt_subr.c via patch
sys/compat/ibcs2/ibcs2_stat.c 1.21-1.23
sys/dev/sun/bt_subr.c 1.3
sys/dev/tc/cfb.c 1.34
sys/dev/tc/sfb.c 1.53
sys/dev/tc/xcfb.c 1.29
integer overflow. reported by silvio@qualys.com
 1.3.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.14.1 07-Aug-2002  lukem Pull up revision 1.5 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.4.12.1 31-Aug-2002  gehenna catch up with -current.
 1.4.4.2 13-Aug-2002  nathanw Catch up to -current.
 1.4.4.1 19-Sep-2001  nathanw file bt_subr.c was added on branch nathanw_sa on 2002-08-13 02:18:59 +0000
 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.7.8.1 29-Apr-2005  kent sync with -current
 1.9.202.1 02-Aug-2025  perseant Sync with HEAD
 1.3 11-Dec-2005  christos 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 10-Mar-1995  gwr branches: 1.1.68;
New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with 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 07-Aug-2003  agc branches: 1.2.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 10-Mar-1995  gwr branches: 1.1.68;
New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.1.68.4 24-Jan-2005  skrll Sync with HEAD.
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.2.8.1 29-Apr-2005  kent sync with -current
 1.39 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.38 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.37 20-Dec-2023  thorpej branches: 1.37.2;
Remove unnecessary <sys/malloc.h>.
 1.36 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.35 16-Mar-2014  dholland branches: 1.35.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.34 28-Jun-2008  tsutsui branches: 1.34.30; 1.34.40; 1.34.46;
Split softc/device_t, with misc cosmetic changes.
 1.33 08-Jun-2008  tsutsui branches: 1.33.2;
Use device_private() and device_lookup_private() to get softc
and to see if device unit is vaild.
 1.32 12-Mar-2007  tsutsui branches: 1.32.38; 1.32.40; 1.32.42; 1.32.44;
Fix printf formats in #ifdef DEBUG.
 1.31 04-Mar-2007  christos branches: 1.31.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.30 29-Mar-2006  thorpej branches: 1.30.14;
Use device_cfdata().
 1.29 28-Mar-2006  thorpej Use device_unit().
 1.28 11-Dec-2005  christos branches: 1.28.4; 1.28.6; 1.28.8; 1.28.10; 1.28.12;
merge ktrace-lwp.
 1.27 19-Jun-2005  thorpej branches: 1.27.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.26 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.25 07-Aug-2003  agc branches: 1.25.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.24 15-Jul-2003  lukem __KERNEL_RCSID()
 1.23 23-Oct-2002  jdolecek branches: 1.23.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.22 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.21 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.20 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.19 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.18 30-May-2002  thorpej Statements must follow labels.
 1.17 19-Sep-2001  thorpej branches: 1.17.4; 1.17.12;
machine/fbio.h -> dev/sun/fbio.h
 1.16 29-Jun-2000  mrg branches: 1.16.2; 1.16.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.15 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.14 08-Feb-1998  gwr branches: 1.14.14; 1.14.24;
Rewrite the match/attch routines to use the P4 register
(when it exists). Also get the size right; other fixes.
 1.13 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.12 12-Jan-1998  thorpej branches: 1.12.2;
Update for changes to config.
 1.11 06-Oct-1997  gwr Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.10 19-Feb-1997  gwr branches: 1.10.4;
Get the screen size right on the 3/260 (Fixes PR#2402)
 1.9 17-Dec-1996  gwr branches: 1.9.6;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.8 13-Oct-1996  christos backout previous kprintf change
 1.7 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.5 10-Nov-1995  gwr Allow unit != 0
 1.4 10-Apr-1995  mycroft branches: 1.4.2;
map --> mmap
 1.3 10-Apr-1995  mycroft map --> mmap
 1.2 07-Apr-1995  gwr Changed fb_attach() interface
 1.1 10-Mar-1995  gwr New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.4.2.1 10-Nov-1995  gwr Update from HEAD
 1.9.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.2.2 27-Jan-1998  gwr Fix a warning.
 1.12.2.1 27-Jan-1998  gwr Merge Sun3X support. Video enable stuff moved out to enable.c
Still needs work, i.e. P4 register, etc. Later...
 1.14.24.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.14.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.4.3 28-Jun-2002  jdolecek provide kqfilter hooks (equivalent to seltrue() for poll() case), and
hook them to fb driver
 1.16.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.16.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.17.12.2 15-Jul-2002  gehenna catch up with -current.
 1.17.12.1 17-May-2002  gehenna Add device switch.
 1.17.4.5 11-Nov-2002  nathanw Catch up to -current
 1.17.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.17.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.17.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.17.4.1 19-Sep-2001  nathanw file bw2.c was added on branch nathanw_sa on 2002-06-20 03:41:42 +0000
 1.23.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.23.6.5 04-Feb-2005  skrll Adapt to branch.
 1.23.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.23.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.23.6.1 03-Aug-2004  skrll Sync with HEAD
 1.25.8.1 29-Apr-2005  kent sync with -current
 1.27.2.2 03-Sep-2007  yamt sync with head.
 1.27.2.1 21-Jun-2006  yamt sync with head.
 1.28.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 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.30.14.2 24-Mar-2007  yamt sync with head.
 1.30.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.31.2.1 13-Mar-2007  ad Sync with head.
 1.32.44.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.44.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.32.42.1 04-May-2009  yamt sync with head.
 1.32.40.1 17-Jun-2008  yamt sync with head.
 1.32.38.1 29-Jun-2008  mjf Sync with HEAD.
 1.33.2.1 03-Jul-2008  simonb Sync with head.
 1.34.46.1 18-May-2014  rmind sync with head
 1.34.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34.30.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.35.2.1 10-Aug-2014  tls Rebase.
 1.37.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 11-Dec-2005  christos 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 10-Mar-1995  gwr branches: 1.1.68;
New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.1.68.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.68.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.68.1 03-Aug-2004  skrll Sync with HEAD
 1.34 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.33 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.32 20-Dec-2023  thorpej branches: 1.32.2;
Remove unnecessary <sys/malloc.h>.
 1.31 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.30 16-Mar-2014  dholland branches: 1.30.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.29 28-Jun-2008  tsutsui branches: 1.29.30; 1.29.40; 1.29.46;
Split softc/device_t, with misc cosmetic changes.
 1.28 08-Jun-2008  tsutsui branches: 1.28.2;
Use device_private() and device_lookup_private() to get softc
and to see if device unit is vaild.
 1.27 04-Mar-2007  christos branches: 1.27.40; 1.27.42; 1.27.44; 1.27.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.26 11-Dec-2005  christos branches: 1.26.26;
merge ktrace-lwp.
 1.25 22-Jan-2005  chs branches: 1.25.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.24 07-Aug-2003  agc branches: 1.24.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.23 15-Jul-2003  lukem __KERNEL_RCSID()
 1.22 23-Oct-2002  jdolecek branches: 1.22.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.21 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.20 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.19 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.18 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.17 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.16 19-Sep-2001  thorpej branches: 1.16.4; 1.16.12; 1.16.14;
machine/fbio.h -> dev/sun/fbio.h
 1.15 05-Sep-2001  tsutsui branches: 1.15.2;
Remove register prefixes.
 1.14 05-Aug-2001  jdolecek use unsigned variable types as appropriate
 1.13 29-Jun-2000  mrg branches: 1.13.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.12 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.11 23-Jan-1998  gwr branches: 1.11.16; 1.11.26;
Add: extern struct cfdriver cgtwo_cd;
 1.10 12-Jan-1998  thorpej Update for changes to config.
 1.9 17-Oct-1997  gwr Clean up cg2match()
 1.8 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.7 13-Oct-1996  christos backout previous kprintf change
 1.6 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.5 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.4 10-Apr-1995  mycroft map --> mmap
 1.3 10-Apr-1995  mycroft map --> mmap
 1.2 08-Apr-1995  gwr It works now.
 1.1 07-Apr-1995  gwr First cut at cgtwo driver. Not quite right yet.
 1.11.26.2 16-Aug-2001  tv Pullup [jdolecek]:

sys/arch/amiga/dev/grf_cl.c 1.26
sys/arch/amiga/dev/grfioctl.h 1.14
sys/arch/hpcmips/dev/plumvideo.c 1.20
sys/arch/macppc/dev/ofb.c 1.25
sys/arch/sparc/dev/cgtwo.c 1.35
sys/arch/sparc/include/fbio.h patch
sys/arch/sparc64/include/fbio.h patch
sys/arch/sun3/dev/cg2.c 1.14
sys/arch/sun3/include/fbio.h patch
sys/dev/pci/tga.c 1.35
sys/dev/tc/cfb.c 1.28
sys/dev/tc/mfb.c 1.27
sys/dev/tc/sfb.c 1.46
sys/dev/tc/sfbplus.c 1.10 via patch
sys/dev/tc/tfb.c 1.30
sys/dev/tc/xcfb.c 1.23
sys/net/if_ppp.c 1.71

Use unsigned variable types to make bounds checking more correct.
 1.11.26.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.11.16.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.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.13.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.4.4 28-Jun-2002  jdolecek provide kqfilter hooks (equivalent to seltrue() for poll() case), and
hook them to fb driver
 1.13.4.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.13.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.15.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.15.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.16.14.1 07-Aug-2002  lukem Pull up revision 1.17 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.16.12.2 31-Aug-2002  gehenna catch up with -current.
 1.16.12.1 17-May-2002  gehenna Add device switch.
 1.16.4.5 11-Nov-2002  nathanw Catch up to -current
 1.16.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.16.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.16.4.2 13-Aug-2002  nathanw Catch up to -current.
 1.16.4.1 19-Sep-2001  nathanw file cg2.c was added on branch nathanw_sa on 2002-08-13 02:18:59 +0000
 1.22.6.5 04-Feb-2005  skrll Adapt to branch.
 1.22.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.22.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.6.1 03-Aug-2004  skrll Sync with HEAD
 1.24.8.1 29-Apr-2005  kent sync with -current
 1.25.8.2 03-Sep-2007  yamt sync with head.
 1.25.8.1 21-Jun-2006  yamt sync with head.
 1.26.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.27.46.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.27.46.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.27.44.1 04-May-2009  yamt sync with head.
 1.27.42.1 17-Jun-2008  yamt sync with head.
 1.27.40.1 29-Jun-2008  mjf Sync with HEAD.
 1.28.2.1 03-Jul-2008  simonb Sync with head.
 1.29.46.1 18-May-2014  rmind sync with head
 1.29.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.30.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.2.1 10-Aug-2014  tls Rebase.
 1.32.2.1 02-Aug-2025  perseant Sync with HEAD
 1.44 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.43 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.42 21-Nov-2020  thorpej branches: 1.42.24;
malloc(9) -> kmem(9)
 1.41 25-Jul-2014  dholland branches: 1.41.40;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.40 16-Mar-2014  dholland branches: 1.40.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.39 28-Jun-2008  tsutsui branches: 1.39.30; 1.39.40; 1.39.46;
Split softc/device_t, with misc cosmetic changes.
 1.38 08-Jun-2008  tsutsui branches: 1.38.2;
Use device_private() and device_lookup_private() to get softc
and to see if device unit is vaild.
 1.37 12-Mar-2007  tsutsui branches: 1.37.38; 1.37.40; 1.37.42; 1.37.44;
Fix printf formats in #ifdef DEBUG.
 1.36 04-Mar-2007  christos branches: 1.36.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.35 29-Mar-2006  thorpej branches: 1.35.14;
Use device_cfdata().
 1.34 28-Mar-2006  thorpej Use device_unit().
 1.33 11-Dec-2005  christos branches: 1.33.4; 1.33.6; 1.33.8; 1.33.10; 1.33.12;
merge ktrace-lwp.
 1.32 22-Jan-2005  chs branches: 1.32.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.31 07-Aug-2003  agc branches: 1.31.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.30 15-Jul-2003  lukem __KERNEL_RCSID()
 1.29 23-Oct-2002  jdolecek branches: 1.29.6;
merge kqueue branch into -current

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.28 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.27 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.26 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.25 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.24 03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.23 19-Sep-2001  thorpej branches: 1.23.4; 1.23.12; 1.23.14;
machine/fbio.h -> dev/sun/fbio.h
 1.22 05-Sep-2001  tsutsui branches: 1.22.2;
Remove register prefixes.
 1.21 29-Jun-2000  mrg branches: 1.21.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.20 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.19 09-Jun-1998  gwr branches: 1.19.14; 1.19.24;
Simplify ifdefs in cg4b_ldcmap()
 1.18 09-Jun-1998  gwr Make this work on the 3/80, which has the Brooktree DAC
wired high-byte-only like the sparc. (yuck!)
 1.17 21-Mar-1998  gwr Deal with missing P4 register on old Sun3/60 machines.
 1.16 08-Mar-1998  gwr Need to use an offset to map the colormap H/W now that the
config address is that of the P4 register. Oops.
 1.15 08-Feb-1998  gwr Rewrite the match/attch routines to use the P4 register
(when it exists). Also get the size right; other fixes.
 1.14 26-Jan-1998  gwr Simplify the colormap and blanking stuff a little.
 1.13 12-Jan-1998  thorpej branches: 1.13.2;
Update for changes to config.
 1.12 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.11 29-Oct-1996  gwr Checkpoint new version of this driver with support for the "Type A"
variant of the CG4 (the one with the AMD colormap DACs). This has
been tested only on the "Type B" H/W at this point (Brooktree DACs).
Thanks to Ezra Story and Scott Ellis for the "Type A" support.
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.7 17-Mar-1996  thorpej branches: 1.7.4;
New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 13-Apr-1995  gwr fix typo
 1.5 10-Apr-1995  mycroft map --> mmap
 1.4 10-Apr-1995  mycroft map --> mmap
 1.3 07-Apr-1995  gwr Fix that probe sequence right this time.
 1.2 07-Apr-1995  gwr Changed fb_attach() interface, hack probe to avoid impossible matches.
Corrected fbtype->fb_size (which x11r6 is picky about...)
 1.1 10-Mar-1995  gwr New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.7.4.1 08-Aug-1996  gwr Fix an uninitialized pointer.
 1.13.2.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.19.24.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.19.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.21.4.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.21.4.3 28-Jun-2002  jdolecek provide kqfilter hooks (equivalent to seltrue() for poll() case), and
hook them to fb driver
 1.21.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.21.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.22.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.22.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.14.1 07-Aug-2002  lukem Pull up revision 1.24 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.23.12.2 31-Aug-2002  gehenna catch up with -current.
 1.23.12.1 17-May-2002  gehenna Add device switch.
 1.23.4.5 11-Nov-2002  nathanw Catch up to -current
 1.23.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.23.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.23.4.2 13-Aug-2002  nathanw Catch up to -current.
 1.23.4.1 19-Sep-2001  nathanw file cg4.c was added on branch nathanw_sa on 2002-08-13 02:18:59 +0000
 1.29.6.5 04-Feb-2005  skrll Adapt to branch.
 1.29.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.29.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.29.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.29.6.1 03-Aug-2004  skrll Sync with HEAD
 1.31.8.1 29-Apr-2005  kent sync with -current
 1.32.8.2 03-Sep-2007  yamt sync with head.
 1.32.8.1 21-Jun-2006  yamt sync with head.
 1.33.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.33.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.33.8.1 01-Apr-2006  yamt sync with head.
 1.33.6.1 22-Apr-2006  simonb Sync with head.
 1.33.4.1 09-Sep-2006  rpaulo sync with head
 1.35.14.2 24-Mar-2007  yamt sync with head.
 1.35.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.36.2.1 13-Mar-2007  ad Sync with head.
 1.37.44.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.37.44.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.37.42.1 04-May-2009  yamt sync with head.
 1.37.40.1 17-Jun-2008  yamt sync with head.
 1.37.38.1 29-Jun-2008  mjf Sync with HEAD.
 1.38.2.1 03-Jul-2008  simonb Sync with head.
 1.39.46.1 18-May-2014  rmind sync with head
 1.39.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.39.30.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.40.2.1 10-Aug-2014  tls Rebase.
 1.41.40.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.42.24.1 02-Aug-2025  perseant Sync with HEAD
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 08-Mar-1998  gwr branches: 1.5.48;
No need for default base addresses here anymore.
 1.4 08-Feb-1998  gwr Define the CG4B_OFF_* values to be relative to the location of
the P4 register so the probe routine finds the P4 at off=0.
 1.3 29-Oct-1996  gwr Checkpoint new version of this driver with support for the "Type A"
variant of the CG4 (the one with the AMD colormap DACs). This has
been tested only on the "Type B" H/W at this point (Brooktree DACs).
Thanks to Ezra Story and Scott Ellis for the "Type A" support.
 1.2 07-Apr-1995  gwr Corrected fbtype->fb_size (which x11r6 is picky about...)
 1.1 10-Mar-1995  gwr New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.5.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.48.1 03-Aug-2004  skrll Sync with HEAD
 1.25 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.24 20-Dec-2023  thorpej branches: 1.24.2;
Remove unnecessary <sys/malloc.h>.
 1.23 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.22 13-Oct-2012  tsutsui branches: 1.22.36; 1.22.38;
Fix botch on device_t/softc split in #if 0'ed debug printf. from chs@
 1.21 16-Dec-2008  christos branches: 1.21.14; 1.21.24;
replace bitmask_snprintf(9) with snprintb(3)
 1.20 13-Apr-2008  tsutsui branches: 1.20.4; 1.20.12;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.19 04-Mar-2007  tsutsui branches: 1.19.40;
Add (char *) casts on pointer arith.
 1.18 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 03-Feb-2007  tsutsui branches: 1.17.2;
Make esp and its dma on 3/80 use bus_dma(9).

XXX: Maybe we should consider to use MI sys/dev/ic/lsi64854.c.
 1.16 11-Dec-2005  christos branches: 1.16.20;
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 15-Jul-2003  lukem branches: 1.14.8;
__KERNEL_RCSID()
 1.13 02-Oct-2002  thorpej branches: 1.13.6;
Add trailing ; to CFATTACH_DECL.
 1.12 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 08-Apr-1999  gwr branches: 1.10.2; 1.10.22; 1.10.26;
Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.9 13-Dec-1998  kleink Printf format warning cleanup.
 1.8 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7 07-Oct-1997  gwr branches: 1.7.4;
fix warnings
 1.6 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.5 26-Jun-1997  jeremy branches: 1.5.2; 1.5.4;
Duplicate changes recently made to the SPARC version of this file:
Do not print warnings if selection of a target via DMA was interrupted
by another target.
 1.4 20-Mar-1997  gwr Now using dev/ic/ncr53c9x.c
 1.3 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.2 24-Feb-1997  gwr branches: 1.2.2;
No need for dma_cd, so move it into the #if 0 section too.
 1.1 24-Feb-1997  jeremy branches: 1.1.1;
Initial revision
 1.1.1.1 24-Feb-1997  jeremy Initial import from SPARC port.
 1.2.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.5.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.7.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.10.26.1 18-Oct-2002  nathanw Catch up to -current.
 1.10.22.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.10.2.2 08-Apr-1999  gwr Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.10.2.1 08-Apr-1999  gwr file dma.c was added on branch netbsd-1-4 on 1999-04-08 04:46:42 +0000
 1.13.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.13.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.6.1 03-Aug-2004  skrll Sync with HEAD
 1.14.8.1 29-Apr-2005  kent sync with -current
 1.15.8.2 03-Sep-2007  yamt sync with head.
 1.15.8.1 26-Feb-2007  yamt sync with head.
 1.16.20.1 09-Feb-2007  ad Sync with HEAD.
 1.17.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.19.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.20.4.1 04-May-2009  yamt sync with head.
 1.21.24.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.14.1 30-Oct-2012  yamt sync with head
 1.22.38.1 10-Jun-2019  christos Sync with HEAD
 1.22.36.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.24.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 03-Feb-2007  tsutsui Make esp and its dma on 3/80 use bus_dma(9).

XXX: Maybe we should consider to use MI sys/dev/ic/lsi64854.c.
 1.5 11-Dec-2005  christos branches: 1.5.20;
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 08-Apr-1999  gwr branches: 1.3.2; 1.3.42; 1.3.50;
Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.2 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.1 24-Feb-1997  jeremy branches: 1.1.1; 1.1.2;
Initial revision
 1.1.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.1.1.1 24-Feb-1997  jeremy Initial import from SPARC port.
 1.3.50.1 29-Apr-2005  kent sync with -current
 1.3.42.1 24-Jan-2005  skrll Sync with HEAD.
 1.3.2.2 08-Apr-1999  gwr Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.3.2.1 08-Apr-1999  gwr file dmareg.h was added on branch netbsd-1-4 on 1999-04-08 04:46:42 +0000
 1.4.8.1 26-Feb-2007  yamt sync with head.
 1.5.20.1 09-Feb-2007  ad Sync with HEAD.
 1.10 13-Apr-2008  tsutsui Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.9 04-Mar-2007  tsutsui branches: 1.9.40;
Minor space nits.
 1.8 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 03-Feb-2007  tsutsui branches: 1.7.2;
Make esp and its dma on 3/80 use bus_dma(9).

XXX: Maybe we should consider to use MI sys/dev/ic/lsi64854.c.
 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 08-Apr-1999  gwr branches: 1.4.2; 1.4.42; 1.4.50;
Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.3 20-Mar-1997  gwr Now using dev/ic/ncr53c9x.c
 1.2 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.1 24-Feb-1997  jeremy branches: 1.1.1; 1.1.2;
Initial revision
 1.1.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.1.1.1 24-Feb-1997  jeremy Initial import from SPARC port.
 1.4.50.1 29-Apr-2005  kent sync with -current
 1.4.42.1 24-Jan-2005  skrll Sync with HEAD.
 1.4.2.2 08-Apr-1999  gwr Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.4.2.1 08-Apr-1999  gwr file dmavar.h was added on branch netbsd-1-4 on 1999-04-08 04:46:42 +0000
 1.5.8.2 03-Sep-2007  yamt sync with head.
 1.5.8.1 26-Feb-2007  yamt sync with head.
 1.6.20.1 09-Feb-2007  ad Sync with HEAD.
 1.7.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.35 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.34 21-Nov-2020  thorpej branches: 1.34.24;
malloc(9) -> kmem(9)
 1.33 10-Nov-2019  chs branches: 1.33.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.32 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.31 28-Jun-2008  tsutsui branches: 1.31.82; 1.31.84;
Split softc/device_t, with misc cosmetic changes.
 1.30 28-Apr-2008  martin branches: 1.30.2; 1.30.4;
Remove clause 3 and 4 from TNF licenses
 1.29 04-Mar-2007  christos branches: 1.29.40; 1.29.42; 1.29.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.28 11-Dec-2005  christos branches: 1.28.26;
merge ktrace-lwp.
 1.27 19-Jun-2005  thorpej branches: 1.27.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.26 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.25 15-Jul-2003  lukem branches: 1.25.8;
__KERNEL_RCSID()
 1.24 02-Oct-2002  thorpej branches: 1.24.6;
Add trailing ; to CFATTACH_DECL.
 1.23 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.22 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.21 05-Sep-2001  tsutsui branches: 1.21.6;
bcopy() -> memcpy(), bzero() -> memset()
 1.20 05-Jun-2001  thorpej branches: 1.20.2;
(locally defined) HZ -> hz
 1.19 27-May-2001  chs don't abuse cf_unit.
 1.18 05-Feb-1998  gwr branches: 1.18.26;
Merge arch/sun3x into arch/sun3
 1.17 12-Jan-1998  thorpej branches: 1.17.2;
Update for changes to config.
 1.16 28-Apr-1997  gwr No longer needs an early init call (just normal autoconfig).
 1.15 18-Mar-1997  gwr Read the EEPROM once at attach time, then do user I/O on the copy.
Make /dev/eeprom support normal "read to EOF" behaviour.
Removed ee_console, ee_get_byte (dead code).
 1.14 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.13 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.12 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.11 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.7 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 24-May-1995  gwr Fix missing return(0) - from Jason Thorpe - fixes PR 1049
 1.5 10-Mar-1995  gwr Provide ee_console for drivers.
 1.4 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 20-Sep-1994  gwr branches: 1.1.2;
New functions to handle writing EEPROM with correct delay.
Also provides ee_get_byte() for early use by other drivers.
 1.1.2.2 20-Sep-1994  gwr New functions to handle writing EEPROM with correct delay.
Also provides ee_get_byte() for early use by other drivers.
 1.1.2.1 20-Sep-1994  gwr file eeprom.c was added on branch netbsd-1-0 on 1994-09-20 16:35:45 +0000
 1.17.2.1 27-Jan-1998  gwr Avoid stepping on the Mostek clock found in the end of the EEPROM
on the Sun3/80 (and other Sun3X changes).
 1.18.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.20.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.21.6.1 05-Sep-2001  nathanw file eeprom.c was added on branch nathanw_sa on 2002-10-18 02:40:19 +0000
 1.24.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.24.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.24.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.6.1 03-Aug-2004  skrll Sync with HEAD
 1.25.8.1 29-Apr-2005  kent sync with -current
 1.27.2.1 03-Sep-2007  yamt sync with head.
 1.28.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.29.44.2 04-May-2009  yamt sync with head.
 1.29.44.1 16-May-2008  yamt sync with head.
 1.29.42.1 18-May-2008  yamt sync with head.
 1.29.40.2 29-Jun-2008  mjf Sync with HEAD.
 1.29.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.4.1 03-Jul-2008  simonb Sync with head.
 1.30.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.31.84.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.84.1 10-Jun-2019  christos Sync with HEAD
 1.31.82.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.33.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.34.24.1 02-Aug-2025  perseant Sync with HEAD
 1.30 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.29 02-Jun-2024  andvar branches: 1.29.2;
fix various typos in word `interrupt', mainly in comments.
 1.28 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.27 13-Apr-2008  tsutsui branches: 1.27.2; 1.27.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.26 04-Mar-2007  christos branches: 1.26.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.25 03-Feb-2007  tsutsui branches: 1.25.2;
Make esp and its dma on 3/80 use bus_dma(9).

XXX: Maybe we should consider to use MI sys/dev/ic/lsi64854.c.
 1.24 23-Jan-2007  tsutsui Use bus_space(9).
 1.23 28-Mar-2006  thorpej branches: 1.23.8;
Use device_unit().
 1.22 08-Mar-2006  lukem branches: 1.22.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.21 11-Dec-2005  christos branches: 1.21.4; 1.21.6; 1.21.8; 1.21.10;
merge ktrace-lwp.
 1.20 30-Jan-2005  tsutsui branches: 1.20.6;
Enable NCR_F_DMASELECT to use DMA xfer on command/selection phase.

It didn't work on sun3x when I and gwr tried back in April 1999,
but now it just works fine.
 1.19 22-Jan-2005  chs branches: 1.19.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 15-Jul-2003  lukem branches: 1.18.8;
__KERNEL_RCSID()
 1.17 02-Oct-2002  thorpej branches: 1.17.6;
Add trailing ; to CFATTACH_DECL.
 1.16 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.15 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.14 25-Apr-2001  bouyer branches: 1.14.2; 1.14.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.13 29-Mar-2001  petrov use NCR_F_DMASELECT instead of ncr53c9x_dmaselect
 1.12 05-Jun-2000  nisimura branches: 1.12.4;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.
 1.11 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.10 08-Apr-1999  gwr branches: 1.10.2; 1.10.8; 1.10.16;
Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.9 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.8 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.7 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.6 12-Jan-1998  thorpej branches: 1.6.4;
Update for config changes.
 1.5 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.4 27-Jun-1997  jeremy branches: 1.4.2; 1.4.4;
Add reference to DMA selection variable used in dev/ic/ncr53c9x.c and sample
code to enable it. Currently commented out.
 1.3 20-Mar-1997  gwr Now using dev/ic/ncr53c9x.c
 1.2 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.1 24-Feb-1997  jeremy branches: 1.1.1; 1.1.2;
Initial revision
 1.1.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.1.1.1 24-Feb-1997  jeremy Initial import from SPARC port.
 1.4.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.6.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.10.16.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.8.3 21-Apr-2001  bouyer Sync with HEAD
 1.10.8.2 29-Mar-2001  bouyer Test-compile on i386.
 1.10.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.2.2 08-Apr-1999  gwr Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.10.2.1 08-Apr-1999  gwr file esp.c was added on branch netbsd-1-4 on 1999-04-08 04:46:42 +0000
 1.12.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.12.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.14.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.14.8.1 25-Apr-2001  nathanw file esp.c was added on branch nathanw_sa on 2002-10-18 02:40:19 +0000
 1.14.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.17.6.5 04-Feb-2005  skrll Sync with HEAD.
 1.17.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.17.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1 03-Aug-2004  skrll Sync with HEAD
 1.18.8.1 29-Apr-2005  kent sync with -current
 1.19.2.1 12-Feb-2005  yamt sync with head.
 1.20.6.3 03-Sep-2007  yamt sync with head.
 1.20.6.2 26-Feb-2007  yamt sync with head.
 1.20.6.1 21-Jun-2006  yamt sync with head.
 1.21.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.21.8.2 01-Apr-2006  yamt sync with head.
 1.21.8.1 13-Mar-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.22.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.23.8.2 09-Feb-2007  ad Sync with HEAD.
 1.23.8.1 01-Feb-2007  ad Sync with head.
 1.25.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.4.1 16-May-2008  yamt sync with head.
 1.27.2.1 18-May-2008  yamt sync with head.
 1.29.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 24-Jan-1996  gwr Update for the new z8530 driver
 1.4 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.4 24-Jan-1996  gwr Update for the new z8530 driver
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.18 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.17 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.16 25-Jul-2014  dholland branches: 1.16.64;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.15 16-Mar-2014  dholland branches: 1.15.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.14 04-Mar-2007  christos branches: 1.14.78; 1.14.88; 1.14.94;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 11-Dec-2005  christos branches: 1.13.26;
merge ktrace-lwp.
 1.12 22-Jan-2005  chs branches: 1.12.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 07-Aug-2003  agc branches: 1.11.8;
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-Oct-2002  jdolecek branches: 1.9.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.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 19-Sep-2001  thorpej branches: 1.7.4; 1.7.12;
machine/fbio.h -> dev/sun/fbio.h
 1.6 26-Jun-2000  simonb branches: 1.6.2; 1.6.4;
Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.5 08-Feb-1998  gwr branches: 1.5.14; 1.5.24;
Add fb_eeprom_setsize() for setting the FB size based on the EEPROM
value (to be used only if unit=0). Add P4 helper functions:
fb_pfour_id, fb_pfour_setsize, fb_pfour_{get,set}_video
 1.4 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.3 10-Apr-1995  mycroft map --> mmap
 1.2 07-Apr-1995  gwr Changed fb_attach() interface
 1.1 10-Mar-1995  gwr New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.5.24.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.5.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.4.2 28-Jun-2002  jdolecek provide kqfilter hooks (equivalent to seltrue() for poll() case), and
hook them to fb driver
 1.6.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.6.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.12.1 17-May-2002  gehenna Add device switch.
 1.7.4.3 11-Nov-2002  nathanw Catch up to -current
 1.7.4.2 17-Sep-2002  nathanw Catch up to -current.
 1.7.4.1 19-Sep-2001  nathanw file fb.c was added on branch nathanw_sa on 2002-09-17 21:18:15 +0000
 1.9.6.5 04-Feb-2005  skrll Adapt to branch.
 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.11.8.1 29-Apr-2005  kent sync with -current
 1.12.8.2 03-Sep-2007  yamt sync with head.
 1.12.8.1 21-Jun-2006  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.94.1 18-May-2014  rmind sync with head
 1.14.88.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.78.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.2.1 10-Aug-2014  tls Rebase.
 1.16.64.1 02-Aug-2025  perseant Sync with HEAD
 1.14 12-Feb-2022  riastradh sys: Fix various abuse of struct device internals.

Will help to make struct device opaque later.
 1.13 28-Jun-2008  tsutsui Split softc/device_t, with misc cosmetic changes.
 1.12 04-Mar-2007  christos branches: 1.12.40; 1.12.44; 1.12.46; 1.12.48;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 05-Oct-2006  tsutsui branches: 1.11.4;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.10 11-Dec-2005  christos branches: 1.10.20; 1.10.22;
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 07-Aug-2003  agc branches: 1.8.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7 23-Oct-2002  jdolecek branches: 1.7.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.6 26-Jun-2000  simonb branches: 1.6.2; 1.6.4; 1.6.8;
Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.5 08-Feb-1998  gwr branches: 1.5.14; 1.5.24;
Add fb_eeprom_setsize() for setting the FB size based on the EEPROM
value (to be used only if unit=0). Add P4 helper functions:
fb_pfour_id, fb_pfour_setsize, fb_pfour_{get,set}_video
 1.4 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.3 29-Oct-1996  gwr Fix typo (fbattach => fb_attach)
 1.2 07-Apr-1995  gwr Changed fb_attach() interface
 1.1 10-Mar-1995  gwr New frame-buffer support from Chuck Silvers (plus some tweaks from me)
 1.5.24.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.5.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.8.1 11-Nov-2002  nathanw Catch up to -current
 1.6.4.1 28-Jun-2002  jdolecek provide kqfilter hooks (equivalent to seltrue() for poll() case), and
hook them to fb driver
 1.6.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.7.6.5 04-Feb-2005  skrll Adapt to branch.
 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.8.8.1 29-Apr-2005  kent sync with -current
 1.9.8.3 03-Sep-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.10.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.10.20.1 18-Nov-2006  ad Sync with head.
 1.11.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.48.1 03-Jul-2008  simonb Sync with head.
 1.12.46.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.12.44.1 04-May-2009  yamt sync with head.
 1.12.40.1 29-Jun-2008  mjf Sync with HEAD.
 1.89 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.88 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.87 20-May-2022  andvar branches: 1.87.10;
s/auxillary/auxiliary/ in comments.
 1.86 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.85 24-Apr-2021  thorpej branches: 1.85.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.84 21-Nov-2020  thorpej branches: 1.84.2;
malloc(9) -> kmem(9)
 1.83 10-Nov-2019  chs branches: 1.83.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.82 08-Feb-2019  mrg make *fd*.c's fd_dev_to_type() always a static inline. some
have it as a const, and have code to copy the defaults to
modify them before using them, but that probably requires a
real test to feel confident in changing.
 1.81 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.80 26-Apr-2015  mlelstv branches: 1.80.16; 1.80.18;
Use C99-style initializers for struct dkdriver.
 1.79 02-Jan-2015  christos We have three sets of DTYPE_ constants in the kernel:
altq Drop Type
disklabel Disk Type
file Descriptor Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
 1.78 20-Aug-2014  tsutsui branches: 1.78.2;
Sync with sparc/dev/fd.c rev 1.155.

> Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().

Note sun3 still uses gcc 4.5.4 but also panicked by this old bug,
so probably this problem was triggered by not gcc 4.8 but struct disk
changes (struct disk_geom was added in <sys/disk.h> rev 1.58),
which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes.
(i.e. now struct fd_softc could be allocated in a different pool block,
probably near the wrong pointer of the struct disklabel)

Anyway, this fix should be pullued up to netbsd-7.
(probably I'm the only user of floppy on sun3 though)
 1.77 25-Jul-2014  dholland branches: 1.77.2;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.76 25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.75 16-Mar-2014  dholland branches: 1.75.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.74 29-Oct-2012  chs branches: 1.74.2;
fix compile problems.
 1.73 13-Oct-2012  tsutsui struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.72 16-Jul-2011  mrg branches: 1.72.2; 1.72.8; 1.72.12; 1.72.14; 1.72.16;
apply some static.
 1.71 26-Sep-2009  tsutsui Make local functions static.
 1.70 26-Sep-2009  tsutsui Replace shutdownhook_establish(9) with pmf_device_register1(9).
Tested on 3/80.
 1.69 13-Jan-2009  yamt g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.68 16-Dec-2008  christos replace bitmask_snprintf(9) with snprintb(3)
 1.67 09-Nov-2008  tsutsui Make compile this with options DIAGNOSTIC.
 1.66 28-Jun-2008  tsutsui branches: 1.66.2; 1.66.4; 1.66.6;
Pull some fdformat fixes from sys/arch/sparc/dev/fd.c.
 1.65 28-Jun-2008  tsutsui Split softc/device_t, with misc cosmetic changes.
 1.64 08-Jun-2008  tsutsui branches: 1.64.2;
Use device_private() and device_lookup_private() in more places.
 1.63 08-Jun-2008  tsutsui Use device_private() and device_lookup_private() to get softc.
 1.62 04-Jan-2008  joerg branches: 1.62.6; 1.62.8; 1.62.10; 1.62.12;
Add missing mutex for cv_timedwait.
 1.61 02-Jan-2008  ad Merge vmlocking2 to head.
 1.60 04-Dec-2007  tsutsui branches: 1.60.4;
Adapt sun68k ports to recent interrupt handling changes.

XXX: sun2 (m68010) doesn't have CAS instructions.
 1.59 17-Oct-2007  garbled branches: 1.59.2; 1.59.4;
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.58 08-Oct-2007  ad Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.57 29-Jul-2007  ad branches: 1.57.4; 1.57.6; 1.57.8;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.56 09-Jul-2007  ad branches: 1.56.2; 1.56.4;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.55 04-Mar-2007  tsutsui branches: 1.55.2; 1.55.4; 1.55.10;
Add (char *) casts on pointer arith.
 1.54 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.53 15-Feb-2007  reinoud branches: 1.53.2;
Rename the B_XXX flag to B_DEVPRIVATE flag since it was never used for
debugging and its main use is in device drivers. Its used there to signal
that the flagged buffer has a special meaning or should be handled
differently.

OK'd by Bill Sudenmund on tech-kern.
 1.52 14-Oct-2006  tsutsui Make this compile with FD_DEBUG.
 1.51 06-Oct-2006  tsutsui Use IPL_BIO rather than (temporarily defined) IPL_SOFT_LEVEL2.
Both of them share cpu ipl 2, and maybe it's intentional design
since fd.c uses ipl 6 for hardware interrupt.
 1.50 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.49 01-Sep-2006  matt branches: 1.49.2; 1.49.4;
Fix a -Wshadow error.
 1.48 19-Apr-2006  he Follow up i/o statistics collection conversion, patterned after the sparc fd.c.
 1.47 23-Feb-2006  thorpej branches: 1.47.2; 1.47.4; 1.47.6;
Use device_parent().
 1.46 24-Dec-2005  perry branches: 1.46.2; 1.46.4; 1.46.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.45 11-Dec-2005  christos merge ktrace-lwp.
 1.44 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.43 03-Jun-2005  tsutsui branches: 1.43.2;
Constify.
 1.42 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.41 28-Oct-2004  yamt branches: 1.41.4;
move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.40 24-Mar-2004  pk Remove my name from the old UCB copyright notice, thereby reducing its
reference count to 1.
 1.39 26-Sep-2003  tsutsui TAB/space cleanup.
 1.38 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.37 15-Jul-2003  lukem __KERNEL_RCSID()
 1.36 18-Jun-2003  drochner branches: 1.36.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.35 21-May-2003  kristerw Correct a diagnostic printf format specifier.
 1.34 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.33 01-Nov-2002  mrg implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
when processing hw.diskstats, add the read&write bytes/transfers for
the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail. however, the next time this is
change it will not fail again.

this is just the kernel portion.
 1.32 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.31 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.30 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.29 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.28 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.27 24-Jul-2002  hannken Fix a bug from last commit: Look for more work AFTER the current buf
is removed from the queue.
 1.26 23-Jul-2002  hannken Convert to new device buffer queue interface.

Approved by: Nathan J. Williams <nathanw@netbsd.org>
 1.25 05-Sep-2001  tsutsui branches: 1.25.2; 1.25.6; 1.25.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.24 05-Sep-2001  tsutsui Remove register prefixes.
 1.23 08-Jul-2001  wiz branches: 1.23.2;
Correct various misspellings of 'transfer' and inflected forms.
 1.22 24-Aug-2000  nathanw In fdioctl(), allocate fd_formb dynamically when needed, rather than on
the stack, and remove the no-longer-necessary PHOLD()/PRELE() calls
in fdformat().

(This eliminates 1/3 of the instances of PHOLD()/PRELE() in the kernel code.)

XXX We still have too many mostly-redundant floppy drivers.
 1.21 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.20 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.19 16-May-2000  thorpej branches: 1.19.2;
Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.18 07-Apr-2000  thorpej Use separate callouts for motor-on and motor-off. Fixes a condition
where the floppy driver would wedge because a motor-on timeout would
be cancelled by another I/O operation cancelling a motor-off timeout.

From enami tsugutomo <enami@sm.sony.co.jp>.
 1.17 31-Mar-2000  tsutsui Add include <vm/vm.h> and <uvm/uvm_extern.h> for
declaration of uvm_swapin(), which is no longer in <sys/proc.h>.
 1.16 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.15 07-Feb-2000  thorpej Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle. Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
 1.14 28-Jan-2000  thorpej Fix part of previous commit.
 1.13 28-Jan-2000  jdc BUFQ_* fixes.
 1.12 21-Jan-2000  thorpej Update for sys/buf.h/disksort_*() changes.
 1.11 08-Feb-1999  bouyer branches: 1.11.8; 1.11.14;
Change DIOCEJECT to do what's needed to eject a device before the eject
command (unlock for sd and cd) if no other partitions are open, return
EBUSY otherwise. DIOCEJECT will have the old semantic if its argument is not
0. The old ioctl has been renamed to ODIOCEJECT for binary compatibility.
 1.10 15-Aug-1998  mycroft Make copyright notices with my name consistent.
 1.9 23-Jul-1998  gwr Print a complaint when no children were specified
in the config file. Better than a link error...
 1.8 04-Jul-1998  jonathan defopt DDB.
 1.7 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.6 22-Jan-1998  gwr branches: 1.6.4;
Add: extern struct cfdriver fdc_cd;
 1.5 12-Jan-1998  thorpej Update for config changes.
 1.4 30-May-1997  jeremy When turning off the drive motor, de-select the drive so the busy light
extinguishes.
 1.3 24-May-1997  jeremy Prevent RAM disk hooks from compiling until sun3 md_root.c can support
ram disk images that are read in from the outside.
Sync with some old local changes.
 1.2 25-Apr-1997  gwr Fixed OBIO locators bug, so this can do the normal thing now.
Also improved handling of spurious interrupts, and sync up with
the sparc version.
 1.1 09-Apr-1997  jeremy First working version.
 1.6.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.11.14.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

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

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

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.11.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.19.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.23.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.23.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.23.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.25.14.2 31-Aug-2002  gehenna catch up with -current.
 1.25.14.1 17-May-2002  gehenna Add device switch.
 1.25.6.6 03-Jan-2003  thorpej Sync with HEAD.
 1.25.6.5 11-Nov-2002  nathanw Catch up to -current
 1.25.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.25.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.25.6.2 01-Aug-2002  nathanw Catch up to -current.
 1.25.6.1 05-Sep-2001  nathanw file fd.c was added on branch nathanw_sa on 2002-08-01 02:43:54 +0000
 1.25.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.36.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.36.2.6 04-Feb-2005  skrll Adapt to branch.
 1.36.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.36.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.41.4.1 29-Apr-2005  kent sync with -current
 1.43.2.7 21-Jan-2008  yamt sync with head
 1.43.2.6 07-Dec-2007  yamt sync with head
 1.43.2.5 27-Oct-2007  yamt sync with head.
 1.43.2.4 03-Sep-2007  yamt sync with head.
 1.43.2.3 26-Feb-2007  yamt sync with head.
 1.43.2.2 30-Dec-2006  yamt sync with head.
 1.43.2.1 21-Jun-2006  yamt sync with head.
 1.46.6.1 22-Apr-2006  simonb Sync with head.
 1.46.4.1 09-Sep-2006  rpaulo sync with head
 1.46.2.1 01-Mar-2006  yamt sync with head.
 1.47.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.47.4.1 11-May-2006  elad sync with head
 1.47.2.2 03-Sep-2006  yamt sync with head.
 1.47.2.1 24-May-2006  yamt sync with head.
 1.49.4.2 22-Oct-2006  yamt sync with head
 1.49.4.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.49.2.1 18-Nov-2006  ad Sync with head.
 1.53.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.55.10.2 16-Oct-2007  garbled Sync with HEAD
 1.55.10.1 03-Oct-2007  garbled Sync with HEAD
 1.55.4.1 11-Jul-2007  mjf Sync with head.
 1.55.2.3 20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.55.2.2 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.55.2.1 15-Jul-2007  ad Sync with head.
 1.56.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.56.2.1 07-Aug-2007  matt Sync with HEAD.
 1.57.8.1 14-Oct-2007  yamt sync with head.
 1.57.6.2 09-Jan-2008  matt sync with HEAD
 1.57.6.1 06-Nov-2007  matt sync with HEAD
 1.57.4.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.57.4.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.59.4.2 31-Dec-2007  ad Catch up with buffer cache changes.
 1.59.4.1 08-Dec-2007  ad Sync with head.
 1.59.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.59.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.60.4.2 08-Jan-2008  bouyer Sync with HEAD
 1.60.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.62.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.62.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.62.10.2 11-Mar-2010  yamt sync with head
 1.62.10.1 04-May-2009  yamt sync with head.
 1.62.8.1 17-Jun-2008  yamt sync with head.
 1.62.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.62.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.64.2.1 03-Jul-2008  simonb Sync with head.
 1.66.6.1 15-Nov-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #61):
sys/arch/sun3/dev/fd.c: revision 1.67
Make compile this with options DIAGNOSTIC.
 1.66.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.66.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.72.16.1 03-Nov-2014  msaitoh Pull up following revision(s) (requested by tsutsui in ticket #1139):
sys/arch/sun3/dev/fd.c: revision 1.78
sys/arch/sparc/dev/fd.c: revision 1.155
sys/arch/sparc64/dev/fdc.c: revision 1.42
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).
Should be pulled up to netbsd-7.
Sync with sparc/dev/fd.c:1.155.
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).
Should be pulled up to netbsd-7.
Sync with sparc/dev/fd.c rev 1.155.
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
Note sun3 still uses gcc 4.5.4 but also panicked by this old bug,
so probably this problem was triggered by not gcc 4.8 but struct disk
changes (struct disk_geom was added in <sys/disk.h> rev 1.58),
which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes.
(i.e. now struct fd_softc could be allocated in a different pool block,
probably near the wrong pointer of the struct disklabel)
Anyway, this fix should be pullued up to netbsd-7.
(probably I'm the only user of floppy on sun3 though)
 1.72.14.1 03-Nov-2014  msaitoh Pull up following revision(s) (requested by tsutsui in ticket #1139):
sys/arch/sun3/dev/fd.c: revision 1.78
sys/arch/sparc/dev/fd.c: revision 1.155
sys/arch/sparc64/dev/fdc.c: revision 1.42
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).
Should be pulled up to netbsd-7.
Sync with sparc/dev/fd.c:1.155.
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).
Should be pulled up to netbsd-7.
Sync with sparc/dev/fd.c rev 1.155.
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
Note sun3 still uses gcc 4.5.4 but also panicked by this old bug,
so probably this problem was triggered by not gcc 4.8 but struct disk
changes (struct disk_geom was added in <sys/disk.h> rev 1.58),
which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes.
(i.e. now struct fd_softc could be allocated in a different pool block,
probably near the wrong pointer of the struct disklabel)
Anyway, this fix should be pullued up to netbsd-7.
(probably I'm the only user of floppy on sun3 though)
 1.72.12.3 03-Dec-2017  jdolecek update from HEAD
 1.72.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.72.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.72.8.1 03-Nov-2014  msaitoh Pull up following revision(s) (requested by tsutsui in ticket #1139):
sys/arch/sun3/dev/fd.c: revision 1.78
sys/arch/sparc/dev/fd.c: revision 1.155
sys/arch/sparc64/dev/fdc.c: revision 1.42
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).
Should be pulled up to netbsd-7.
Sync with sparc/dev/fd.c:1.155.
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).
Should be pulled up to netbsd-7.
Sync with sparc/dev/fd.c rev 1.155.
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
Note sun3 still uses gcc 4.5.4 but also panicked by this old bug,
so probably this problem was triggered by not gcc 4.8 but struct disk
changes (struct disk_geom was added in <sys/disk.h> rev 1.58),
which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes.
(i.e. now struct fd_softc could be allocated in a different pool block,
probably near the wrong pointer of the struct disklabel)
Anyway, this fix should be pullued up to netbsd-7.
(probably I'm the only user of floppy on sun3 though)
 1.72.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.72.2.1 30-Oct-2012  yamt sync with head
 1.74.2.1 18-May-2014  rmind sync with head
 1.75.2.1 10-Aug-2014  tls Rebase.
 1.77.2.1 24-Aug-2014  martin Pull up following revision(s) (requested by tsutsui in ticket #53):
sys/arch/sun3/dev/fd.c: revision 1.78
sys/arch/sparc/dev/fd.c: revision 1.155
sys/arch/sparc64/dev/fdc.c: revision 1.42
Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
 1.78.2.2 06-Jun-2015  skrll Sync with HEAD
 1.78.2.1 06-Apr-2015  skrll Sync with HEAD
 1.80.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.80.18.1 10-Jun-2019  christos Sync with HEAD
 1.80.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.83.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.84.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.85.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.87.10.1 02-Aug-2025  perseant Sync with 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 07-Aug-2003  agc branches: 1.2.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 09-Apr-1997  jeremy branches: 1.1.50;
First working version.
 1.1.50.4 24-Jan-2005  skrll Sync with HEAD.
 1.1.50.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.50.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.50.1 03-Aug-2004  skrll Sync with HEAD
 1.2.8.1 29-Apr-2005  kent sync with -current
 1.7 30-Jun-2011  wiz dependant -> dependent
 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 03-May-2003  wiz branches: 1.3.2; 1.3.10;
DMA, not dma nor Dma.
 1.2 05-Sep-1998  pk Assign my copyrights to TNF.
 1.1 09-Apr-1997  jeremy First working version.
 1.3.10.1 29-Apr-2005  kent sync with -current
 1.3.2.1 24-Jan-2005  skrll Sync with HEAD.
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.5 13-Feb-1997  gwr Replace caddr_t with u_int in device structs.
Reduce MAXMCAST by a few to be safe.
 1.4 13-Dec-1996  gwr branches: 1.4.6;
Increase MAXMCAST from 50 to 250 (to match dev/ic/i82586.h).
 1.3 08-Oct-1995  gwr Note that this should be merged with dev/ic/i82586reg.h
 1.2 26-Jan-1995  gwr Updated ie driver based on i386 version 1.30
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.4.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.22 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.21 17-Oct-1997  gwr branches: 1.21.4;
Sync. with the sun3x (mostly cosmetic changes).
 1.20 06-Oct-1997  gwr Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.19 28-Apr-1997  gwr branches: 1.19.4;
Sync. up with the sun3x version.
 1.18 27-Jan-1997  gwr Nuke sunmon.h, add machdep.h
 1.17 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic()
Let idprom_init() have void return.
 1.16 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.15 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.14 13-Dec-1996  gwr Kill some dead code.
 1.13 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.12 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.11 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.10 11-Feb-1995  gwr Moved some functions here from sun3_startup.c
 1.9 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 06-May-1994  gwr Tracking 4.4 integration
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 08-Aug-1993  glass stuff to make them compile properly
 1.3 05-Aug-1993  glass gets to consinit() and blows up
 1.2 30-Jul-1993  glass make idprom compile, and a bogus OBIO addr
 1.1 29-Jun-1993  glass added /dev/idprom driver :), doesn't compile yet
 1.19.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.4.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.74 09-Feb-2024  andvar fix spelling mistakes, mainly in comments and log messages.
 1.73 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.72 19-Mar-2020  thorpej Don't bother with IFF_OACTIVE. Just keep processing so long as
sc->xmit_busy is less than sc->ntxbuf.
 1.71 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.70 28-May-2019  msaitoh branches: 1.70.4;
Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.69 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.68 23-May-2019  msaitoh -No functional change:
- KNF
- u_int*_t -> uint*_t.
 1.67 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.66 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.65 26-Jun-2018  msaitoh branches: 1.65.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.64 22-Jun-2018  msaitoh Remove bpf_tap() in iexmit() because ie_start() does bpf_mtap().
 1.63 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.62 22-Feb-2017  nonaka branches: 1.62.6; 1.62.12;
Apply deferred if_start to more MD drivers.
 1.61 15-Dec-2016  ozaki-r branches: 1.61.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.60 06-Dec-2016  ozaki-r Remove obsolete ancient optimization for bpf

The optimization code was obsoleted over 15 years ago.
We can remove it safely.
 1.59 07-Jul-2016  msaitoh branches: 1.59.2;
KNF. Remove extra spaces. No functional change.
 1.58 10-Jun-2016  ozaki-r 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.57 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.56 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.55 05-Apr-2010  joerg branches: 1.55.18; 1.55.36;
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.54 19-Jan-2010  pooka branches: 1.54.2; 1.54.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.53 18-Mar-2009  cegger bcmp -> memcmp
 1.52 07-Nov-2008  dyoung branches: 1.52.4;
*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.51 28-Jun-2008  tsutsui branches: 1.51.2; 1.51.4;
Split softc/device_t, with misc cosmetic changes.
 1.50 17-Oct-2007  garbled branches: 1.50.16; 1.50.20; 1.50.22; 1.50.24;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.49 06-Sep-2007  he Remove a now-unused local variable.
 1.48 01-Sep-2007  dyoung Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.47 26-Aug-2007  dyoung branches: 1.47.2;
Constify.
 1.46 04-Mar-2007  tsutsui branches: 1.46.2; 1.46.10; 1.46.14; 1.46.18;
Use proper casts.
 1.45 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.44 11-Dec-2005  christos branches: 1.44.26;
merge ktrace-lwp.
 1.43 03-Jun-2005  tsutsui branches: 1.43.2;
Appease gcc -Wcast-qual by __UNVOLATILE().
 1.42 30-May-2005  tsutsui Avoid NULL pointer dereference in case of #if NBPFILTER == 0.
Closes PR port-sun3/21699.
 1.41 22-Jan-2005  chs branches: 1.41.6;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.40 30-Oct-2004  thorpej branches: 1.40.4;
When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.39 15-Jul-2003  lukem branches: 1.39.2; 1.39.4;
__KERNEL_RCSID()
 1.38 20-Jan-2003  bouyer branches: 1.38.2;
bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.37 05-Sep-2001  tsutsui branches: 1.37.6; 1.37.16;
- bcopy() -> memcpy(), strcpy()
- bcmp() -> (static inline) ether_cmp()
- 6 -> ETHER_ADDR_LEN
 1.36 05-Sep-2001  tsutsui Remove register prefixes.
 1.35 15-Nov-2000  thorpej branches: 1.35.4;
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.34 01-Oct-2000  thorpej Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
 1.33 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.32 20-Aug-1999  chs branches: 1.32.2;
fix typo in previous commit. fixes PR 7879.
 1.31 21-May-1999  thorpej Copy alignment fix from dev/ic/i82586.c (Um, this extra copy should die,
too, but at least it's not as bad as the podulebus ie driver).
 1.30 18-May-1999  thorpej Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
 1.29 25-Mar-1999  thorpej branches: 1.29.4;
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.28 01-Oct-1998  thorpej branches: 1.28.4;
Update for bcopy/bzero -> memcpy/memset changes.
 1.27 15-Aug-1998  mycroft Make copyright notices with my name consistent.
 1.26 05-Jul-1998  jonathan defopt NS, NSIP.
 1.25 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.24 12-Jan-1998  thorpej Update for changes to config.
 1.23 05-Nov-1997  gwr Silence collisions
 1.22 28-Oct-1997  gwr Quiet down those "interrupt stuck?" messages.
 1.21 29-Jul-1997  fair branches: 1.21.6;
%x -> 0x%x, fixes for PR#3757
 1.20 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.19 10-Mar-1997  gwr Use the macros sc_if, sc_addr to avoid lots of references to sc_arpcom.
 1.18 28-Feb-1997  gwr Get rid of some printf noise.
 1.17 13-Feb-1997  gwr Reorganize/simplify the way the memory layout is done.
Update to the latest sys/dev/isa/if_ie.c (new ieget).
 1.16 17-Dec-1996  gwr branches: 1.16.6;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.15 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.14 13-Oct-1996  christos backout previous kprintf change
 1.13 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12 09-May-1996  thorpej Fix typo, noticed by Curt Sampson <curt@portal.ca>.
 1.11 07-May-1996  thorpej Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.10 26-Mar-1996  gwr Use the traditional names (*reg.h, *var.h)
 1.9 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.8 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.7 28-Feb-1996  gwr Kill a mis-matched and unnecessary declaration.
 1.6 24-Dec-1995  mycroft The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
 1.5 11-Apr-1995  mycroft Sync with the rest of the world.
 1.4 09-Apr-1995  gwr Sync with net/if.h changes
 1.3 26-Jan-1995  gwr Updated ie driver based on i386 version 1.30
 1.2 15-Dec-1994  gwr Fixes to make "ie" work (from Chuck Silvers -- Thanks!)
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.16.6.5 13-Mar-1997  gwr Merge changes from the trunk
 1.16.6.4 10-Mar-1997  gwr Use sc_if ...
 1.16.6.3 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.16.6.2 06-Mar-1997  is Fix typo.
 1.16.6.1 06-Mar-1997  is Convert to new ARP version.
 1.21.6.2 05-Nov-1997  mellon Pull rev 1.23 up from trunk (gwr)
 1.21.6.1 29-Oct-1997  mellon Pull rev 1.22 up from trunk (gwr)
 1.28.4.1 11-Dec-1998  kenh The beginnings of interface detach support. Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.
 1.29.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.32.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.32.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.35.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.37.16.2 26-Oct-2005  riz Pull up following revision(s) (requested by tsutsui in ticket #5784):
sys/arch/sun3/dev/if_ie.c: revision 1.42
Avoid NULL pointer dereference in case of #if NBPFILTER == 0.
Closes PR port-sun3/21699.
 1.37.16.1 28-Jan-2003  jmc Pullup revisions 1.37-1.38 (requested by bouyer in ticket #1123)
bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
 1.37.6.2 05-Sep-2001  tsutsui - bcopy() -> memcpy(), strcpy()
- bcmp() -> (static inline) ether_cmp()
- 6 -> ETHER_ADDR_LEN
 1.37.6.1 05-Sep-2001  tsutsui file if_ie.c was added on branch nathanw_sa on 2001-09-05 13:55:28 +0000
 1.38.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.38.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.38.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.38.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.38.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.38.2.1 03-Aug-2004  skrll Sync with HEAD
 1.39.4.2 31-May-2005  riz Pull up revision 1.42 (requested by tsutsui in ticket #1874):
Avoid NULL pointer dereference in case of #if NBPFILTER == 0.
Closes PR port-sun3/21699.
 1.39.4.1 24-Jan-2005  he Pull up revision 1.40 (requested by thorpej in ticket #939):
When adding or deleting multicast addresses, only change
the address filter if the interface is marked RUNNING.
Fixes PR#27678.
 1.39.2.1 31-May-2005  riz Pull up revision 1.42 (requested by tsutsui in ticket #1874):
Avoid NULL pointer dereference in case of #if NBPFILTER == 0.
Closes PR port-sun3/21699.
 1.40.4.1 29-Apr-2005  kent sync with -current
 1.41.6.1 31-May-2005  snj Pull up revision 1.42 (requested by tsutsui in ticket #359):
Avoid NULL pointer dereference in case of #if NBPFILTER == 0.
Closes PR port-sun3/21699.
 1.43.2.2 27-Oct-2007  yamt sync with head.
 1.43.2.1 03-Sep-2007  yamt sync with head.
 1.44.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.46.18.2 02-Oct-2007  joerg Sync with HEAD.
 1.46.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.46.14.2 10-Sep-2007  skrll Sync with HEAD.
 1.46.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.46.10.1 03-Oct-2007  garbled Sync with HEAD
 1.46.2.1 09-Oct-2007  ad Sync with head.
 1.47.2.1 06-Nov-2007  matt sync with HEAD
 1.50.24.1 03-Jul-2008  simonb Sync with head.
 1.50.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.50.20.3 11-Aug-2010  yamt sync with head.
 1.50.20.2 11-Mar-2010  yamt sync with head
 1.50.20.1 04-May-2009  yamt sync with head.
 1.50.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.50.16.1 29-Jun-2008  mjf Sync with HEAD.
 1.51.4.2 28-Apr-2009  skrll Sync with HEAD.
 1.51.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.51.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.52.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.54.4.1 30-May-2010  rmind sync with head
 1.54.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.55.36.5 28-Aug-2017  skrll Sync with HEAD
 1.55.36.4 05-Feb-2017  skrll Sync with HEAD
 1.55.36.3 09-Jul-2016  skrll Sync with HEAD
 1.55.36.2 19-Mar-2016  skrll Sync with HEAD
 1.55.36.1 06-Jun-2015  skrll Sync with HEAD
 1.55.18.1 03-Dec-2017  jdolecek update from HEAD
 1.59.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.59.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.61.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.62.12.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.62.12.2 28-Jul-2018  pgoyette Sync with HEAD
 1.62.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.62.6.2 31-Jul-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #948):

sys/arch/sun3/dev/if_ie.c: revision 1.64

Remove bpf_tap() in iexmit() because ie_start() does bpf_mtap().
 1.62.6.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.65.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.65.2.1 10-Jun-2019  christos Sync with HEAD
 1.70.4.1 29-Feb-2020  ad Sync with head.
 1.2 26-Mar-1996  gwr Use the traditional names (*reg.h, *var.h)
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.26 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.25 28-Jun-2008  tsutsui branches: 1.25.120;
Split softc/device_t, with misc cosmetic changes.
 1.24 28-Apr-2008  martin branches: 1.24.2; 1.24.4;
Remove clause 3 and 4 from TNF licenses
 1.23 04-Mar-2007  tsutsui branches: 1.23.40; 1.23.42; 1.23.44;
Add (char *) casts on pointer arith.
 1.22 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 11-Dec-2005  christos branches: 1.21.26;
merge ktrace-lwp.
 1.20 22-Jan-2005  chs branches: 1.20.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.19 15-Jul-2003  lukem branches: 1.19.8;
__KERNEL_RCSID()
 1.18 02-Oct-2002  thorpej branches: 1.18.6;
Add trailing ; to CFATTACH_DECL.
 1.17 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 01-Oct-1998  thorpej branches: 1.15.26; 1.15.30;
Update for bcopy/bzero -> memcpy/memset changes.
 1.14 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.13 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.12 08-Dec-1997  gwr branches: 1.12.2;
The ie_reset function needs to turn off loopback mode.
(Remember the TDR complaint: short X clocks away?
that was because the chip was in looback mode! 8)
 1.11 07-Oct-1997  gwr Use sizeof(struct ieob) instead of a sun3-specific macro,
so this driver will work on the sun3x as well. (Works!)
 1.10 28-Apr-1997  gwr branches: 1.10.4;
Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.9 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.8 27-Jan-1997  gwr branches: 1.8.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.7 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.6 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.5 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 26-Mar-1996  gwr Use the traditional names (*reg.h, *var.h)
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.8.4.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.8.4.1 06-Mar-1997  is Convert to new ARP version.
 1.10.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.15.30.1 18-Oct-2002  nathanw Catch up to -current.
 1.15.26.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.18.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.20.8.1 03-Sep-2007  yamt sync with head.
 1.21.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.44.2 04-May-2009  yamt sync with head.
 1.23.44.1 16-May-2008  yamt sync with head.
 1.23.42.1 18-May-2008  yamt sync with head.
 1.23.40.2 29-Jun-2008  mjf Sync with HEAD.
 1.23.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.24.4.1 03-Jul-2008  simonb Sync with head.
 1.24.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.25.120.1 02-Aug-2025  perseant Sync with HEAD
 1.17 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.16 28-Jun-2008  tsutsui branches: 1.16.120;
Split softc/device_t, with misc cosmetic changes.
 1.15 28-Apr-2008  martin branches: 1.15.2; 1.15.4;
Remove clause 3 and 4 from TNF licenses
 1.14 04-Mar-2007  tsutsui branches: 1.14.40; 1.14.42; 1.14.44;
Add (char *) casts on pointer arith.
 1.13 11-Dec-2005  christos branches: 1.13.26;
merge ktrace-lwp.
 1.12 03-Jun-2005  tsutsui branches: 1.12.2;
Constify.
 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 01-Oct-1998  thorpej branches: 1.6.26; 1.6.30;
Update for bcopy/bzero -> memcpy/memset changes.
 1.5 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.4 08-Dec-1997  gwr Several fixes. This version actually works!
 1.3 25-Oct-1997  gwr I had the memory map wrong for the SCSI/Ethernet board.
Fixes from Michael Thompson.
 1.2 17-Oct-1997  gwr branches: 1.2.2;
Nuke same-unit hack in match.
 1.1 17-Oct-1997  gwr Add support for the Sun3/E "se" (Ethernet/SCSI) board.
Compiles, but NOT YET TESTED.
 1.2.2.2 09-Dec-1997  thorpej Sync w/ trunk: Sun3/E SCSI/Ethernet now works. (gwr)
 1.2.2.1 26-Oct-1997  mellon Pull rev 1.3 up from trunk (gwr)
 1.6.30.1 18-Oct-2002  nathanw Catch up to -current.
 1.6.26.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.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.1 03-Sep-2007  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.44.2 04-May-2009  yamt sync with head.
 1.14.44.1 16-May-2008  yamt sync with head.
 1.14.42.1 18-May-2008  yamt sync with head.
 1.14.40.2 29-Jun-2008  mjf Sync with HEAD.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.4.1 03-Jul-2008  simonb Sync with head.
 1.15.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.16.120.1 02-Aug-2025  perseant Sync with HEAD
 1.8 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.7 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.6 13-Feb-1995  gwr DVMA slave mapping support.
 1.5 26-Jan-1995  gwr Updated ie driver based on i386 version 1.30
 1.4 11-Jan-1995  gwr Enable VME configuration.
 1.3 15-Dec-1994  gwr Fixes to make "ie" work (from Chuck Silvers -- Thanks!)
 1.2 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.7 26-Mar-1996  gwr Use the traditional names (*reg.h, *var.h)
 1.6 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.5 13-Feb-1995  gwr DVMA slave mapping support.
 1.4 26-Jan-1995  gwr Updated ie driver based on i386 version 1.30
 1.3 24-Jan-1995  gwr Increase TX buf size to fix overrun bug.
 1.2 15-Dec-1994  gwr Fixes to make "ie" work (from Chuck Silvers -- Thanks!)
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.24 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.23 28-Jun-2008  tsutsui branches: 1.23.120;
Split softc/device_t, with misc cosmetic changes.
 1.22 28-Apr-2008  martin branches: 1.22.2; 1.22.4;
Remove clause 3 and 4 from TNF licenses
 1.21 04-Mar-2007  tsutsui branches: 1.21.40; 1.21.42; 1.21.44;
Add (char *) casts on pointer arith.
 1.20 11-Dec-2005  christos branches: 1.20.26;
merge ktrace-lwp.
 1.19 03-Jun-2005  tsutsui branches: 1.19.2;
Constify.
 1.18 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.17 15-Jul-2003  lukem branches: 1.17.8;
__KERNEL_RCSID()
 1.16 02-Oct-2002  thorpej branches: 1.16.6;
Add trailing ; to CFATTACH_DECL.
 1.15 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 01-Oct-1998  thorpej branches: 1.13.26; 1.13.30;
Update for bcopy/bzero -> memcpy/memset changes.
 1.12 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.11 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.10 09-Dec-1997  gwr branches: 1.10.4;
The ie_reset function needs to turn off loopback mode.
(Remember the TDR complaint: short X clocks away?
that was because the chip was in looback mode! 8)
 1.9 17-Oct-1997  gwr Clean up the match function.
 1.8 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.7 27-Jan-1997  gwr branches: 1.7.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.5 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 26-Mar-1996  gwr Use the traditional names (*reg.h, *var.h)
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.7.4.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.7.4.1 06-Mar-1997  is Convert to new ARP version.
 1.10.4.1 27-Jan-1998  gwr s/vmes/vme/g
 1.13.30.1 18-Oct-2002  nathanw Catch up to -current.
 1.13.26.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.16.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.16.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.6.1 03-Aug-2004  skrll Sync with HEAD
 1.17.8.1 29-Apr-2005  kent sync with -current
 1.19.2.1 03-Sep-2007  yamt sync with head.
 1.20.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.21.44.2 04-May-2009  yamt sync with head.
 1.21.44.1 16-May-2008  yamt sync with head.
 1.21.42.1 18-May-2008  yamt sync with head.
 1.21.40.2 29-Jun-2008  mjf Sync with HEAD.
 1.21.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.4.1 03-Jul-2008  simonb Sync with head.
 1.22.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.23.120.1 02-Aug-2025  perseant Sync with HEAD
 1.11 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.10 09-Dec-1997  gwr branches: 1.10.2;
The ie_reset function needs to turn off loopback mode.
(Remember the TDR complaint: short X clocks away?
that was because the chip was in looback mode! 8)
 1.9 17-Oct-1997  gwr Clean up the match function.
 1.8 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.7 27-Jan-1997  gwr branches: 1.7.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.5 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 26-Mar-1996  gwr Use the traditional names (*reg.h, *var.h)
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.7.4.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.7.4.1 06-Mar-1997  is Convert to new ARP version.
 1.10.2.1 25-Jan-1998  gwr Now if_ie_vme.c
 1.2 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.17 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.16 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.15 28-Jun-2008  tsutsui branches: 1.15.84;
Split softc/device_t, with misc cosmetic changes.
 1.14 04-Mar-2007  christos branches: 1.14.40; 1.14.44; 1.14.46; 1.14.48;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 11-Dec-2005  christos branches: 1.13.26;
merge ktrace-lwp.
 1.12 22-Jan-2005  chs branches: 1.12.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 13-Mar-2000  soren branches: 1.11.28; 1.11.36;
Fix doubled 'the's in comments.
 1.10 01-Oct-1998  thorpej branches: 1.10.12;
Update for bcopy/bzero -> memcpy/memset changes.
 1.9 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.8 13-Feb-1997  gwr Tune MXFRAMES and MXFRAMES down a little.
Reorganize the softc for convenience in ddb.
 1.7 17-Dec-1996  gwr branches: 1.7.6;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.6 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
 1.5 13-Feb-1995  gwr DVMA slave mapping support.
 1.4 26-Jan-1995  gwr Updated ie driver based on i386 version 1.30
 1.3 24-Jan-1995  gwr Increase TX buf size to fix overrun bug.
 1.2 15-Dec-1994  gwr Fixes to make "ie" work (from Chuck Silvers -- Thanks!)
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.7.6.2 13-Mar-1997  gwr Merge changes from the trunk
 1.7.6.1 06-Mar-1997  is Convert to new ARP version.
 1.10.12.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.36.1 29-Apr-2005  kent sync with -current
 1.11.28.1 24-Jan-2005  skrll Sync with HEAD.
 1.12.8.1 03-Sep-2007  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.48.1 03-Jul-2008  simonb Sync with head.
 1.14.46.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.14.44.1 04-May-2009  yamt sync with head.
 1.14.40.1 29-Jun-2008  mjf Sync with HEAD.
 1.15.84.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.53 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.52 19-Jan-2010  pooka branches: 1.52.100;
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.51 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.50 04-Apr-2008  tsutsui branches: 1.50.2; 1.50.4;
Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.49 24-Dec-2005  perry branches: 1.49.74;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.48 11-Dec-2005  christos merge ktrace-lwp.
 1.47 22-Jan-2005  chs branches: 1.47.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.46 15-Jul-2003  lukem branches: 1.46.8;
__KERNEL_RCSID()
 1.45 02-Oct-2002  thorpej branches: 1.45.6;
Add trailing ; to CFATTACH_DECL.
 1.44 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.43 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.42 30-May-2001  mrg branches: 1.42.2; 1.42.8;
use _KERNEL_OPT
 1.41 21-Jul-1998  drochner branches: 1.41.26;
adapt to LANCE driver split
 1.40 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.39 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.38 28-Apr-1997  gwr branches: 1.38.10;
Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.37 17-Mar-1997  thorpej #include <net/if_media.h>
 1.36 15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

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

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.35 27-Jan-1997  gwr branches: 1.35.4;
Map regs using sizeof(struct lereg1) instead of OBIO_AMD_ETHER_SIZE.
Also fix copyright (s/REGENTS/FOUNDATION/)
 1.34 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.33 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.32 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.31 13-Oct-1996  christos backout previous kprintf change
 1.30 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.29 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.28 22-Apr-1996  christos Add a hardware dependent initialization function lehwinit()
 1.27 18-Apr-1996  cgd change LANCE copy & zero functions' names to start with amd7990_, and
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
 1.26 26-Mar-1996  gwr Adapt to redesigned autoconfig scheme for obio, and
define a fast ETHER_CMP routine for dev/ic/am7990.c
 1.25 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.24 10-Dec-1995  mycroft Use the MI LANCE code.
 1.23 27-Oct-1995  gwr Work around the LANCE Rev. C bug in a way that does not cause error
messages when BPF puts the interface in to promiscuous mode.
 1.22 27-Jun-1995  gwr branches: 1.22.2;
Catch up with net/if.h changes
 1.21 24-May-1995  gwr Turn off IFF_MULTICAST for now...
 1.20 26-Apr-1995  gwr Add work-around for LANCE Rev. C bug.
Needs to be fixed for multicasts...
 1.19 16-Apr-1995  gwr Make less noise about CRC/Framing errors (Sun3/50 gets lots of them).
 1.18 13-Apr-1995  gwr arpwhohas -> arp_ifinit etc.
 1.17 09-Apr-1995  gwr Sync with net/if.h changes
 1.16 03-Jan-1995  gwr New, improved "le" driver from Charles Hannum and Paul Richards.
 1.15 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.14 23-Nov-1994  gwr New cd_match prototype.
 1.13 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.12 26-Oct-1994  cgd new RCS ID format.
 1.11 11-Jul-1994  gwr branches: 1.11.2;
Add Theo's fix for "must be one" bits in tdr2.
 1.10 28-May-1994  gwr branches: 1.10.2;
New version (from Theo (from 4.4)) - supports multicast.
 1.9 16-May-1994  gwr Add call to ether_ifattach() for Lite network code.
 1.8 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.7 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.6 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.5 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.2 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.10.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.11.2.2 11-Jul-1994  gwr Add Theo's fix for "must be one" bits in tdr2.
 1.11.2.1 11-Jul-1994  gwr file if_le.c was added on branch netbsd-1-0 on 1994-07-11 03:31:18 +0000
 1.22.2.1 27-Oct-1995  gwr Update from HEAD
 1.35.4.2 10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.35.4.1 06-Mar-1997  is Convert to new ARP version.
 1.38.10.1 27-Jan-1998  gwr Add Sun3X support (needs differnt value of sc->sc_conf3)
 1.41.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.42.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.42.8.1 30-May-2001  nathanw file if_le.c was added on branch nathanw_sa on 2002-10-18 02:40:20 +0000
 1.42.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.45.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.45.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.45.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.45.6.1 03-Aug-2004  skrll Sync with HEAD
 1.46.8.1 29-Apr-2005  kent sync with -current
 1.47.8.1 21-Jun-2006  yamt sync with head.
 1.49.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.50.4.2 11-Mar-2010  yamt sync with head
 1.50.4.1 16-May-2008  yamt sync with head.
 1.50.2.1 18-May-2008  yamt sync with head.
 1.52.100.1 02-Aug-2025  perseant Sync with HEAD
 1.7 26-Mar-1996  gwr replaced by if_levar.h
 1.6 03-Jan-1995  gwr New, improved "le" driver from Charles Hannum and Paul Richards.
 1.5 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 28-May-1994  gwr New version (from Theo (from 4.4)) - supports multicast.
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.13 26-Mar-1996  gwr obsolete
 1.12 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.11 03-Jan-1995  gwr New, improved "le" driver from Charles Hannum and Paul Richards.
 1.10 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.9 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 20-Sep-1994  gwr branches: 1.6.2;
Call obio_alloc with just two args (mappings always writable).
 1.5 28-May-1994  gwr New version (from Theo (from 4.4)) - supports multicast.
 1.4 16-Mar-1994  glass do nothing obio_probe_byte()
 1.3 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.6.2.2 20-Sep-1994  gwr Call obio_alloc with just two args (mappings always writable).
 1.6.2.1 20-Sep-1994  gwr file if_le_subr.c was added on branch netbsd-1-0 on 1994-09-20 16:21:45 +0000
 1.8 26-Mar-1996  gwr obsolete
 1.7 03-Jan-1995  gwr New, improved "le" driver from Charles Hannum and Paul Richards.
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 28-May-1994  gwr New version (from Theo (from 4.4)) - supports multicast.
 1.2 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.13 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.12 26-Mar-1996  gwr Adapt to redesigned autoconfig scheme for obio, and
define a fast ETHER_CMP routine for dev/ic/am7990.c
 1.11 10-Dec-1995  mycroft Use the MI LANCE code.
 1.10 24-Jan-1995  gwr Increase TX buf size to fix overrun bug.
 1.9 03-Jan-1995  gwr New, improved "le" driver from Charles Hannum and Paul Richards.
 1.8 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.7 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 11-Jul-1994  gwr branches: 1.5.2;
Add Theo's fix for "must be one" bits in tdr2.
 1.4 28-May-1994  gwr branches: 1.4.2;
New version (from Theo (from 4.4)) - supports multicast.
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 24-Aug-1993  glass snapshot. starts nfsmountroot but doesn't seem to emit any packets
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.5.2.2 11-Jul-1994  gwr Add Theo's fix for "must be one" bits in tdr2.
 1.5.2.1 11-Jul-1994  gwr file if_lereg.h was added on branch netbsd-1-0 on 1994-07-11 03:31:21 +0000
 1.3 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.1 10-Dec-1995  mycroft Use the MI LANCE code.
 1.12 24-Jan-1996  gwr Update for the new z8530 driver
 1.11 08-Oct-1995  gwr Temporary hack to restrict open to root or the
same UID as the session attached to /dev/kd
 1.10 24-May-1995  gwr Sunc with sparc version (adds key repeat capability)
 1.9 24-Mar-1995  gwr Cleanup, and deal with kd != console
 1.8 17-Dec-1994  gwr Fix kd (keyboard/display) driver kdcngetc/kdcnputc functions.
 1.7 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.6 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 03-Jun-1994  gwr Fix initialization of keyboard port (works now).
 1.2 06-May-1994  gwr Tracking 4.4 integration
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.4 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.4 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.61 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.60 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.59 25-Jul-2014  dholland branches: 1.59.64;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.58 16-Mar-2014  dholland branches: 1.58.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.57 27-Oct-2012  chs branches: 1.57.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.56 24-Apr-2011  rmind branches: 1.56.4; 1.56.14;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.55 28-Apr-2008  martin branches: 1.55.22; 1.55.28;
Remove clause 3 and 4 from TNF licenses
 1.54 29-Mar-2008  tsutsui branches: 1.54.2; 1.54.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.53 19-Nov-2007  ad branches: 1.53.14;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.52 28-Oct-2007  rjs branches: 1.52.2;
Move prototype for kd_later() before first use.
 1.51 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.50 04-Mar-2007  christos branches: 1.50.2; 1.50.18; 1.50.20; 1.50.24;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.49 16-Feb-2007  ad branches: 1.49.2;
More spllowersoftclock() fallout.
 1.48 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.47 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.46 23-Jul-2006  ad branches: 1.46.4; 1.46.6;
Use the LWP cached credentials where sane.
 1.45 14-May-2006  elad integrate kauth.
 1.44 11-Dec-2005  christos branches: 1.44.4; 1.44.6; 1.44.8; 1.44.10; 1.44.12;
merge ktrace-lwp.
 1.43 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.42 22-Jan-2005  chs branches: 1.42.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.41 15-Jul-2003  lukem branches: 1.41.8;
__KERNEL_RCSID()
 1.40 23-Oct-2002  jdolecek branches: 1.40.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.39 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.38 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.37 17-Mar-2002  atatat branches: 1.37.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.36 05-Sep-2001  tsutsui branches: 1.36.2; 1.36.6;
Remove register prefixes.
 1.35 02-May-2001  scw branches: 1.35.2;
Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.34 02-Nov-2000  eeh branches: 1.34.2;
Adapt to new line discipline scheme.
 1.33 21-May-2000  eeh Need to provide a consdev to the cons_attach_input call now.
 1.32 19-May-2000  eeh Fix the sparc64 console.

Unlike the other Sun machines, UltraSPARCs can have consoles run on different
chips than zs, so we need to support them. So, here we go:

Add a new PROM console driver with a major number and everything.
This is the default driver if nothing else attaches. It does not
use the keyboard driver since the PROM translates keystrokes itself.
(Unfortunately it also swallows L1-A).

Have the keyboard driver take over the console when it attaches on a
serial port. When a serial port detects a keyboard and attaches the
keyboard driver, it needs to provide a set of consdev vectors. They
keyboard driver will use those to send I/O to the keyboard and mouse.
 1.31 31-Mar-2000  tsutsui Remove declaration of kd_rom_intr(). It is not needed on sun3.
 1.30 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.29 19-Mar-2000  pk Minimal changes to accomodate the console input channel attachment
changes in the keyboard driver (see /sys/dev/sun/kbd*)
 1.28 06-Mar-2000  thorpej - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
 1.27 05-Aug-1999  thorpej branches: 1.27.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.26 26-Feb-1998  gwr Fix build with NFB=0
 1.25 10-Feb-1997  gwr Make some more things static, and cosmetic stuff.
 1.24 10-Feb-1997  gwr Forgot to initialize cn->cn_dev, cn->cn_pri
 1.23 27-Jan-1997  gwr branches: 1.23.2;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.22 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.21 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.20 13-Oct-1996  christos backout previous kprintf change
 1.19 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.18 02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.17 15-Jun-1996  gwr branches: 1.17.2;
merge 1.2 changes
 1.16 26-Apr-1996  gwr Remove some hacks that "went around" the linesw[] operations.
 1.15 07-Apr-1996  gwr minor cleanup
 1.14 24-Jan-1996  gwr Update for the new z8530 driver
 1.13 26-Apr-1995  gwr Add xxtty()
 1.12 10-Apr-1995  mycroft Add a dummy kdstop().
 1.11 28-Mar-1995  gwr Avoid passing non-ASCII chars to the PROM.
Call PROM at splsoftclock to avoid missing interrupts.
 1.10 24-Mar-1995  gwr Cleanup, and deal with kd != console
 1.9 10-Mar-1995  gwr Add kdcnpollc so it can call fb_unblank
 1.8 17-Dec-1994  gwr Fix kd (keyboard/display) driver kdcngetc/kdcnputc functions.
 1.7 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.6 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 03-Jun-1994  gwr Fix initialization of keyboard port (works now).
 1.2 05-May-1994  gwr cosmetic
 1.1 04-May-1994  gwr This provides a tty device for dev/cons.c to point at.
 1.17.2.2 15-Jun-1996  gwr merge 1.2 changes
 1.17.2.1 15-Jun-1996  gwr file kd.c was added on branch netbsd-1-2 on 1996-06-15 14:58:03 +0000
 1.23.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.27.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.27.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.34.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.35.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.35.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.35.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.36.6.5 11-Nov-2002  nathanw Catch up to -current
 1.36.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.36.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.36.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.36.6.1 05-Sep-2001  nathanw file kd.c was added on branch nathanw_sa on 2002-04-01 07:43:23 +0000
 1.36.2.3 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.36.2.2 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.36.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.37.4.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.40.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.40.6.5 04-Feb-2005  skrll Adapt to branch.
 1.40.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.40.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.40.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.40.6.1 03-Aug-2004  skrll Sync with HEAD
 1.41.8.1 29-Apr-2005  kent sync with -current
 1.42.8.7 07-Dec-2007  yamt sync with head
 1.42.8.6 15-Nov-2007  yamt sync with head.
 1.42.8.5 27-Oct-2007  yamt sync with head.
 1.42.8.4 03-Sep-2007  yamt sync with head.
 1.42.8.3 26-Feb-2007  yamt sync with head.
 1.42.8.2 30-Dec-2006  yamt sync with head.
 1.42.8.1 21-Jun-2006  yamt sync with head.
 1.44.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.44.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.44.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.44.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.44.8.2 11-Aug-2006  yamt sync with head
 1.44.8.1 24-May-2006  yamt sync with head.
 1.44.6.1 01-Jun-2006  kardel Sync with head.
 1.44.4.1 09-Sep-2006  rpaulo sync with head
 1.46.6.1 22-Oct-2006  yamt sync with head
 1.46.4.1 18-Nov-2006  ad Sync with head.
 1.49.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.50.24.3 21-Nov-2007  bouyer Sync with HEAD
 1.50.24.2 13-Nov-2007  bouyer Sync with HEAD
 1.50.24.1 25-Oct-2007  bouyer Sync with HEAD.
 1.50.20.2 09-Jan-2008  matt sync with HEAD
 1.50.20.1 06-Nov-2007  matt sync with HEAD
 1.50.18.3 21-Nov-2007  joerg Sync with HEAD.
 1.50.18.2 28-Oct-2007  joerg Sync with HEAD.
 1.50.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.50.2.2 03-Dec-2007  ad Sync with HEAD.
 1.50.2.1 23-Oct-2007  ad Sync with head.
 1.52.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.53.14.2 02-Jun-2008  mjf Sync with HEAD.
 1.53.14.1 03-Apr-2008  mjf Sync with HEAD.
 1.54.4.1 16-May-2008  yamt sync with head.
 1.54.2.1 18-May-2008  yamt sync with head.
 1.55.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.55.22.1 31-May-2011  rmind sync with head
 1.56.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.56.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.56.4.1 30-Oct-2012  yamt sync with head
 1.57.2.1 18-May-2014  rmind sync with head
 1.58.2.1 10-Aug-2014  tls Rebase.
 1.59.64.1 02-Aug-2025  perseant Sync with HEAD
 1.13 03-Nov-2000  tsutsui Switch to MI md_root.c. Tested on RAMDISK3X kernel.
 1.12 10-Jun-2000  tsutsui Fix printf message on attachment.
 1.11 08-May-1999  gwr branches: 1.11.2; 1.11.10;
Fix warning
 1.10 17-Mar-1999  sommerfe branches: 1.10.2; 1.10.4;
defopt MINIROOTSIZE
 1.9 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.8 28-Dec-1996  pk rename: ramdisk => md
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 13-Oct-1996  christos backout previous kprintf change
 1.5 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.4 26-Mar-1996  gwr No longer need rd_match_hook.
 1.3 07-Mar-1996  leo Allow for a machine dependent match function - rd_match_hook()
 1.2 17-Nov-1995  gwr Add copyright
 1.1 08-Oct-1995  gwr branches: 1.1.2;
Machine-dependent part of the new RAM-disk driver.
This module lets one build a stand-alone kernel.
 1.1.2.1 18-Nov-1995  gwr Sync with HEAD: add copyright
 1.10.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.10.2.1 29-Feb-2000  he Apply patch (requested by toddpw):
Fix a compile-time error.
 1.11.10.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.11.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.23 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.22 16-Dec-2008  christos branches: 1.22.102;
replace bitmask_snprintf(9) with snprintb(3)
 1.21 28-Jun-2008  tsutsui branches: 1.21.4;
Split softc/device_t, with misc cosmetic changes.
 1.20 11-Dec-2005  christos branches: 1.20.74; 1.20.78; 1.20.80; 1.20.82;
merge ktrace-lwp.
 1.19 19-Jun-2005  thorpej Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.18 03-Jun-2005  tsutsui Constify.
 1.17 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.16 07-Aug-2003  agc branches: 1.16.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.15 15-Jul-2003  lukem __KERNEL_RCSID()
 1.14 02-Oct-2002  thorpej branches: 1.14.6;
Add trailing ; to CFATTACH_DECL.
 1.13 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 27-May-2001  chs branches: 1.11.2; 1.11.8;
don't abuse cf_unit.
 1.10 05-Feb-1998  gwr branches: 1.10.26;
Merge arch/sun3x into arch/sun3
 1.9 12-Jan-1998  thorpej branches: 1.9.2;
Update for changes to config.
 1.8 28-Apr-1997  gwr Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.7 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.6 13-Nov-1996  thorpej Use bitmask_snprintf().
 1.5 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 07-Apr-1996  gwr minor cleanup
 1.1 26-Mar-1996  gwr New driver for handling the memory error interrupt.
 1.9.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.10.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.11.8.1 27-May-2001  nathanw file memerr.c was added on branch nathanw_sa on 2002-10-18 02:40:20 +0000
 1.11.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.14.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.14.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1 03-Aug-2004  skrll Sync with HEAD
 1.16.8.1 29-Apr-2005  kent sync with -current
 1.20.82.1 03-Jul-2008  simonb Sync with head.
 1.20.80.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.78.1 04-May-2009  yamt sync with head.
 1.20.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.20.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.21.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.22.102.1 02-Aug-2025  perseant Sync with HEAD
 1.4 08-Feb-2018  dholland Typos.
 1.3 11-Dec-2005  christos 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 26-Mar-1996  gwr branches: 1.1.66;
New driver for handling the memory error interrupt.
 1.1.66.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.66.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.66.1 03-Aug-2004  skrll Sync with HEAD
 1.7 24-Jan-1996  gwr Update for the new z8530 driver
 1.6 08-Oct-1995  gwr Temporary hack to restrict open to root or the
same UID as the session attached to /dev/kd
 1.5 10-Mar-1995  gwr Set speed on open (from Chuck Silvers).
 1.4 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.2 13-Feb-1996  gwr now in sys/dev
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.2 29-Oct-1995  gwr New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.1 29-Oct-1995  gwr file ncr5380.doc was added on branch netbsd-1-1 on 1995-10-29 21:19:08 +0000
 1.3 13-Feb-1996  gwr now in sys/dev
 1.2 17-Nov-1995  gwr Latest, greatest version of the new NCR driver.
DMA works! Interrupts work! Disconnect/reselect works!
To be paranoid, leave that all disabled for now...
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.2 18-Nov-1995  gwr Sync with HEAD: (latest, greatest NCR driver...)
 1.1.2.1 29-Oct-1995  gwr file ncr5380reg.h was added on branch netbsd-1-1 on 1995-11-18 07:08:23 +0000
 1.3 13-Feb-1996  gwr now in sys/dev
 1.2 17-Nov-1995  gwr Latest, greatest version of the new NCR driver.
DMA works! Interrupts work! Disconnect/reselect works!
To be paranoid, leave that all disabled for now...
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.2 18-Nov-1995  gwr Sync with HEAD: (latest, greatest NCR driver...)
 1.1.2.1 29-Oct-1995  gwr file ncr5380sbc.c was added on branch netbsd-1-1 on 1995-11-18 07:08:34 +0000
 1.3 13-Feb-1996  gwr now in sys/dev
 1.2 17-Nov-1995  gwr Latest, greatest version of the new NCR driver.
DMA works! Interrupts work! Disconnect/reselect works!
To be paranoid, leave that all disabled for now...
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.2 18-Nov-1995  gwr Sync with HEAD: (latest, greatest NCR driver...)
 1.1.2.1 29-Oct-1995  gwr file ncr5380var.h was added on branch netbsd-1-1 on 1995-11-18 07:08:41 +0000
 1.8 26-Mar-1996  gwr This was carved up and reincarnated as si*
 1.7 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 22-Feb-1996  gwr Correct the DMA transfer count when the target disconnects before
the whole transfer is completed. (Affects VME writes)
Reselect now works on the VME si board!
 1.5 16-Feb-1996  gwr Have <sys/param.h> so no need for <sys/types.h>
 1.4 12-Feb-1996  gwr Avoid 3/50 H/W bug (I hope)
 1.3 01-Jan-1996  thorpej It's safe to use <dev/ic/ncr5380*.h> now.
 1.2 17-Nov-1995  gwr Latest, greatest version of the new NCR driver.
DMA works! Interrupts work! Disconnect/reselect works!
To be paranoid, leave that all disabled for now...
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.3 12-Feb-1996  gwr Avoid 3/50 H/W bug (I hope)
 1.1.2.2 18-Nov-1995  gwr Sync with HEAD: (latest, greatest NCR driver...)
 1.1.2.1 29-Oct-1995  gwr file ncr_si.c was added on branch netbsd-1-1 on 1995-11-18 07:08:48 +0000
 1.3 26-Mar-1996  gwr This was carved up and reincarnated as si*
 1.2 17-Nov-1995  gwr Latest, greatest version of the new NCR driver.
DMA works! Interrupts work! Disconnect/reselect works!
To be paranoid, leave that all disabled for now...
 1.1 29-Oct-1995  gwr branches: 1.1.2;
New SCSI driver for the NCR5380, by David Jones.
Does DMA with interrupts. Much faster than our old
driver which did only PIO transfers. (Thanks David!)
Could be used on the amiga, and probably others...
 1.1.2.2 18-Nov-1995  gwr Sync with HEAD: (latest, greatest NCR driver...)
 1.1.2.1 29-Oct-1995  gwr file ncr_sireg.h was added on branch netbsd-1-1 on 1995-11-18 07:08:55 +0000
 1.12 14-Dec-1996  gwr No longer used.
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.7 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 06-May-1994  gwr Tracking 4.4 integration
 1.2 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.34 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.33 12-Jan-1998  thorpej branches: 1.33.2;
Update for changes to config.
 1.32 02-Dec-1997  gwr Kill some noise from -DDEBUG
 1.31 04-Oct-1997  gwr Move the call to cninit() up a level (easier to find).
 1.30 28-Apr-1997  gwr branches: 1.30.4;
Fix a bug where OBIO locators were not presented to the children.
Rename obio_alloc to obio_mapin; add comments, etc. (like sun3x)
 1.29 27-Jan-1997  gwr Nuke sunmon.h, add machdep.h
 1.28 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic(), etc.
 1.27 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.26 18-Jan-1997  gwr Use the same names (OBIO_ZS_*) as the sun3x port so we can share zs.
 1.25 17-Dec-1996  gwr Add a diagnostic to panic when obio config data has a
default address, which is no longer supported on obio.
 1.24 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.23 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.22 30-Oct-1996  gwr Add a "submatch" function to the obio bus driver so the children
of this driver can get rid of the cruft in their match functions.
 1.21 13-Oct-1996  christos backout previous kprintf change
 1.20 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.19 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.18 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.17 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.16 13-Feb-1995  gwr DVMA slave mapping support.
 1.15 11-Jan-1995  gwr Cleanup
 1.14 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.13 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.12 26-Oct-1994  cgd new RCS ID format.
 1.11 20-Sep-1994  gwr branches: 1.11.2;
Add obio_find_mapping() for use by devices that need mappings before
autoconfiguration is done. It re-uses the PROM's mappings now.
 1.10 06-May-1994  gwr Tracking 4.4 integration
 1.9 05-May-1994  gwr cosmetic
 1.8 04-May-1994  gwr Add zs0_va, zs1_va
 1.7 16-Mar-1994  glass do nothing obio_probe_byte()
 1.6 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.5 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 08-Aug-1993  glass lots of changes, too many printfs
 1.11.2.2 20-Sep-1994  gwr Add obio_find_mapping() for use by devices that need mappings before
autoconfiguration is done. It re-uses the PROM's mappings now.
 1.11.2.1 20-Sep-1994  gwr file obio.c was added on branch netbsd-1-0 on 1994-09-20 16:24:46 +0000
 1.30.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.33.2.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.15 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.14 12-Jan-1998  thorpej branches: 1.14.2;
Update for changes to config.
 1.13 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.12 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.7 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 06-May-1994  gwr Tracking 4.4 integration
 1.2 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.14.2.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 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 10-Dec-2003  agc Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.3 08-Feb-1998  gwr branches: 1.3.48;
cosmetic
 1.2 05-Oct-1997  thorpej Copyright assigned to The NetBSD Foundation.
 1.1 09-Apr-1997  jeremy branches: 1.1.4;
Constants for the p4 register.
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.48.1 03-Aug-2004  skrll Sync with HEAD
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.16 26-Mar-1996  gwr No longer used.
 1.15 10-Apr-1995  mycroft Add promstop(), adjust return types, make sure ttselect() doesn't panic, and
obey standard style conventions.
 1.14 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 05-May-1994  gwr changes to use generic dev/cons.c
 1.11 17-Apr-1994  glass compiles again. also cleanup of development printfs. and trap stuff
 1.10 06-Mar-1994  glass change receive freq
 1.9 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.8 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.7 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.6 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 08-Aug-1993  glass stuff to make them compile properly
 1.3 05-Aug-1993  glass gets to consinit() and blows up
 1.2 27-Jun-1993  glass this mallocing 'struct tty' stuff is bogus as the vm system isn't
up and running yet when consoles are first used. squish.
 1.1 27-Jun-1993  glass theoretically (uncompiled), both a prom tty driver and prom as console
support
 1.8 28-Dec-1996  pk rename: ramdisk => md
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 13-Oct-1996  christos backout previous kprintf change
 1.5 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.4 26-Mar-1996  gwr No longer need rd_match_hook.
 1.3 07-Mar-1996  leo Allow for a machine dependent match function - rd_match_hook()
 1.2 17-Nov-1995  gwr Add copyright
 1.1 08-Oct-1995  gwr branches: 1.1.2;
Machine-dependent part of the new RAM-disk driver.
This module lets one build a stand-alone kernel.
 1.1.2.1 18-Nov-1995  gwr Sync with HEAD: add copyright
 1.5 13-Feb-1996  gwr no longer useful
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.5 13-Feb-1996  gwr no longer useful
 1.4 01-Jun-1995  gwr Better reset code, and reset the chip when it goes comatose.
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.3 13-Feb-1996  gwr no longer useful
 1.2 01-Jun-1995  gwr Better reset code, and reset the chip when it goes comatose.
 1.1 24-Jan-1995  gwr Now works on VME as well (or as poorly) as on OBIO.
 1.21 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.20 20-Dec-2023  thorpej branches: 1.20.2;
Remove unnecessary <sys/malloc.h>.
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 28-Jun-2008  tsutsui branches: 1.17.98;
Split softc/device_t, 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 04-Mar-2007  christos branches: 1.15.40; 1.15.42; 1.15.44;
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 15-Jul-2003  lukem branches: 1.12.8;
__KERNEL_RCSID()
 1.11 01-Jan-2003  thorpej branches: 1.11.2;
Use aprint_normal() for cfprint routines.
 1.10 26-Oct-2002  jdolecek g/c local offsetof(), it's defined in libkern.h
 1.9 02-Oct-2002  thorpej 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 29-Jun-2000  mrg branches: 1.6.4; 1.6.8;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.5 09-Apr-1999  gwr branches: 1.5.2; 1.5.8;
Better implementation of driver "match" function,
and warning/error cleanup.
 1.4 12-Jan-1998  thorpej Update for changes to config.
 1.3 08-Dec-1997  gwr Fix missing newline in attach
 1.2 25-Oct-1997  gwr I had the memory map wrong for the SCSI/Ethernet board.
Fixes from Michael Thompson.
 1.1 17-Oct-1997  gwr branches: 1.1.2;
Add support for the Sun3/E "se" (Ethernet/SCSI) board.
Compiles, but NOT YET TESTED.
 1.1.2.2 09-Dec-1997  thorpej Sync w/ trunk: Sun3/E SCSI/Ethernet now works. (gwr)
 1.1.2.1 26-Oct-1997  mellon Pull rev 1.2 up from trunk (gwr)
 1.5.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.2 09-Apr-1999  gwr Better implementation of driver "match" function,
and warning/error cleanup.
 1.5.2.1 09-Apr-1999  gwr file sebuf.c was added on branch netbsd-1-4 on 1999-04-09 04:26:28 +0000
 1.6.8.3 03-Jan-2003  thorpej Sync with HEAD.
 1.6.8.2 11-Nov-2002  nathanw Catch up to -current
 1.6.8.1 18-Oct-2002  nathanw Catch up to -current.
 1.6.4.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.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.44.2 04-May-2009  yamt sync with head.
 1.15.44.1 16-May-2008  yamt sync with head.
 1.15.42.1 18-May-2008  yamt sync with head.
 1.15.40.2 29-Jun-2008  mjf Sync with HEAD.
 1.15.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 03-Jul-2008  simonb Sync with head.
 1.16.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.98.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.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.20.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 03-May-2003  wiz branches: 1.5.104; 1.5.106; 1.5.108;
DMA, not dma nor Dma.
 1.4 08-Mar-1998  gwr Fix comments
 1.3 08-Dec-1997  gwr Define the interrupt vector registers as 16-bit fields as
shown in the documentation. (Thanks to Michael Thompson)
 1.2 25-Oct-1997  gwr I had the memory map wrong for the SCSI/Ethernet board.
Fixes from Michael Thompson.
 1.1 17-Oct-1997  gwr branches: 1.1.2;
Add support for the Sun3/E "se" (Ethernet/SCSI) board.
Compiles, but NOT YET TESTED.
 1.1.2.2 09-Dec-1997  thorpej Sync w/ trunk: Sun3/E SCSI/Ethernet now works. (gwr)
 1.1.2.1 26-Oct-1997  mellon Pull rev 1.2 up from trunk (gwr)
 1.5.108.1 16-May-2008  yamt sync with head.
 1.5.106.1 18-May-2008  yamt sync with head.
 1.5.104.1 02-Jun-2008  mjf 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 03-Jun-2005  tsutsui Constify.
 1.1 17-Oct-1997  gwr branches: 1.1.52;
Add support for the Sun3/E "se" (Ethernet/SCSI) board.
Compiles, but NOT YET TESTED.
 1.1.52.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.65 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.64 21-Nov-2020  thorpej branches: 1.64.24;
malloc(9) -> kmem(9)
 1.63 21-Nov-2009  rmind branches: 1.63.76;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.62 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.61 04-Apr-2008  tsutsui branches: 1.61.2; 1.61.4;
Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes.
 1.60 04-Feb-2007  tsutsui branches: 1.60.44;
Remove unused dh_addr member from struct si_dma_handle.
 1.59 04-Feb-2007  tsutsui Remove leftover debug stuff which could break si_obio DMA.
 1.58 03-Feb-2007  tsutsui Make si at obio and si at vme on sun3 use bus_dma(9) for data xfer.

XXX1: Only si at vme on TME is tested.
XXX2: No info about DMA on si at sebuf. (bounce buffer required?)
 1.57 11-Dec-2005  christos branches: 1.57.20;
merge ktrace-lwp.
 1.56 22-Jan-2005  chs branches: 1.56.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.55 13-Dec-2004  chs branches: 1.55.2;
adjust for b_bcount changing from long to int.
 1.54 15-Jul-2003  lukem __KERNEL_RCSID()
 1.53 03-May-2003  wiz branches: 1.53.2;
DMA, not dma nor Dma.
 1.52 29-Dec-2002  kristerw Do not try to return a value from void functions.
 1.51 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.50 25-Apr-2001  bouyer branches: 1.50.2; 1.50.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.49 01-Apr-2000  tsutsui branches: 1.49.6;
Fix typo. (s/sc_adapter/sc_link/)
 1.48 25-Mar-2000  tsutsui Add a "sc_rev" member to ncr5380_softc and handle CXD1180 quirk
in MI ncr5380sbc.
 1.47 18-Mar-2000  mycroft Add a ncr5380_attach() routine which does part of the initialization, attaches
the scsibus, and does the addref/delref dance.
 1.46 22-Nov-1999  jdolecek Debugger()/cpu_Debugger() is always available and always defined/prototyped
in <sys/systm.h> for sun3/sun3x, even in non-DDB case
 1.45 03-Nov-1999  jdolecek adapt to latest scsipi changes
XXX this is not actually tested, but should be okay
 1.44 17-Oct-1999  jdolecek branches: 1.44.2; 1.44.4;
include opt_ddb.h, so that symbol DDB actually get's defined appropriately
si_intr(): consmetic change to the code calling Debugger()

First part of fix to PR #8637 by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>.
 1.43 02-Feb-1999  fair branches: 1.43.8;
Bracket calls to Debugger() with #ifdef DDB (won't compile otherwise;
the prototype isn't there without DDB).
 1.42 23-Dec-1998  fair Make gcc happy by changing %x to %lx hiding in a DEBUG.
 1.41 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.40 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.39 12-Jan-1998  thorpej Update for changes to config.
 1.38 28-Oct-1997  gwr Left DEBUG there by accident. Remove it
 1.37 17-Oct-1997  gwr branches: 1.37.2;
Move si_reset_adapter() from si.c into the bus-specific modules.
Support the Sun3/470 (sun3x). Adapt to the new DVMA interface.
Set the si_xxx_options in the config file (easier for users).
 1.36 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.35 28-Apr-1997  gwr branches: 1.35.2; 1.35.4;
si_intr: if our CSR indicates an interrupt, return 1.
 1.34 26-Feb-1997  gwr Allow per-target control over disconnect/reselect.
 1.33 27-Jan-1997  gwr branches: 1.33.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.32 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.31 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.30 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.29 13-Oct-1996  christos backout previous kprintf change
 1.28 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.27 28-Aug-1996  cgd (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
 1.26 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.25 17-Jun-1996  gwr branches: 1.25.2;
Move some of the DMA engine initialization from the "start" routine
to the "setup" routine. Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
 1.24 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
Also move it back to the traditional name (si).
 1.23 13-Feb-1996  gwr no longer useful
 1.22 08-Oct-1995  gwr Minor cleanup.
 1.21 14-Aug-1995  gwr SCSI bus phase not valid until REQ is true (Fix from David Jones).
 1.20 12-Aug-1995  mycroft minphys() functions really should return void.
 1.19 08-Aug-1995  gwr Improve handling of a device that "sits on" the bus (from Jason Thorpe)
 1.18 24-Jul-1995  cgd update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
 1.17 01-Jun-1995  gwr Better reset code, and reset the chip when it goes comatose.
 1.16 24-May-1995  gwr Improve probe (should reject "sc" board now)
 1.15 26-Mar-1995  gwr The splbio()/splx(s) is now appropriate even if SCSI_POLL is set.
 1.14 24-Jan-1995  gwr Now works on VME as well (or as poorly) as on OBIO.
 1.13 10-Jan-1995  gwr Fixed to work with the new SCSI code (thanks to Phil Nelson).
 1.12 31-Dec-1994  gwr Update for new SCSI.
 1.11 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.10 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 20-Sep-1994  gwr branches: 1.7.2;
Call obio_alloc with just two args (mappings always writable).
 1.6 06-Jul-1994  gwr Add a fix for slow devices from Phil Nelson.
 1.5 28-May-1994  gwr ...try again...
 1.4 28-May-1994  gwr junk removal
 1.3 16-May-1994  gwr Remove some cruft left over from debugging.
 1.2 13-May-1994  gwr SCSI driver works!
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.7.2.2 20-Sep-1994  gwr Call obio_alloc with just two args (mappings always writable).
 1.7.2.1 20-Sep-1994  gwr file si.c was added on branch netbsd-1-0 on 1994-09-20 16:21:47 +0000
 1.25.2.2 17-Jun-1996  gwr Move some of the DMA engine initialization from the "start" routine
to the "setup" routine. Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
 1.25.2.1 17-Jun-1996  gwr file si.c was added on branch netbsd-1-2 on 1996-06-17 23:21:30 +0000
 1.33.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.35.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.35.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.37.2.1 29-Oct-1997  mellon Pull rev 1.38 up from trunk (gwr)
 1.43.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.44.4.1 15-Nov-1999  fvdl Sync with -current
 1.44.2.3 18-Feb-2001  bouyer Make compile again.
 1.44.2.2 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 1.44.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.49.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.50.8.3 29-Dec-2002  thorpej Sync with HEAD.
 1.50.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.50.8.1 25-Apr-2001  nathanw file si.c was added on branch nathanw_sa on 2002-10-18 02:40:20 +0000
 1.50.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.53.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.53.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.53.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.53.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.53.2.1 03-Aug-2004  skrll Sync with HEAD
 1.55.2.1 29-Apr-2005  kent sync with -current
 1.56.8.1 26-Feb-2007  yamt sync with head.
 1.57.20.1 09-Feb-2007  ad Sync with HEAD.
 1.60.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.61.4.2 11-Mar-2010  yamt sync with head
 1.61.4.1 16-May-2008  yamt sync with head.
 1.61.2.1 18-May-2008  yamt sync with head.
 1.63.76.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.64.24.1 02-Aug-2025  perseant Sync with HEAD
 1.39 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.38 20-Dec-2023  thorpej branches: 1.38.2;
Remove unnecessary <sys/malloc.h>.
 1.37 27-Dec-2019  msaitoh s/transfered/transferred/
 1.36 21-Nov-2009  rmind branches: 1.36.64;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.35 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.34 04-Apr-2008  tsutsui branches: 1.34.2; 1.34.4;
Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes.
 1.33 03-Feb-2007  tsutsui branches: 1.33.44;
Make si at obio and si at vme on sun3 use bus_dma(9) for data xfer.

XXX1: Only si at vme on TME is tested.
XXX2: No info about DMA on si at sebuf. (bounce buffer required?)
 1.32 29-Mar-2006  thorpej branches: 1.32.8;
Use device_cfdata().
 1.31 24-Dec-2005  perry branches: 1.31.4; 1.31.6; 1.31.8; 1.31.10; 1.31.12;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.30 11-Dec-2005  christos merge ktrace-lwp.
 1.29 22-Jan-2005  chs branches: 1.29.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.28 24-Feb-2004  wiz branches: 1.28.8;
becuase -> because. From Peter Postma.
 1.27 15-Jul-2003  lukem __KERNEL_RCSID()
 1.26 03-May-2003  wiz branches: 1.26.2;
DMA, not dma nor Dma.
 1.25 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.24 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.23 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.22 20-Aug-2001  wiz branches: 1.22.6;
precede, not preceed.
 1.21 22-Nov-1999  jdolecek branches: 1.21.8;
Debugger()/cpu_Debugger() is always available and always defined/prototyped
in <sys/systm.h> for sun3/sun3x, even in non-DDB case
 1.20 17-Oct-1999  jdolecek branches: 1.20.2;
include opt_ddb.h so that symbol DDB gets defined appropriately and right
thing happens WRT Debugger()
call Debugger() only when DDB is defined
 1.19 05-Feb-1998  gwr branches: 1.19.14;
Merge arch/sun3x into arch/sun3
 1.18 09-Dec-1997  gwr branches: 1.18.2;
Remove local definition of DEBUG (left there by accident).
 1.17 21-Oct-1997  gwr Fix a warning
 1.16 17-Oct-1997  gwr branches: 1.16.2;
Move si_reset_adapter() from si.c into the bus-specific modules.
Support the Sun3/470 (sun3x). Adapt to the new DVMA interface.
Set the si_xxx_options in the config file (easier for users).
 1.15 07-Oct-1997  gwr typo
 1.14 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.13 29-Jul-1997  fair branches: 1.13.2;
%x -> 0x%x, fixes for PR#3757
 1.12 28-Apr-1997  gwr branches: 1.12.2;
Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.11 26-Feb-1997  gwr Allow per-target control over disconnect/reselect.
 1.10 27-Jan-1997  gwr branches: 1.10.4;
Update comment about si_obio_options
 1.9 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.8 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 30-Oct-1996  gwr Allow the config line "flags" to set bits in si_options.
Thanks to Jason Thorpe for the fix! (PR#1929)
 1.5 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 17-Jun-1996  gwr branches: 1.2.2;
Move some of the DMA engine initialization from the "start" routine
to the "setup" routine. Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
Also move it back to the traditional name (si).
 1.2.2.2 17-Jun-1996  gwr Move some of the DMA engine initialization from the "start" routine
to the "setup" routine. Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
 1.2.2.1 17-Jun-1996  gwr file si_obio.c was added on branch netbsd-1-2 on 1996-06-17 23:21:36 +0000
 1.10.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.12.2.2 30-Jul-1997  bouyer Sync with trunk.
 1.12.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.13.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.13.2.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.16.2.1 22-Oct-1997  mellon pull up from main trunk to fix warning
 1.18.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.19.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.20.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.8.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.21.8.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.22.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.22.6.1 20-Aug-2001  nathanw file si_obio.c was added on branch nathanw_sa on 2002-10-18 02:40:21 +0000
 1.26.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.26.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.1 03-Aug-2004  skrll Sync with HEAD
 1.28.8.1 29-Apr-2005  kent sync with -current
 1.29.8.2 26-Feb-2007  yamt sync with head.
 1.29.8.1 21-Jun-2006  yamt sync with head.
 1.31.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.31.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.31.8.1 01-Apr-2006  yamt sync with head.
 1.31.6.1 22-Apr-2006  simonb Sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.32.8.1 09-Feb-2007  ad Sync with HEAD.
 1.33.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.34.4.2 11-Mar-2010  yamt sync with head
 1.34.4.1 16-May-2008  yamt sync with head.
 1.34.2.1 18-May-2008  yamt sync with head.
 1.36.64.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.38.2.1 02-Aug-2025  perseant Sync with HEAD
 1.33 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.32 23-Jan-2023  andvar branches: 1.32.6;
s/lager/larger/ in comments.
 1.31 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.30 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.29 07-Nov-2013  christos branches: 1.29.42;
fix unused warnings
 1.28 21-Nov-2009  rmind branches: 1.28.12; 1.28.22; 1.28.26;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.27 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.26 04-Apr-2008  tsutsui branches: 1.26.2; 1.26.4;
Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes.
 1.25 04-Mar-2007  christos branches: 1.25.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 29-Mar-2006  thorpej branches: 1.24.14;
Use device_cfdata().
 1.23 11-Dec-2005  christos branches: 1.23.4; 1.23.6; 1.23.8; 1.23.10; 1.23.12;
merge ktrace-lwp.
 1.22 22-Jan-2005  chs branches: 1.22.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.21 15-Jul-2003  lukem branches: 1.21.8;
__KERNEL_RCSID()
 1.20 03-May-2003  wiz branches: 1.20.2;
DMA, not dma nor Dma.
 1.19 29-Dec-2002  kristerw Do not try to return a value from void functions.
 1.18 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.17 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.14 20-Aug-2001  wiz branches: 1.14.6;
precede, not preceed.
 1.13 25-Apr-2001  bouyer branches: 1.13.2;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.12 01-Apr-2000  tsutsui branches: 1.12.6;
Fix typo. (s/sc_adapter/sc_link/)
 1.11 25-Mar-2000  tsutsui Add a "sc_rev" member to ncr5380_softc and handle CXD1180 quirk
in MI ncr5380sbc.
 1.10 18-Mar-2000  mycroft Add a ncr5380_attach() routine which does part of the initialization, attaches
the scsibus, and does the addref/delref dance.
 1.9 03-Nov-1999  jdolecek adapt to latest scsipi changes
XXX this is not tested, but should be okay
 1.8 09-Apr-1999  gwr branches: 1.8.2; 1.8.8; 1.8.10; 1.8.12;
Better implementation of driver "match" function,
and warning/error cleanup.
 1.7 19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.6 10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.5 09-Dec-1997  gwr Remove local definition of DEBUG (left there by accident).
 1.4 08-Nov-1997  gwr Oops...(pasto)
 1.3 07-Nov-1997  gwr Disable DMA and interrupts for now (via se_options).
 1.2 17-Oct-1997  gwr branches: 1.2.2;
Nuke same-unit hack in match.
 1.1 17-Oct-1997  gwr Add support for the Sun3/E "se" (Ethernet/SCSI) board.
Compiles, but NOT YET TESTED.
 1.2.2.2 09-Nov-1997  mellon Pull rev 1.4 up from trunk (gwr)
 1.2.2.1 07-Nov-1997  mellon Pull rev 1.3 up from trunk (gwr)
 1.8.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.10.1 15-Nov-1999  fvdl Sync with -current
 1.8.8.3 29-Mar-2001  bouyer Test-compile on i386.
 1.8.8.2 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 1.8.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.2.2 09-Apr-1999  gwr Better implementation of driver "match" function,
and warning/error cleanup.
 1.8.2.1 09-Apr-1999  gwr file si_sebuf.c was added on branch netbsd-1-4 on 1999-04-09 04:26:28 +0000
 1.12.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.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.13.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.14.6.3 29-Dec-2002  thorpej Sync with HEAD.
 1.14.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.14.6.1 20-Aug-2001  nathanw file si_sebuf.c was added on branch nathanw_sa on 2002-10-18 02:40:21 +0000
 1.20.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.8.1 29-Apr-2005  kent sync with -current
 1.22.8.2 03-Sep-2007  yamt sync with head.
 1.22.8.1 21-Jun-2006  yamt sync with head.
 1.23.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.23.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.8.1 01-Apr-2006  yamt sync with head.
 1.23.6.1 22-Apr-2006  simonb Sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.24.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.25.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.4.2 11-Mar-2010  yamt sync with head
 1.26.4.1 16-May-2008  yamt sync with head.
 1.26.2.1 18-May-2008  yamt sync with head.
 1.28.26.1 18-May-2014  rmind sync with head
 1.28.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.12.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.32.6.1 02-Aug-2025  perseant Sync with HEAD
 1.33 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.32 20-Dec-2023  thorpej branches: 1.32.2;
Remove unnecessary <sys/malloc.h>.
 1.31 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.30 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.29 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.28 04-Apr-2008  tsutsui branches: 1.28.2; 1.28.4;
Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes.
 1.27 12-Mar-2007  tsutsui branches: 1.27.38;
Fix printf formats in #ifdef DEBUG.
 1.26 03-Feb-2007  tsutsui branches: 1.26.2; 1.26.6;
Make si at obio and si at vme on sun3 use bus_dma(9) for data xfer.

XXX1: Only si at vme on TME is tested.
XXX2: No info about DMA on si at sebuf. (bounce buffer required?)
 1.25 29-Mar-2006  thorpej branches: 1.25.8;
Use device_cfdata().
 1.24 11-Dec-2005  christos branches: 1.24.4; 1.24.6; 1.24.8; 1.24.10; 1.24.12;
merge ktrace-lwp.
 1.23 22-Jan-2005  chs branches: 1.23.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.22 15-Jul-2003  lukem branches: 1.22.8;
__KERNEL_RCSID()
 1.21 03-May-2003  wiz branches: 1.21.2;
DMA, not dma nor Dma.
 1.20 08-Oct-2002  jdolecek fix typo - si_vme, not si_vmw
 1.19 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.18 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.17 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.16 20-Aug-2001  wiz branches: 1.16.6;
precede, not preceed.
 1.15 05-Feb-1998  gwr branches: 1.15.28;
Merge arch/sun3x into arch/sun3
 1.14 09-Dec-1997  gwr branches: 1.14.2;
Remove local definition of DEBUG (left there by accident).
 1.13 17-Oct-1997  gwr Move si_reset_adapter() from si.c into the bus-specific modules.
Support the Sun3/470 (sun3x). Adapt to the new DVMA interface.
Set the si_xxx_options in the config file (easier for users).
 1.12 27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.11 29-Jul-1997  fair branches: 1.11.2;
%x -> 0x%x, fixes for PR#3757
 1.10 26-Feb-1997  gwr branches: 1.10.2;
Allow per-target control over disconnect/reselect.
 1.9 27-Jan-1997  gwr branches: 1.9.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.8 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 30-Oct-1996  gwr Allow the config line "flags" to set bits in si_options.
Thanks to Jason Thorpe for the fix! (PR#1929)
 1.5 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 17-Jun-1996  gwr branches: 1.2.2;
Move some of the DMA engine initialization from the "start" routine
to the "setup" routine. Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
Also move it back to the traditional name (si).
 1.2.2.2 17-Jun-1996  gwr Move some of the DMA engine initialization from the "start" routine
to the "setup" routine. Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
 1.2.2.1 17-Jun-1996  gwr file si_vme.c was added on branch netbsd-1-2 on 1996-06-17 23:21:40 +0000
 1.9.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10.2.2 30-Jul-1997  bouyer Sync with trunk.
 1.10.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.11.2.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.2.1 26-Jan-1998  gwr s/vmes/vme/g
 1.15.28.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.15.28.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.16.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.6.1 20-Aug-2001  nathanw file si_vme.c was added on branch nathanw_sa on 2002-10-18 02:40:21 +0000
 1.21.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.8.1 29-Apr-2005  kent sync with -current
 1.23.8.3 03-Sep-2007  yamt sync with head.
 1.23.8.2 26-Feb-2007  yamt sync with head.
 1.23.8.1 21-Jun-2006  yamt sync with head.
 1.24.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.24.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.24.8.1 01-Apr-2006  yamt sync with head.
 1.24.6.1 22-Apr-2006  simonb Sync with head.
 1.24.4.1 09-Sep-2006  rpaulo sync with head
 1.25.8.1 09-Feb-2007  ad Sync with HEAD.
 1.26.6.1 13-Mar-2007  ad Sync with head.
 1.26.2.1 24-Mar-2007  yamt sync with head.
 1.27.38.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.4.2 11-Mar-2010  yamt sync with head
 1.28.4.1 16-May-2008  yamt sync with head.
 1.28.2.1 18-May-2008  yamt sync with head.
 1.32.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.2 03-May-2003  wiz branches: 1.2.230;
DMA, not dma nor Dma.
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
Also move it back to the traditional name (si).
 1.2.230.1 02-Aug-2025  perseant Sync with HEAD
 1.12 23-Jan-2023  andvar s/lager/larger/ in comments.
 1.11 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10 04-Feb-2007  tsutsui branches: 1.10.44; 1.10.46; 1.10.48;
Remove unused dh_addr member from struct si_dma_handle.
 1.9 03-Feb-2007  tsutsui Make si at obio and si at vme on sun3 use bus_dma(9) for data xfer.

XXX1: Only si at vme on TME is tested.
XXX2: No info about DMA on si at sebuf. (bounce buffer required?)
 1.8 11-Dec-2005  christos branches: 1.8.20;
merge ktrace-lwp.
 1.7 22-Jan-2005  chs branches: 1.7.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.6 17-Oct-1997  gwr branches: 1.6.52; 1.6.60;
Move si_reset_adapter() from si.c into the bus-specific modules.
Support the Sun3/470 (sun3x). Adapt to the new DVMA interface.
Set the si_xxx_options in the config file (easier for users).
 1.5 26-Feb-1997  gwr Allow per-target control over disconnect/reselect.
 1.4 27-Jan-1997  gwr branches: 1.4.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.3 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.1 26-Mar-1996  gwr Take advantage of the new config attach stuff by
splitting out the obio and vme support code.
Also move it back to the traditional name (si).
 1.4.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.6.60.1 29-Apr-2005  kent sync with -current
 1.6.52.1 24-Jan-2005  skrll Sync with HEAD.
 1.7.8.1 26-Feb-2007  yamt sync with head.
 1.8.20.1 09-Feb-2007  ad Sync with HEAD.
 1.10.48.1 16-May-2008  yamt sync with head.
 1.10.46.1 18-May-2008  yamt sync with head.
 1.10.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.10 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.9 12-Jan-1998  thorpej branches: 1.9.2;
Update for changes to config.
 1.8 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.7 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.6 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.2 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.9.2.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.4 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.81 06-Sep-2025  andvar s/Illgal/Illegal/ in error string.
 1.80 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.79 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.78 23-Jan-2023  andvar branches: 1.78.6;
s/cyliner/cylinder/ and s/specturm/spectrum/ in messages.
 1.77 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.76 24-Apr-2021  thorpej branches: 1.76.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.75 21-Nov-2020  thorpej branches: 1.75.2;
malloc(9) -> kmem(9)
 1.74 10-Nov-2019  chs branches: 1.74.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.73 26-Apr-2015  mlelstv branches: 1.73.18;
Use C99-style initializers for struct dkdriver.
 1.72 31-Dec-2014  christos make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
 1.71 25-Jul-2014  dholland branches: 1.71.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.70 25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.69 16-Mar-2014  dholland branches: 1.69.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.68 01-Feb-2011  chuck branches: 1.68.4; 1.68.14; 1.68.18;
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.67 13-Jan-2009  yamt branches: 1.67.6; 1.67.8; 1.67.10;
g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.66 12-Jan-2009  cegger cast to char to printf DISKPART
XXX Shouldn't sun3 use the MI drivers instead?
 1.65 28-Jun-2008  tsutsui branches: 1.65.4;
Split softc/device_t, with misc cosmetic changes.
 1.64 08-Jun-2008  tsutsui branches: 1.64.2;
Use device_private() and device_lookup_private() to get softc
and to see if device unit is vaild.
 1.63 06-Feb-2008  elad branches: 1.63.6; 1.63.8; 1.63.10; 1.63.12;
It's KAUTH_REQ_DEVICE_RAWIO_PASSTHRU_*.

Noted by dogcow@, thanks!
 1.62 04-Feb-2008  elad Properly classify kauth PASSTHRU requests.

Done with much help from chuck@, thanks!
 1.61 02-Jan-2008  ad Merge vmlocking2 to head.
 1.60 17-Oct-2007  garbled branches: 1.60.2; 1.60.4; 1.60.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.59 08-Oct-2007  ad Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.58 29-Jul-2007  ad branches: 1.58.4; 1.58.6; 1.58.8;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.57 09-Jul-2007  ad branches: 1.57.2; 1.57.4;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.56 04-Mar-2007  christos branches: 1.56.2; 1.56.4; 1.56.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.55 04-Jan-2007  elad branches: 1.55.2;
Consistent usage of KAUTH_GENERIC_ISSUSER.
 1.54 23-Jul-2006  ad branches: 1.54.4;
Use the LWP cached credentials where sane.
 1.53 14-May-2006  elad integrate kauth.
 1.52 28-Mar-2006  thorpej Use device_unit().
 1.51 11-Dec-2005  christos branches: 1.51.4; 1.51.6; 1.51.8; 1.51.10; 1.51.12;
merge ktrace-lwp.
 1.50 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.49 03-Jun-2005  tsutsui branches: 1.49.2;
- constify
- fix shadowing variables
 1.48 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.47 28-Oct-2004  yamt branches: 1.47.4;
move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.46 29-Sep-2003  wiz available, not avaliable. From miod@openbsd.
 1.45 15-Jul-2003  lukem __KERNEL_RCSID()
 1.44 10-May-2003  thorpej branches: 1.44.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.43 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.42 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.41 01-Nov-2002  mrg implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
when processing hw.diskstats, add the read&write bytes/transfers for
the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail. however, the next time this is
change it will not fail again.

this is just the kernel portion.
 1.40 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.39 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.38 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.37 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.36 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.35 23-Jul-2002  hannken Convert to new device buffer queue interface.

Approved by: Nathan J. Williams <nathanw@netbsd.org>
 1.34 05-Sep-2001  tsutsui branches: 1.34.2; 1.34.6; 1.34.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.33 22-Jul-2001  wiz seperate -> separate
 1.32 29-Jun-2000  mrg branches: 1.32.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.31 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.30 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.29 27-May-2000  thorpej branches: 1.29.2;
sleep() -> tsleep()
 1.28 19-May-2000  thorpej A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
 1.27 16-May-2000  thorpej Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.26 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.25 21-Jan-2000  thorpej Update for sys/buf.h/disksort_*() changes.
 1.24 17-Sep-1999  thorpej branches: 1.24.2;
Centralize the declaration and clearing of `cold'.
 1.23 13-Dec-1998  kleink xdc_piodriver: sync function definition with declaration; also eliminates
the use of a char as an array subscript.
 1.22 23-Jul-1998  gwr Print a complaint when no children were specified
in the config file. Better than a link error...
 1.21 30-Jun-1998  mrg <dev/sun/disklabel.h> not <dev/sun/sun_disklabel.h>
 1.20 24-Jun-1998  jeremy Changed to include sun_disklabel.h from its new location in dev/sun.
 1.19 26-Jan-1998  gwr Save the "bustype" from our attach args in the controller "softc"
and use that instead of hard-coding BUS_VME32 everywhere.
(The Sun3X needs a more specific bustype value.)
 1.18 12-Jan-1998  thorpej branches: 1.18.2;
Update for changes to config.
 1.17 17-Oct-1997  gwr Move initialization code from xxattach to xx_init and call that
from both xxattach and xxopen instead of calling xxattach from
xxopen with faked up autoconfig args. Fix warnings.
 1.16 29-Jul-1997  fair %x -> 0x%x, fixes for PR#3757
 1.15 17-Jul-1997  jtk use locator defines in "locators.h" to index cf_loc[]
 1.14 24-Jun-1997  thorpej foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
 1.13 18-Jun-1997  pk xdsize(): only call xdopen()/xdclose() if not already open, per the
current `openmask'.
 1.12 28-Feb-1997  gwr Add xxc_print functions to pass to config_found() instead of NULL.
(Thanks to Chris Demetriou suggesting the improvement.)
 1.11 17-Dec-1996  gwr branches: 1.11.6;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 12-Aug-1996  chuck sync with sparc version:
repair XDC_HWAIT macro to handle the fact that waithead is now
unsigned. should fix xdc watchdog timeouts noted in port-sparc
by nathanw@mit.edu.
 1.7 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 04-Mar-1996  chuck Fix two bugs reported by Don Koch <aardvark@poirot.krl.com> (PR#2168).
[1] check return value from malloc() for NULL before trying to bzero it.
[2] use "=" rather than "|=" when writing to CSR (otherwise you may
ACK something you don't mean to!).
 1.5 22-Feb-1996  thorpej Fixup some RCS ids.
 1.4 08-Feb-1996  chuck [import changes from sparc port]
- moved disk_busy() call from xdstrategy() to xdc_startbuf()
[prevents disk_unbusy panic when disk is loaded (if no
free IOPBs, xdstrategy() would queue the buffer for pickup
by xdcintr() but xdcintr() would never call disk_busy().
xdc_startbuf() is a better place since all bufs are routed
through here] problem detected by girish@dworkin.wustl.edu,
diagnosed and corrected by me.
- move disk_unbusy() call in xdc_remove_iorq() before the call to
XDC_FREE() [don't want to access a data structure that was just put
on a free list]
 1.3 13-Jan-1996  chuck sync with sparc:
- move disk_attach() to before reading the disk label as per Jason.
otherwise we are reading into an unallocated buffer (oops!)
 1.2 07-Jan-1996  thorpej New generic disk framework. Highlights:

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

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

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

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

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xd.c was added on branch netbsd-1-1 on 1995-10-30 20:58:18 +0000
 1.11.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.18.2.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.24.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.29.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.32.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.32.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.32.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.32.4.1 03-Aug-2001  lukem update to -current
 1.34.14.2 31-Aug-2002  gehenna catch up with -current.
 1.34.14.1 17-May-2002  gehenna Add device switch.
 1.34.6.6 03-Jan-2003  thorpej Sync with HEAD.
 1.34.6.5 11-Nov-2002  nathanw Catch up to -current
 1.34.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.34.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.34.6.2 01-Aug-2002  nathanw Catch up to -current.
 1.34.6.1 05-Sep-2001  nathanw file xd.c was added on branch nathanw_sa on 2002-08-01 02:43:54 +0000
 1.34.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.44.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.44.2.6 04-Feb-2005  skrll Adapt to branch.
 1.44.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.44.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.44.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.44.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.44.2.1 03-Aug-2004  skrll Sync with HEAD
 1.47.4.1 29-Apr-2005  kent sync with -current
 1.49.2.7 11-Feb-2008  yamt sync with head.
 1.49.2.6 21-Jan-2008  yamt sync with head
 1.49.2.5 27-Oct-2007  yamt sync with head.
 1.49.2.4 03-Sep-2007  yamt sync with head.
 1.49.2.3 26-Feb-2007  yamt sync with head.
 1.49.2.2 30-Dec-2006  yamt sync with head.
 1.49.2.1 21-Jun-2006  yamt sync with head.
 1.51.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.51.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.51.10.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.51.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.51.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.51.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.51.8.3 11-Aug-2006  yamt sync with head
 1.51.8.2 24-May-2006  yamt sync with head.
 1.51.8.1 01-Apr-2006  yamt sync with head.
 1.51.6.2 01-Jun-2006  kardel Sync with head.
 1.51.6.1 22-Apr-2006  simonb Sync with head.
 1.51.4.1 09-Sep-2006  rpaulo sync with head
 1.54.4.1 12-Jan-2007  ad Sync with head.
 1.55.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.56.10.2 16-Oct-2007  garbled Sync with HEAD
 1.56.10.1 03-Oct-2007  garbled Sync with HEAD
 1.56.4.1 11-Jul-2007  mjf Sync with head.
 1.56.2.3 20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.56.2.2 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.56.2.1 01-Jul-2007  ad Adapt to callout API change.
 1.57.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.57.2.1 07-Aug-2007  matt Sync with HEAD.
 1.58.8.1 14-Oct-2007  yamt sync with head.
 1.58.6.3 23-Mar-2008  matt sync with HEAD
 1.58.6.2 09-Jan-2008  matt sync with HEAD
 1.58.6.1 06-Nov-2007  matt sync with HEAD
 1.58.4.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.60.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.60.4.1 31-Dec-2007  ad Catch up with buffer cache changes.
 1.60.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.63.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.63.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.63.10.1 04-May-2009  yamt sync with head.
 1.63.8.1 17-Jun-2008  yamt sync with head.
 1.63.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.63.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.64.2.1 03-Jul-2008  simonb Sync with head.
 1.65.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.67.10.1 08-Feb-2011  bouyer Sync with HEAD
 1.67.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.67.6.1 05-Mar-2011  rmind sync with head
 1.68.18.1 18-May-2014  rmind sync with head
 1.68.14.2 03-Dec-2017  jdolecek update from HEAD
 1.68.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.68.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.69.2.1 10-Aug-2014  tls Rebase.
 1.71.4.2 06-Jun-2015  skrll Sync with HEAD
 1.71.4.1 06-Apr-2015  skrll Sync with HEAD
 1.73.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.74.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.75.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.76.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.78.6.1 02-Aug-2025  perseant Sync with HEAD
 1.9 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.8 24-Oct-2021  andvar branches: 1.8.10;
fix various typos in comments, mainly copypasta.
 1.7 01-Feb-2011  chuck 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.6 11-Dec-2005  christos branches: 1.6.100; 1.6.106; 1.6.108;
merge ktrace-lwp.
 1.5 19-Apr-2004  wiz Spell removable with only two es. Inspired by jmc@openbsd.
 1.4 03-May-2003  wiz branches: 1.4.2;
DMA, not dma nor Dma.
 1.3 06-Jan-2003  wiz interrupt with two rs.
 1.2 22-Feb-1996  thorpej branches: 1.2.50;
Fixup some RCS ids.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xdreg.h was added on branch netbsd-1-1 on 1995-10-30 20:58:19 +0000
 1.2.50.1 07-Jan-2003  thorpej Sync with HEAD.
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.108.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.100.1 05-Mar-2011  rmind sync with head
 1.8.10.1 02-Aug-2025  perseant Sync with HEAD
 1.12 01-Feb-2011  chuck 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.11 28-Jun-2008  tsutsui branches: 1.11.18; 1.11.24; 1.11.26;
Split softc/device_t, with misc cosmetic changes.
 1.10 11-Dec-2005  christos branches: 1.10.74; 1.10.78; 1.10.80; 1.10.82;
merge ktrace-lwp.
 1.9 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.8 23-Jul-2002  hannken branches: 1.8.6; 1.8.22;
Convert to new device buffer queue interface.

Approved by: Nathan J. Williams <nathanw@netbsd.org>
 1.7 23-Mar-2000  thorpej branches: 1.7.8; 1.7.12; 1.7.20;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.6 21-Jan-2000  thorpej Update for sys/buf.h/disksort_*() changes.
 1.5 26-Jan-1998  gwr branches: 1.5.14;
Save the "bustype" from our attach args in the controller "softc"
and use that instead of hard-coding BUS_VME32 everywhere.
(The Sun3X needs a more specific bustype value.)
 1.4 17-Oct-1997  gwr branches: 1.4.4;
Move initialization code from xxattach to xx_init and call that
from both xxattach and xxopen instead of calling xxattach from
xxopen with faked up autoconfig args. Fix warnings.
 1.3 22-Feb-1996  thorpej Fixup some RCS ids.
 1.2 07-Jan-1996  thorpej New generic disk framework. Highlights:

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

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

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

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

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xdvar.h was added on branch netbsd-1-1 on 1995-10-30 20:58:20 +0000
 1.4.4.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.5.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.20.1 31-Aug-2002  gehenna catch up with -current.
 1.7.12.1 01-Aug-2002  nathanw Catch up to -current.
 1.7.8.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.22.1 21-Jun-2006  yamt sync with head.
 1.8.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.82.1 03-Jul-2008  simonb Sync with head.
 1.10.80.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.10.78.1 04-May-2009  yamt sync with head.
 1.10.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.11.26.1 08-Feb-2011  bouyer Sync with HEAD
 1.11.24.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.18.1 05-Mar-2011  rmind sync with head
 1.5 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.4 07-Sep-2015  dholland branches: 1.4.54;
Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.3 01-Feb-2011  chuck branches: 1.3.14; 1.3.32;
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.2 04-Mar-2007  christos branches: 1.2.66; 1.2.72; 1.2.74;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.1 30-Oct-1995  gwr branches: 1.1.2; 1.1.84; 1.1.122;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.122.1 12-Mar-2007  rmind Sync with HEAD.
 1.1.84.1 03-Sep-2007  yamt sync with head.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xio.h was added on branch netbsd-1-1 on 1995-10-30 20:58:21 +0000
 1.2.74.1 08-Feb-2011  bouyer Sync with HEAD
 1.2.72.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.66.1 05-Mar-2011  rmind sync with head
 1.3.32.1 22-Sep-2015  skrll Sync with HEAD
 1.3.14.1 03-Dec-2017  jdolecek update from HEAD
 1.4.54.1 02-Aug-2025  perseant Sync with HEAD
 1.84 21-Dec-2024  tsutsui Make local dev_type_*() functions static.
 1.83 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.82 07-Aug-2021  thorpej branches: 1.82.12;
Merge thorpej-cfargs2.
 1.81 24-Apr-2021  thorpej branches: 1.81.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.80 21-Nov-2020  thorpej branches: 1.80.2;
malloc(9) -> kmem(9)
 1.79 10-Nov-2019  chs branches: 1.79.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.78 26-Apr-2015  mlelstv branches: 1.78.18;
Use C99-style initializers for struct dkdriver.
 1.77 31-Dec-2014  christos make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
 1.76 25-Jul-2014  dholland branches: 1.76.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.75 25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.74 16-Mar-2014  dholland branches: 1.74.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.73 07-Nov-2013  christos fix unused warnings
 1.72 01-Feb-2011  chuck branches: 1.72.4; 1.72.14; 1.72.18;
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.71 13-Jan-2009  yamt branches: 1.71.6; 1.71.8; 1.71.10;
g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.70 12-Jan-2009  cegger cast to char to printf DISKPART
XXX Shouldn't sun3 use the MI drivers instead?
 1.69 28-Jun-2008  tsutsui branches: 1.69.4;
Split softc/device_t, with misc cosmetic changes.
 1.68 08-Jun-2008  tsutsui branches: 1.68.2;
Use device_private() and device_lookup_private() to get softc
and to see if device unit is vaild.
 1.67 06-Feb-2008  elad branches: 1.67.6; 1.67.8; 1.67.10; 1.67.12;
It's KAUTH_REQ_DEVICE_RAWIO_PASSTHRU_*.

Noted by dogcow@, thanks!
 1.66 06-Feb-2008  elad - There is no XYCMD_WRP -- forgot to remove it along with the XYCMD_RDP :)
- Add missing '}'

Noted by dogcow@, thanks!
 1.65 04-Feb-2008  elad Properly classify kauth PASSTHRU requests.

Done with much help from chuck@, thanks!
 1.64 02-Jan-2008  ad Merge vmlocking2 to head.
 1.63 17-Oct-2007  garbled branches: 1.63.2; 1.63.4; 1.63.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.62 08-Oct-2007  ad Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.61 29-Jul-2007  ad branches: 1.61.4; 1.61.6; 1.61.8;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.60 09-Jul-2007  ad branches: 1.60.2; 1.60.4;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.59 04-Mar-2007  christos branches: 1.59.2; 1.59.4; 1.59.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.58 04-Jan-2007  elad branches: 1.58.2;
Consistent usage of KAUTH_GENERIC_ISSUSER.
 1.57 23-Jul-2006  ad branches: 1.57.4;
Use the LWP cached credentials where sane.
 1.56 14-May-2006  elad integrate kauth.
 1.55 29-Mar-2006  tsutsui Use device_unit(parent), not device_parent(parent).
 1.54 28-Mar-2006  thorpej Use device_unit().
 1.53 11-Dec-2005  christos branches: 1.53.4; 1.53.6; 1.53.8; 1.53.10; 1.53.12;
merge ktrace-lwp.
 1.52 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.51 03-Jun-2005  tsutsui branches: 1.51.2;
Constify.
 1.50 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.49 28-Oct-2004  yamt branches: 1.49.4;
move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.48 29-Sep-2003  wiz available, not avaliable. From miod@openbsd.
 1.47 15-Jul-2003  lukem __KERNEL_RCSID()
 1.46 10-May-2003  thorpej branches: 1.46.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.45 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.44 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.43 01-Nov-2002  mrg implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
when processing hw.diskstats, add the read&write bytes/transfers for
the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail. however, the next time this is
change it will not fail again.

this is just the kernel portion.
 1.42 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.41 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.40 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.39 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.38 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.37 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.36 23-Jul-2002  hannken Convert to new device buffer queue interface.

Approved by: Nathan J. Williams <nathanw@netbsd.org>
 1.35 05-Sep-2001  tsutsui branches: 1.35.2; 1.35.6; 1.35.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.34 22-Jul-2001  wiz seperate -> separate
 1.33 29-Jun-2000  mrg branches: 1.33.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.32 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.31 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.30 27-May-2000  thorpej branches: 1.30.2;
sleep() -> tsleep()
 1.29 19-May-2000  thorpej A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
 1.28 16-May-2000  thorpej Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.27 01-Apr-2000  tsutsui Typo. (callout_rest -> callout_reset)
 1.26 23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.25 07-Feb-2000  thorpej Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle. Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
 1.24 21-Jan-2000  thorpej Update for sys/buf.h/disksort_*() changes.
 1.23 17-Sep-1999  thorpej branches: 1.23.2;
Centralize the declaration and clearing of `cold'.
 1.22 23-Jul-1998  gwr Print a complaint when no children were specified
in the config file. Better than a link error...
 1.21 30-Jun-1998  mrg <dev/sun/disklabel.h> not <dev/sun/sun_disklabel.h>
 1.20 24-Jun-1998  jeremy Changed to include sun_disklabel.h from its new location in dev/sun.
 1.19 26-Jan-1998  gwr Save the "bustype" from our attach args in the controller "softc"
and use that instead of hard-coding BUS_VME32 everywhere.
(The Sun3X needs a more specific bustype value.)
 1.18 12-Jan-1998  thorpej branches: 1.18.2;
Update for changes to config.
 1.17 17-Oct-1997  gwr Move initialization code from xxattach to xx_init and call that
from both xxattach and xxopen instead of calling xxattach from
xxopen with faked up autoconfig args. Fix warnings.
 1.16 17-Jul-1997  jtk use locator defines in "locators.h" to index cf_loc[]
 1.15 24-Jun-1997  thorpej foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
 1.14 18-Jun-1997  pk xysize(): only call xyopen()/xyclose() if not already open, per the
current `openmask'.
 1.13 28-Feb-1997  gwr Add xxc_print functions to pass to config_found() instead of NULL.
(Thanks to Chris Demetriou suggesting the improvement.)
 1.12 17-Dec-1996  gwr branches: 1.12.6;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.11 13-Oct-1996  christos backout previous kprintf change
 1.10 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.9 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.8 08-Mar-1996  mycroft Don't call dvma_kvtopa() with a null pointer.
 1.7 04-Mar-1996  chuck Fix two bugs reported by Don Koch <aardvark@poirot.krl.com> (PR#2168).
(the xd bugs also apply to the xy driver...)
[1] check return value from malloc() for NULL before trying to bzero it.
[2] use "=" rather than "|=" when writing to CSR (otherwise you may
ACK something you don't mean to!).
 1.6 28-Feb-1996  thorpej Fixup an RCS id.
 1.5 21-Feb-1996  chuck sync with sparc version:
minor clean up: revise locations of disk_busy/disk_unbusy calls to match xd.c
 1.4 16-Feb-1996  gwr Sync. with sparc version, and fix some cosmetic nits...
 1.3 13-Jan-1996  chuck sync with sparc:
- move disk_attach() to before reading the disk label as per Jason.
otherwise we are reading into an unallocated buffer (oops!)
 1.2 07-Jan-1996  thorpej New generic disk framework. Highlights:

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

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

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

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

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xy.c was added on branch netbsd-1-1 on 1995-10-30 20:58:22 +0000
 1.12.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.18.2.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.23.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.30.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.33.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.33.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.33.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.33.4.1 03-Aug-2001  lukem update to -current
 1.35.14.2 31-Aug-2002  gehenna catch up with -current.
 1.35.14.1 17-May-2002  gehenna Add device switch.
 1.35.6.6 03-Jan-2003  thorpej Sync with HEAD.
 1.35.6.5 11-Nov-2002  nathanw Catch up to -current
 1.35.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.35.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.35.6.2 01-Aug-2002  nathanw Catch up to -current.
 1.35.6.1 05-Sep-2001  nathanw file xy.c was added on branch nathanw_sa on 2002-08-01 02:43:55 +0000
 1.35.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.46.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.46.2.6 04-Feb-2005  skrll Adapt to branch.
 1.46.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.46.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.46.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.46.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.46.2.1 03-Aug-2004  skrll Sync with HEAD
 1.49.4.1 29-Apr-2005  kent sync with -current
 1.51.2.7 11-Feb-2008  yamt sync with head.
 1.51.2.6 21-Jan-2008  yamt sync with head
 1.51.2.5 27-Oct-2007  yamt sync with head.
 1.51.2.4 03-Sep-2007  yamt sync with head.
 1.51.2.3 26-Feb-2007  yamt sync with head.
 1.51.2.2 30-Dec-2006  yamt sync with head.
 1.51.2.1 21-Jun-2006  yamt sync with head.
 1.53.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.53.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.53.10.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.53.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.53.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.53.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.53.8.3 11-Aug-2006  yamt sync with head
 1.53.8.2 24-May-2006  yamt sync with head.
 1.53.8.1 01-Apr-2006  yamt sync with head.
 1.53.6.2 01-Jun-2006  kardel Sync with head.
 1.53.6.1 22-Apr-2006  simonb Sync with head.
 1.53.4.1 09-Sep-2006  rpaulo sync with head
 1.57.4.1 12-Jan-2007  ad Sync with head.
 1.58.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.59.10.2 16-Oct-2007  garbled Sync with HEAD
 1.59.10.1 03-Oct-2007  garbled Sync with HEAD
 1.59.4.1 11-Jul-2007  mjf Sync with head.
 1.59.2.3 20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.59.2.2 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.59.2.1 01-Jul-2007  ad Adapt to callout API change.
 1.60.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.60.2.1 07-Aug-2007  matt Sync with HEAD.
 1.61.8.1 14-Oct-2007  yamt sync with head.
 1.61.6.3 23-Mar-2008  matt sync with HEAD
 1.61.6.2 09-Jan-2008  matt sync with HEAD
 1.61.6.1 06-Nov-2007  matt sync with HEAD
 1.61.4.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.63.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.63.4.1 31-Dec-2007  ad Catch up with buffer cache changes.
 1.63.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.67.12.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.67.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.67.10.1 04-May-2009  yamt sync with head.
 1.67.8.1 17-Jun-2008  yamt sync with head.
 1.67.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.67.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.68.2.1 03-Jul-2008  simonb Sync with head.
 1.69.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.71.10.1 08-Feb-2011  bouyer Sync with HEAD
 1.71.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.71.6.1 05-Mar-2011  rmind sync with head
 1.72.18.1 18-May-2014  rmind sync with head
 1.72.14.2 03-Dec-2017  jdolecek update from HEAD
 1.72.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.72.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.74.2.1 10-Aug-2014  tls Rebase.
 1.76.4.2 06-Jun-2015  skrll Sync with HEAD
 1.76.4.1 06-Apr-2015  skrll Sync with HEAD
 1.78.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.79.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.80.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.81.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.82.12.1 02-Aug-2025  perseant Sync with HEAD
 1.6 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.5 01-Feb-2011  chuck branches: 1.5.92;
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.4 11-Dec-2005  christos branches: 1.4.100; 1.4.106; 1.4.108;
merge ktrace-lwp.
 1.3 19-Apr-2004  wiz Spell removable with only two es. Inspired by jmc@openbsd.
 1.2 03-May-2003  wiz branches: 1.2.2;
DMA, not dma nor Dma.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xyreg.h was added on branch netbsd-1-1 on 1995-10-30 20:58:23 +0000
 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.108.1 08-Feb-2011  bouyer Sync with HEAD
 1.4.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.100.1 05-Mar-2011  rmind sync with head
 1.5.92.1 02-Aug-2025  perseant Sync with HEAD
 1.11 01-Feb-2011  chuck 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.10 28-Jun-2008  tsutsui branches: 1.10.18; 1.10.24; 1.10.26;
Split softc/device_t, with misc cosmetic changes.
 1.9 11-Dec-2005  christos branches: 1.9.74; 1.9.78; 1.9.80; 1.9.82;
merge ktrace-lwp.
 1.8 15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.7 23-Jul-2002  hannken branches: 1.7.6; 1.7.22;
Convert to new device buffer queue interface.

Approved by: Nathan J. Williams <nathanw@netbsd.org>
 1.6 23-Mar-2000  thorpej branches: 1.6.8; 1.6.12; 1.6.20;
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.5 21-Jan-2000  thorpej Update for sys/buf.h/disksort_*() changes.
 1.4 26-Jan-1998  gwr branches: 1.4.14;
Save the "bustype" from our attach args in the controller "softc"
and use that instead of hard-coding BUS_VME32 everywhere.
(The Sun3X needs a more specific bustype value.)
 1.3 17-Oct-1997  gwr branches: 1.3.4;
Move initialization code from xxattach to xx_init and call that
from both xxattach and xxopen instead of calling xxattach from
xxopen with faked up autoconfig args. Fix warnings.
 1.2 07-Jan-1996  thorpej New generic disk framework. Highlights:

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

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

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

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

For usage and architectural details, see the forthcoming disk(9) manual
page.
 1.1 30-Oct-1995  gwr branches: 1.1.2;
New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.2 30-Oct-1995  gwr New from Chuck Cranor: drivers for SMD disks!
xd: Xylogics 753/7053 SMD disk controller
xy: Xylogics 450/451 SMD disk controller
These now compile, but have not been tested.
 1.1.2.1 30-Oct-1995  gwr file xyvar.h was added on branch netbsd-1-1 on 1995-10-30 20:58:24 +0000
 1.3.4.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.4.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.20.1 31-Aug-2002  gehenna catch up with -current.
 1.6.12.1 01-Aug-2002  nathanw Catch up to -current.
 1.6.8.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.22.1 21-Jun-2006  yamt sync with head.
 1.7.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.82.1 03-Jul-2008  simonb Sync with head.
 1.9.80.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.78.1 04-May-2009  yamt sync with head.
 1.9.74.1 29-Jun-2008  mjf Sync with HEAD.
 1.10.26.1 08-Feb-2011  bouyer Sync with HEAD
 1.10.24.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.18.1 05-Mar-2011  rmind sync with head
 1.92 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.91 11-Sep-2021  andvar branches: 1.91.10;
Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.90 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.89 24-Apr-2021  thorpej branches: 1.89.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.88 10-Aug-2012  tsutsui branches: 1.88.54;
Appease gcc -fno-common:
- initialize cn_tab in locore2.c:_bootstrap() for early printf calls
Tested on sun3 (3/160 on TME) and sun3x (real 3/80).

XXX: sun3 with >16MB RAM gets "panic: ubc_init: failed to map ubc_object"
 1.87 29-Jul-2012  matt A little constification
 1.86 26-Oct-2011  mrg branches: 1.86.2;
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.85 26-Jun-2010  tsutsui Pull a similar fix from sparc/dev/zs.c rev 1.119:
Establish interrupt handlers with proper softc per each zs device
rather than sharing them among all zs devices and searching softc
in handlers, to avoid possible recursive lock.
 1.84 13-Jun-2008  cegger branches: 1.84.16; 1.84.18;
use device_lookup_private to get softc
 1.83 28-Apr-2008  martin branches: 1.83.2; 1.83.4;
Remove clause 3 and 4 from TNF licenses
 1.82 29-Mar-2008  tsutsui branches: 1.82.2; 1.82.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.81 04-Dec-2007  tsutsui branches: 1.81.12;
Adapt sun68k ports to recent interrupt handling changes.

XXX: sun2 (m68010) doesn't have CAS instructions.
 1.80 09-Nov-2007  ad branches: 1.80.2;
Call zs_lock_init() to set up the chanstate's lock.
 1.79 11-Mar-2007  tsutsui branches: 1.79.16; 1.79.18; 1.79.22; 1.79.24;
Call zsc_intr_soft() directly on softintr() since spltty()
will be set by each handler (zstty_softint() or kbd_zs_softint()).
 1.78 05-Oct-2006  tsutsui branches: 1.78.4; 1.78.8;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.77 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.76 28-Mar-2006  thorpej branches: 1.76.8; 1.76.10;
Use device_unit().
 1.75 11-Dec-2005  christos branches: 1.75.4; 1.75.6; 1.75.8; 1.75.10; 1.75.12;
merge ktrace-lwp.
 1.74 03-Jun-2005  tsutsui branches: 1.74.2;
Constify.
 1.73 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.72 15-Jul-2003  lukem branches: 1.72.8;
__KERNEL_RCSID()
 1.71 28-Jan-2003  pk branches: 1.71.2;
Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.70 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.69 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.68 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.67 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.66 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.65 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.64 05-Sep-2001  tsutsui branches: 1.64.6; 1.64.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.63 05-Sep-2001  tsutsui Remove register prefixes.
 1.62 30-May-2001  lukem branches: 1.62.2;
add missing #include "opt_kgdb.h"
 1.61 28-May-2001  chs don't abuse cf_unit.
 1.60 06-Mar-2000  thorpej branches: 1.60.6;
- Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
 1.59 22-Nov-1999  jdolecek Debugger()/cpu_Debugger() is always available and always defined/prototyped
in <sys/systm.h> for sun3/sun3x, even in non-DDB case
 1.58 17-Oct-1999  jdolecek branches: 1.58.2;
include opt_ddb.h, so that symbol DDB actually get's defined appropriately
kill local definition of Debugger() - <sys/systm.h> DTRT
don't assume Debugger() is always available and put the call inside #ifdef DDB

Second part of a fix to PR #8637 by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>.
 1.57 27-Mar-1999  wrstuden branches: 1.57.8;
Add pps support. Only enable pps if CLOCAL & !MDMBUF.
 1.56 11-Feb-1999  mycroft Minor cleanup.
Make the initializer for BAUDLO depend on PCLK directly; it was incorrect on
some ports where PCLK is not 4.9152MHz.
XXX Is the default value actually used?
 1.55 03-Feb-1999  mycroft Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
 1.54 08-Jun-1998  gwr Kill the printf: enabling zs interrupts
 1.53 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.52 12-Jan-1998  thorpej branches: 1.52.2;
Update for changes to config.
 1.51 02-Nov-1997  mycroft Set rr0_dcd.
Don't set DCD_IE and CTS_IE here; let the MI code do it.
Handle MDMBUF.
 1.50 06-Oct-1997  gwr branches: 1.50.2;
Tweak the console support a little (more like the sparc version).
 1.49 05-Oct-1997  gwr normalize include order
 1.48 11-Mar-1997  gwr branches: 1.48.4;
Call isr_soft_request() at most once per zshard interrupt.
In the softintr, raise to spltty before calling tty code.
 1.47 10-Feb-1997  gwr Export zs_get_chan_addr() for zs_kgdb.c
Print the "console on ..." in cninit(), and
avoid reference to kbd/kd drivers if NKBD==0
 1.46 31-Jan-1997  gwr branches: 1.46.2;
Forgot to initialize cs->cs_rr0_dcd and fiends in attach.
 1.45 18-Jan-1997  gwr Now that interrupts are enabled AFTER autoconfiguration, put in the
cute little trick where the zs interrupts are enabled as soon as the
zs driver has done its attachments. That allows a console break to
enter the debugger during the rest of autoconfiguration.
 1.44 18-Jan-1997  gwr Use the same names (OBIO_ZS_*) as the sun3x port...
 1.43 17-Dec-1996  gwr Adapt to the new definition of struct zsc_softc
(the zsc_cs[2] members are now POINTERS!)
Also fix warnings...
 1.42 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.41 13-Oct-1996  christos backout previous kprintf change
 1.40 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.39 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.38 17-Jun-1996  gwr branches: 1.38.2;
Use the PROM->input_source setting instead of EEPROM to determine
where the console is, because that is correct if, for example, you
boot with the diag/norm switch set for diagnostics and the EEPROM
is set for keyboard/display.
 1.37 17-May-1996  gwr Rename cs_pclk_div16 to cs_brg_clk to clarify the fact that the
Baud Rate Generator (BRG) clock is not necessarily PCLK/16.
 1.36 04-Apr-1996  cgd update for the fact that config_found() and config_rootfound() now
return pointers. (Check vs. NULL, rather than just boolean tests.)
 1.35 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.34 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.33 16-Feb-1996  gwr No longer need delay2us(), just use delay(2)
 1.32 30-Jan-1996  gwr Eliminate remaining direct references to the z8530 chip
to allow the MD access functions to do delays, etc.
 1.31 24-Jan-1996  gwr Update for the new z8530 driver
 1.30 08-Oct-1995  gwr Minor cleanup.
 1.29 08-Aug-1995  gwr Use old-style function definitions (like the sparc driver).
 1.28 03-Jul-1995  gwr Correct !DDB console abort (thanks to David Brownlee)
 1.27 28-Jun-1995  cgd note that most of dev/ic's contents have changed names
 1.26 27-Jun-1995  gwr Leave modem control lines in correct state on interrupted open.
(From sparc/dev/zs.c)
 1.25 13-Jun-1995  gwr Fix several missing (and REQUIRED) calls to ZS_DELAY()
 1.24 26-Apr-1995  gwr Add xxtty()
 1.23 11-Apr-1995  mycroft Use global 8530 defs.
 1.22 27-Mar-1995  gwr Increase ZSSOFT_PRI from 2 -> 3 now that tty ipl is 4.
 1.21 10-Mar-1995  gwr Synthesize KBD_L1|KBD_UP after return from zsabort.
Simplify PROM mapping stuff, use ee_console.
 1.20 14-Feb-1995  gwr Oops, forgot to lock out interrupts while clearing zssoftpending.
 1.19 11-Jan-1995  gwr Cleanup
 1.18 21-Dec-1994  gwr Fixes for the 110, 160, 260 (leave chip in "vector" mode).
 1.17 17-Dec-1994  gwr Fix kd (keyboard/display) driver kdcngetc/kdcnputc functions.
 1.16 15-Dec-1994  gwr Set params in attach so BREAK works before first real open.
 1.15 13-Dec-1994  gwr Support TIOCGFLAGS, TIOCSFLAGS (from Matthew Green via Theo).
 1.14 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.13 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.12 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 20-Sep-1994  gwr branches: 1.9.2;
Call obio_alloc with just two args (mappings always writable).
 1.8 28-Jun-1994  gwr Make initial tty mode the same as the PROM uses
(so you can read the console messages).
 1.7 30-May-1994  glass have typecast, will compile
 1.6 20-May-1994  gwr Add TIOCSBRK/TIOCCBRK support.
 1.5 06-May-1994  gwr Tracking 4.4 integration
 1.4 05-May-1994  gwr put in some cnputc fixes missed last night
 1.3 04-May-1994  gwr Get initial mappings for console routines.
Use the kd device instead of tty rewiring mess
 1.2 15-Mar-1994  glass zs supposedly works
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.9.2.2 20-Sep-1994  gwr Call obio_alloc with just two args (mappings always writable).
 1.9.2.1 20-Sep-1994  gwr file zs.c was added on branch netbsd-1-0 on 1994-09-20 16:21:49 +0000
 1.38.2.2 17-Jun-1996  gwr Use the PROM->input_source setting instead of EEPROM to determine
where the console is, because that is correct if, for example, you
boot with the diag/norm switch set for diagnostics and the EEPROM
is set for keyboard/display.
 1.38.2.1 17-Jun-1996  gwr file zs.c was added on branch netbsd-1-2 on 1996-06-17 15:17:07 +0000
 1.46.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.46.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.48.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.50.2.1 04-Nov-1997  mellon Pull rev 1.51 up from trunk (mycroft)
 1.52.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.57.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.58.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.60.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.62.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.62.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.64.14.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.64.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.64.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.64.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.64.6.1 05-Sep-2001  nathanw file zs.c was added on branch nathanw_sa on 2002-09-17 21:18:18 +0000
 1.71.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.71.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.71.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.71.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.71.2.1 03-Aug-2004  skrll Sync with HEAD
 1.72.8.1 29-Apr-2005  kent sync with -current
 1.74.2.5 07-Dec-2007  yamt sync with head
 1.74.2.4 15-Nov-2007  yamt sync with head.
 1.74.2.3 03-Sep-2007  yamt sync with head.
 1.74.2.2 30-Dec-2006  yamt sync with head.
 1.74.2.1 21-Jun-2006  yamt sync with head.
 1.75.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.75.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.75.8.1 01-Apr-2006  yamt sync with head.
 1.75.6.1 22-Apr-2006  simonb Sync with head.
 1.75.4.1 09-Sep-2006  rpaulo sync with head
 1.76.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.76.8.1 18-Nov-2006  ad Sync with head.
 1.78.8.2 03-Dec-2007  ad Sync with HEAD.
 1.78.8.1 13-Mar-2007  ad Sync with head.
 1.78.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.79.24.2 08-Dec-2007  mjf Sync with HEAD.
 1.79.24.1 19-Nov-2007  mjf Sync with HEAD.
 1.79.22.1 13-Nov-2007  bouyer Sync with HEAD
 1.79.18.1 09-Jan-2008  matt sync with HEAD
 1.79.16.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.79.16.1 11-Nov-2007  joerg Sync with HEAD.
 1.80.2.1 08-Dec-2007  ad Sync with head.
 1.81.12.3 29-Jun-2008  mjf Sync with HEAD.
 1.81.12.2 02-Jun-2008  mjf Sync with HEAD.
 1.81.12.1 03-Apr-2008  mjf Sync with HEAD.
 1.82.4.3 11-Aug-2010  yamt sync with head.
 1.82.4.2 04-May-2009  yamt sync with head.
 1.82.4.1 16-May-2008  yamt sync with head.
 1.82.2.2 17-Jun-2008  yamt sync with head.
 1.82.2.1 18-May-2008  yamt sync with head.
 1.83.4.1 18-Jun-2008  simonb Sync with head.
 1.83.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.84.18.1 03-Jul-2010  rmind sync with head
 1.84.16.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.86.2.1 30-Oct-2012  yamt sync with head
 1.88.54.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.89.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.91.10.1 02-Aug-2025  perseant Sync with HEAD
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.3 05-Jan-1998  perry branches: 1.3.50; 1.3.58;
RCSID Police.
 1.2 10-Feb-1997  gwr Add zs_get_chan_addr(), zs_kgdb_init()
 1.1 17-Dec-1996  gwr branches: 1.1.4;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.1.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.3.58.1 29-Apr-2005  kent sync with -current
 1.3.50.1 24-Jan-2005  skrll Sync with HEAD.
 1.28 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.27 24-Oct-2023  andvar branches: 1.27.6;
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.26 13-Oct-2012  tsutsui branches: 1.26.18; 1.26.28;
Add a cast to print dev_t. (broken since 64bit dev_t change?) from chs@
XXX: probably no one will use this...
 1.25 28-Apr-2008  martin branches: 1.25.34; 1.25.44;
Remove clause 3 and 4 from TNF licenses
 1.24 17-Oct-2007  garbled branches: 1.24.16; 1.24.18; 1.24.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.23 23-Jun-2007  hauke branches: 1.23.10;
Fix a warning from gcc 4 about stripping the volatile qualifier by a cast
by doing the proper __UNVOLATILE() dance.
 1.22 04-Mar-2007  christos branches: 1.22.2; 1.22.4; 1.22.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 01-Sep-2006  matt branches: 1.21.8;
Remove an unneeded volatile.
 1.20 11-Dec-2005  christos branches: 1.20.4; 1.20.8;
merge ktrace-lwp.
 1.19 22-Jan-2005  chs branches: 1.19.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 15-Jul-2003  lukem branches: 1.18.8;
__KERNEL_RCSID()
 1.17 30-Mar-2003  kristerw branches: 1.17.2;
#include "opt_kgdb.h"
 1.16 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.15 05-Sep-2001  tsutsui branches: 1.15.6; 1.15.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.14 05-Sep-2001  tsutsui Remove register prefixes.
 1.13 03-Feb-1999  mycroft branches: 1.13.22;
Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
 1.12 05-Oct-1997  gwr read regs in the right order
 1.11 12-Feb-1997  gwr branches: 1.11.6;
Actually works now!
 1.10 27-Jan-1997  gwr branches: 1.10.2;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.9 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.8 13-Oct-1996  christos backout previous kprintf change
 1.7 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6 17-Jun-1996  gwr branches: 1.6.2;
KGDB support
 1.5 17-May-1996  gwr Add the version line.
 1.4 17-May-1996  gwr Rename cs_pclk_div16 to cs_brg_clk to clarify the fact that the
Baud Rate Generator (BRG) clock is not necessarily PCLK/16.
 1.3 16-Feb-1996  gwr No longer need delay2us(), just use delay(2)
 1.2 30-Jan-1996  gwr Eliminate remaining direct references to the z8530 chip
to allow the MD access functions to do delays, etc.
 1.1 24-Jan-1996  gwr Update for the new z8530 driver
 1.6.2.2 17-Jun-1996  gwr KGDB support
 1.6.2.1 17-Jun-1996  gwr file zs_kgdb.c was added on branch netbsd-1-2 on 1996-06-17 15:40:37 +0000
 1.10.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.11.6.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.13.22.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.15.14.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.15.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.15.6.1 05-Sep-2001  nathanw file zs_kgdb.c was added on branch nathanw_sa on 2002-09-17 21:18:19 +0000
 1.17.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.18.8.1 29-Apr-2005  kent sync with -current
 1.19.8.2 03-Sep-2007  yamt sync with head.
 1.19.8.1 30-Dec-2006  yamt sync with head.
 1.20.8.1 03-Sep-2006  yamt sync with head.
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.21.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.22.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.22.4.1 11-Jul-2007  mjf Sync with head.
 1.22.2.1 15-Jul-2007  ad Sync with head.
 1.23.10.1 06-Nov-2007  matt sync with HEAD
 1.24.20.1 16-May-2008  yamt sync with head.
 1.24.18.1 18-May-2008  yamt sync with head.
 1.24.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.34.1 30-Oct-2012  yamt sync with head
 1.26.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.26.18.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.27.6.1 02-Aug-2025  perseant Sync with HEAD
 1.5 11-Apr-1995  mycroft Use global 8530 defs.
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 15-Mar-1994  glass zs supposedly works
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 24-Jan-1996  gwr Update for the new z8530 driver
 1.7 11-Apr-1995  mycroft Use global 8530 defs.
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 20-Sep-1994  gwr branches: 1.4.2;
Correct some misinformation about recovery time.
 1.3 04-May-1994  gwr Make ZS_DELAY() use the new delay2us() function.
 1.2 15-Mar-1994  glass zs supposedly works
 1.1 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.4.2.2 20-Sep-1994  gwr Correct some misinformation about recovery time.
 1.4.2.1 20-Sep-1994  gwr file zsvar.h was added on branch netbsd-1-0 on 1994-09-20 16:23:07 +0000
 1.28 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.27 12-Jul-2018  maxv branches: 1.27.36;
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.26 24-Dec-2015  christos branches: 1.26.16; 1.26.18;
fenv for m68k
 1.25 17-Jul-2011  joerg branches: 1.25.12; 1.25.30;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24 09-Feb-2007  ad Merge newlock2 to head.
 1.23 26-Jul-2006  drochner branches: 1.23.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.22 11-Dec-2005  christos branches: 1.22.4; 1.22.8;
merge ktrace-lwp.
 1.21 08-May-2004  kleink branches: 1.21.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.20 18-Jan-2003  thorpej branches: 1.20.2;
Merge the nathanw_sa branch.
 1.19 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.18 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.17 28-Nov-2001  kleink branches: 1.17.8;
No point in installing svr4_machdep.h.
 1.16 19-Sep-2001  thorpej branches: 1.16.4;
Just use <dev/sun/fbio.h>.
 1.15 28-May-2001  chs branches: 1.15.2; 1.15.4;
move the spl*() and IPL_* definitions to intr.h.
 1.14 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.13 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.12 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.11 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.10 26-Jun-2000  kleink branches: 1.10.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.9 29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.8 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.7 23-Dec-1999  kleink C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.6 19-Apr-1999  kleink branches: 1.6.2;
Add COMPAT_SVR4 for m68k.
 1.5 15-Mar-1999  minoura branches: 1.5.4;
Pullin m68k/ieee.h.
 1.4 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.3 12-Jul-1998  veego Add elf_machdep.h to the INCS list.
 1.2 20-Jun-1998  mrg moved <machine/sun_disklabel.h> to <dev/sun/disklabel.h>
 1.1 12-Jun-1998  cgd Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.5.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.6.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.15.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.15.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.15.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.4.5 11-Dec-2002  thorpej Sync with HEAD.
 1.16.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.16.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.16.4.2 10-Nov-2001  scw Kernel mcontext glue for Scheduler Activations on m68k from
Klaus Klein <kleink@netbsd.org>.
 1.16.4.1 19-Sep-2001  scw file Makefile was added on branch nathanw_sa on 2001-11-10 21:22:53 +0000
 1.17.8.1 31-Aug-2002  gehenna catch up with -current.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.21.12.2 26-Feb-2007  yamt sync with head.
 1.21.12.1 30-Dec-2006  yamt sync with head.
 1.22.8.1 11-Aug-2006  yamt sync with head
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.23.4.1 01-Feb-2007  ad Header file cleanup.
 1.25.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.12.1 03-Dec-2017  jdolecek update from HEAD
 1.26.18.1 10-Jun-2019  christos Sync with HEAD
 1.26.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.36.1 02-Aug-2025  perseant Sync with HEAD
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.11 13-Dec-1996  gwr Files with just an include line do not need a wrapper.
 1.10 08-Oct-1996  cgd repoint at shared aout_machdep.h, not exec.h
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  gwr Remove some unnecessary junk.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.7 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.2 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.27 13-Oct-2012  tsutsui struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.26 28-Apr-2008  martin branches: 1.26.34; 1.26.44;
Remove clause 3 and 4 from TNF licenses
 1.25 04-Mar-2007  christos branches: 1.25.40; 1.25.42; 1.25.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 05-Oct-2006  tsutsui branches: 1.24.4;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.23 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.22 11-Dec-2005  christos branches: 1.22.20; 1.22.22;
merge ktrace-lwp.
 1.21 26-Aug-2005  drochner s/locdesc_t/int/g
 1.20 03-Jul-2005  he branches: 1.20.2;
Make the bus_scan() prototype match the function declaration.
 1.19 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 08-Feb-1998  gwr branches: 1.18.48; 1.18.56;
Factor *peek out of bus_subr.c and move it to autoconf.c
(to reduce duplication). Add bus_tmapin and bus_tmapout
for use in probe functions (gets a temporary mapping).
Add bus_mapout() to undo bus_mapin() if needed.
 1.17 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.16 28-Apr-1997  gwr branches: 1.16.10;
Declare peek_long().
 1.15 27-Jan-1997  gwr Let bus_mapin() return void *
 1.14 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.13 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.12 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.11 08-Oct-1996  jtc Add const qualifer to second arg of bus_print
 1.10 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.9 11-Jan-1995  gwr Cleanup
 1.8 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.7 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.6 23-Nov-1994  gwr New cd_match prototype.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.16.10.1 27-Jan-1998  gwr Define bus types for OBIO, OBMEM, and every VME space.
(The Sun3X needs separate methods for each VME space.)
Use the same values on both Sun3 and Sun3X.
 1.18.56.1 29-Apr-2005  kent sync with -current
 1.18.48.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.3 03-Sep-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.22.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.22.20.1 18-Nov-2006  ad Sync with head.
 1.24.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.25.44.1 16-May-2008  yamt sync with head.
 1.25.42.1 18-May-2008  yamt sync with head.
 1.25.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.34.1 30-Oct-2012  yamt sync with head
 1.3 23-Nov-2002  kristerw Make this identical to the other m68k machine/bswap.h by including
m68k/bswap.h instead of sys/bswap.h.

Solves part of PR toolchain/18314.
 1.2 21-Aug-1999  simonb branches: 1.2.20; 1.2.30;
Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2.30.1 19-Dec-2002  lukem Pull up revision 1.3 (requested by kristerw in ticket #1038):
Make this identical to the other m68k machine/bswap.h by including
m68k/bswap.h instead of sys/bswap.h.
Solves part of PR toolchain/18314.
 1.2.20.1 11-Dec-2002  thorpej Sync with HEAD.
 1.1 01-Oct-2006  tsutsui branches: 1.1.2; 1.1.4; 1.1.8;
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.1.8.2 30-Dec-2006  yamt sync with head.
 1.1.8.1 01-Oct-2006  yamt file bus.h was added on branch yamt-lazymbuf on 2006-12-30 20:47:12 +0000
 1.1.4.2 18-Nov-2006  ad Sync with head.
 1.1.4.1 01-Oct-2006  ad file bus.h was added on branch newlock2 on 2006-11-18 21:29:34 +0000
 1.1.2.2 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.1.2.1 01-Oct-2006  tsutsui file bus.h was added on branch yamt-splraiseipl on 2006-10-06 13:27:04 +0000
 1.2 24-Jan-1995  gwr Let the common file deal with multiple inclusion.
 1.1 19-Jan-1995  jtc This file, which will be included by <sys/cdefs.h>, will contain macros
such as __warn_references() and __weak_reference() which are actually
machine dependant. This will make it easier for ports that are being
bootstraped with ELF and ECOFF based toolchains.

This change also introduces a new macro, _C_LABEL(x). _C_LABEL expands
its argument, an identifier, to a character string of the identifier
name as it is represented in an object file.

For most ports, _C_LABEL(x) will expand to "_x", for ELF based ports
_C_LABEL(x) will expand to "x".
 1.7 28-Mar-2023  andvar s/interrput/interrupt/ and s/accesss/access/ in comments.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 28-Sep-2003  cl u_int short -> u_short for gcc3
 1.4 03-May-2003  wiz branches: 1.4.2;
DMA, not dma nor Dma.
 1.3 07-Apr-1995  gwr First cut at cgtwo driver. Not quite right yet.
 1.2 21-Mar-1995  gwr correct the file name
 1.1 21-Mar-1995  gwr This is needed by the Xsun servers.
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.18 06-Oct-1997  gwr branches: 1.18.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.17 28-Apr-1997  gwr branches: 1.17.4;
Fix declaration of get_control_byte().
 1.16 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.15 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.14 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.13 10-Oct-1995  gwr New function: set_segmap_allctx()
 1.12 11-Feb-1995  gwr minor cleanup
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.7 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.4 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.3 27-Jul-1993  glass new pmap module
 1.2 29-Jun-1993  glass additional needed functionality
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.17.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 25-Jan-1998  gwr Now in ../sun3
 1.39 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.38 11-Dec-2005  christos branches: 1.38.20; 1.38.22;
merge ktrace-lwp.
 1.37 22-Jan-2005  chs branches: 1.37.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.36 22-Sep-2004  yamt branches: 1.36.4;
move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.35 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
as FPU state), and is the last potentially blocking operation;
all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
 1.34 22-Sep-2003  tsutsui Remove #ifdef _KERNEL inside #ifdef _KERNEL.
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 18-Jan-2003  thorpej branches: 1.32.2;
Merge the nathanw_sa branch.
 1.31 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.30 14-May-2002  matt Eliminate more commons or redundant declarations.
 1.29 30-May-2001  mrg branches: 1.29.2; 1.29.8;
use _KERNEL_OPT
 1.28 22-Feb-2001  chs branches: 1.28.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.27 04-Feb-2001  tsutsui Move cachectl1() declaration from sun3/machdep.h to include/cpu.h;
it is refered by sys/compat/linux/arch/m68k/linux_machdep.c.

XXX: all declarations in machdep.h should be moved into cpu.h?
 1.26 03-Feb-2001  tsutsui Include <m68k/m68k.h> to use m68k common definitions.
 1.25 25-Aug-2000  thorpej Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
 1.24 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.23 10-Aug-1999  thorpej branches: 1.23.2;
Define cpu_number() as discussed on tech-smp.
 1.22 20-Mar-1997  gwr This needs muli-include protection now.
 1.21 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.20 21-Dec-1995  mycroft Remove deprecated cpu_setstack().
 1.19 28-Jun-1995  cgd remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
 1.18 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.17 05-May-1995  cgd define BROKEN_SWAP and/or cpu_swapout as appropriate.
 1.16 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.15 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.14 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 28-Jun-1994  gwr Make setsoft* use the real software interrupt register
provided on Sun machines (instead of simulating mtpr).
 1.11 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.10 10-May-1994  gwr Add CTL_MACHDEP stuff.
 1.9 06-May-1994  gwr Tracking 4.4 integration
 1.8 05-May-1994  gwr Track renamed proc flags.
 1.7 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.6 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.3 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.2 26-Jun-1993  glass removed dumb define for enablertclock()
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.23.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.23.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.23.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.28.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.29.8.6 03-Dec-2002  gmcgarry Add missing prototypes.
 1.29.8.5 03-Dec-2002  gmcgarry Use cpu_proc_fork().
 1.29.8.4 11-Nov-2002  nathanw Catch up to -current
 1.29.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.29.8.2 08-Dec-2001  thorpej Add a cpu_proc_fork(), called from uvm_proc_fork(), which takes care
of machine-dependent handling a fork() time (this is different from
forking the actual context in an LWP world). #define it away on
platforms which do not need it.

Problem noted by Gregory McGarry.
 1.29.8.1 30-May-2001  thorpej file cpu.h was added on branch nathanw_sa on 2001-12-08 08:22:43 +0000
 1.29.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.32.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.32.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.32.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.1 03-Aug-2004  skrll Sync with HEAD
 1.36.4.1 29-Apr-2005  kent sync with -current
 1.37.8.1 30-Dec-2006  yamt sync with head.
 1.38.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.38.20.1 18-Nov-2006  ad Sync with head.
 1.8 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7 27-Jan-1997  gwr branches: 1.7.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.7.14.1 25-Jan-1998  gwr Obsolete
 1.19 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.18 02-Feb-2012  tsutsui branches: 1.18.6;
Don't enable DB_MACHINE_COMMANDS on crash(8) (i.e. !defined(_KERNEL) case).
No easy way to switch sun3 and sun3x at run time for now.

Briefly tested by "build.sh -U -m sun3 build".
 1.17 11-Dec-2005  christos branches: 1.17.112; 1.17.116;
merge ktrace-lwp.
 1.16 03-Jun-2005  tsutsui Remove declarations for db_read_bytes() and db_write_bytes().
They are in <ddb/db_access.h>.
 1.15 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14 13-May-2002  matt branches: 1.14.10; 1.14.18;
Nuke local extern label_t *db_recover; it's now in <ddb/db_extern.h>
 1.13 09-Nov-2001  thorpej branches: 1.13.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.12 05-Sep-2001  tsutsui branches: 1.12.4;
vm_offset_t -> db_addr_t
 1.11 22-Feb-2001  chs branches: 1.11.4;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.10 09-Jun-1998  tv branches: 1.10.14;
Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
 1.9 18-Jan-1997  gwr Add declaration for db_recover. Also fix copyright.
 1.8 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.7 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 09-Jan-1994  cgd stub
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 08-Aug-1993  glass various changes
 1.10.14.1 12-Mar-2001  bouyer Sync with HEAD.
 1.11.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.12.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.13.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.13.2.1 09-Nov-2001  nathanw file db_machdep.h was added on branch nathanw_sa on 2002-06-20 03:41:43 +0000
 1.14.18.1 29-Apr-2005  kent sync with -current
 1.14.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.10.1 24-Jan-2005  skrll Sync with HEAD.
 1.17.116.1 18-Feb-2012  mrg merge to -current.
 1.17.112.1 17-Apr-2012  yamt sync with head
 1.18.6.1 03-Dec-2017  jdolecek update from HEAD
 1.9 30-Aug-2011  bouyer Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.6 15-Nov-2003  bouyer branches: 1.6.8;
Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
groveling code to find a NetBSD disklabel in the first sector (so that it
can find a label at the old sun3 LABELOFFSET) as a fallback is not
label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
a DIOCWDINFO after writing the disklabel to the raw partition in the
-r/-I case (so that the kernel can convert the label if needed).
 1.5 24-Oct-1998  kleink branches: 1.5.46;
Remove argument name from function declaration.
 1.4 04-Mar-1997  gwr Add declaration for isbad().
 1.3 10-Nov-1995  gwr branches: 1.3.8;
Fix a comment while I'm here...
 1.2 24-May-1995  gwr branches: 1.2.2;
Make struct cpu_disklabel hold the Sun disk label.
 1.1 14-Oct-1994  cgd move arch dependence to archs. clean up a bit. deal with weird MAXPARTITONS.
 1.2.2.1 10-Nov-1995  gwr Update from HEAD
 1.3.8.1 12-Mar-1997  is Merge in changes from The Trunk
 1.5.46.4 24-Jan-2005  skrll Sync with HEAD.
 1.5.46.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.46.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.46.1 03-Aug-2004  skrll Sync with HEAD
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.13 28-Apr-2008  martin 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 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 05-Feb-1998  gwr branches: 1.9.48; 1.9.56;
Merge arch/sun3x into arch/sun3
 1.8 22-Jan-1998  gwr branches: 1.8.2;
Use the same names as the sun3x (DVMA_MAP_*)
 1.7 17-Oct-1997  gwr Make DVMA space pointers (void *) like the sun3x.
 1.6 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.5 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.2 16-Feb-1996  gwr Fix comment
 1.1 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.8.2.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.9.56.1 29-Apr-2005  kent sync with -current
 1.9.48.1 24-Jan-2005  skrll 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.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.12 20-Jul-2024  andvar fix typos in comments, mainly s/harware/hardware/.
 1.11 28-Apr-2008  martin branches: 1.11.124;
Remove clause 3 and 4 from TNF licenses
 1.10 02-Apr-2003  thorpej branches: 1.10.104; 1.10.106; 1.10.108;
Use PAGE_SIZE rather than NBPG.
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 22-Jan-1998  gwr branches: 1.8.4;
Use the same names as the sun3x (DVMA_MAP_*)
 1.7 17-Oct-1997  gwr Make DVMA space pointers (void *) like the sun3x.
 1.6 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.5 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.2 16-Feb-1996  gwr Fix comment
 1.1 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.8.4.1 27-Jan-1998  gwr Remove common stuff (now in dvma.h)
 1.10.108.1 16-May-2008  yamt sync with head.
 1.10.106.1 18-May-2008  yamt sync with head.
 1.10.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.124.1 02-Aug-2025  perseant Sync with HEAD
 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 02-Apr-2003  thorpej branches: 1.6.104; 1.6.106; 1.6.108;
Use PAGE_SIZE rather than NBPG.
 1.5 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.4 22-Jan-1998  gwr branches: 1.4.4;
Change our DVMA map from the last 16MB to the last 1MB because that is
the only part that is visible to VME masters, and is adequate space.
This allows the "si" driver (on VME) to use DMA transfers.
 1.3 16-Oct-1997  gwr cosmetic
 1.2 07-Oct-1997  gwr Add stuff for the ie driver
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.10;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.4.1 27-Jan-1998  gwr Remove common stuff (now in dvma.h)
 1.6.108.1 16-May-2008  yamt sync with head.
 1.6.106.1 18-May-2008  yamt sync with head.
 1.6.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.124.1 02-Aug-2025  perseant Sync with HEAD
 1.18 28-Apr-2008  martin 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 19-Jun-2005  thorpej Move common Sun3/Sun4 EEPROM definitions in to <dev/sun/eeprom.h>
 1.15 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14 05-Feb-1998  gwr branches: 1.14.48; 1.14.56;
Merge arch/sun3x into arch/sun3
 1.13 18-Mar-1997  gwr branches: 1.13.10;
Moved the _KERNEL declarations to machdep.h
 1.12 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.11 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 11-May-1995  jtc KERNEL -> _KERNEL
 1.8 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.7 10-Mar-1995  gwr Declare ee_console (for drivers).
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 20-Sep-1994  gwr branches: 1.4.2;
Add prototype for ee_get_byte(), etc.
 1.3 04-May-1994  gwr Add EE_CONS_P4OPT, fix boilerplate.
 1.2 16-Mar-1994  glass copyright change
 1.1 16-Mar-1994  glass eeprom stuff
 1.4.2.2 20-Sep-1994  gwr Add prototype for ee_get_byte(), etc.
 1.4.2.1 20-Sep-1994  gwr file eeprom.h was added on branch netbsd-1-0 on 1994-09-20 16:26:01 +0000
 1.13.10.1 27-Jan-1998  gwr Merge in Sun3X specific stuff (i.e. 3/80 diag "switch").
 1.14.56.1 29-Apr-2005  kent sync with -current
 1.14.48.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.48.1 24-Jan-2005  skrll 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.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 12-Jul-1998  thorpej Basic elf_machdep.h for m68k; doesn't include relocations, yet.
 1.7 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.6 21-Nov-1994  gwr branches: 1.6.36;
Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.2 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.6.36.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1 17-Mar-2000  mycroft branches: 1.1.6;
In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 17-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.10 08-Oct-1996  cgd moved to aout_machdep.h (via repository copy)
 1.9 08-Sep-1996  thorpej Use <m68k/exec.h>.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  gwr Remove some unnecessary junk.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.2 18-Oct-1993  pk Put definition of __LDPGSZ and `struct relocation_info' where they belong:
in <machine/exec.h>.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.4 19-Sep-2001  thorpej Just use <dev/sun/fbio.h>.
 1.3 21-Nov-1994  gwr branches: 1.3.46; 1.3.48; 1.3.50;
Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 08-Aug-1994  gwr branches: 1.1.2;
Added for X11 (at Theo's suggestion).
 1.1.2.2 08-Aug-1994  gwr Added for X11 (at Theo's suggestion).
 1.1.2.1 08-Aug-1994  gwr file fbio.h was added on branch netbsd-1-0 on 1994-08-08 21:14:16 +0000
 1.3.50.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.48.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.46.1 16-Aug-2001  tv Pullup [jdolecek]:

sys/arch/amiga/dev/grf_cl.c 1.26
sys/arch/amiga/dev/grfioctl.h 1.14
sys/arch/hpcmips/dev/plumvideo.c 1.20
sys/arch/macppc/dev/ofb.c 1.25
sys/arch/sparc/dev/cgtwo.c 1.35
sys/arch/sparc/include/fbio.h patch
sys/arch/sparc64/include/fbio.h patch
sys/arch/sun3/dev/cg2.c 1.14
sys/arch/sun3/include/fbio.h patch
sys/dev/pci/tga.c 1.35
sys/dev/tc/cfb.c 1.28
sys/dev/tc/mfb.c 1.27
sys/dev/tc/sfb.c 1.46
sys/dev/tc/sfbplus.c 1.10 via patch
sys/dev/tc/tfb.c 1.30
sys/dev/tc/xcfb.c 1.23
sys/net/if_ppp.c 1.71

Use unsigned variable types to make bounds checking more correct.
 1.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:46 +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.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 20-Jun-1995  jtc Wrap with #ifndef _XXX_FLOAT_H_/#define _XXX_FLOAT_H_/ ... /#endif.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.2 08-Aug-1993  glass various changes
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.22 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.21 11-Dec-2005  christos branches: 1.21.74; 1.21.76; 1.21.78;
merge ktrace-lwp.
 1.20 19-Jun-2005  thorpej Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.19 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 04-Mar-1999  gwr branches: 1.18.42; 1.18.50;
Add IDPROM_CKSUM_SIZE
 1.17 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.16 17-Oct-1997  gwr branches: 1.16.4;
Declare functions for _STANDALONE too.
 1.15 27-Jan-1997  gwr Let idprom_init() have void return.
 1.14 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.13 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.12 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.11 11-May-1995  jtc KERNEL -> _KERNEL
 1.10 11-Feb-1995  gwr minor cleanup
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 05-Aug-1993  glass gets to consinit() and blows up
 1.3 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.2 30-Jul-1993  glass bogus placeholder obio addr
 1.1 29-Jun-1993  glass added /dev/idprom driver :), doesn't compile yet
 1.16.4.1 27-Jan-1998  gwr Define ID codes for both Sun3 and Sun3X models.
 1.18.50.1 29-Apr-2005  kent sync with -current
 1.18.42.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.42.1 24-Jan-2005  skrll Sync with HEAD.
 1.21.78.1 16-May-2008  yamt sync with head.
 1.21.76.1 18-May-2008  yamt sync with head.
 1.21.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 30-Aug-1999  mycroft A foolish consistency.
 1.1 15-Mar-1999  minoura Pullin m68k/ieee.h.
 1.3 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 16-Apr-1995  gwr typo
 1.1 09-Apr-1995  mycroft Move fp_except and fp_rnd definitions to machine/include.
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:44 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:19 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:13 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:54:58 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:20:03 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:54:59 +0000
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.1.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.8 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.7 29-Mar-2006  yamt branches: 1.7.8; 1.7.10;
implement splraiseipl() for sun2 and sun3. reviewed by Izumi Tsutsui.
 1.6 16-Feb-2006  perry branches: 1.6.2; 1.6.4; 1.6.6;
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.5 24-Dec-2005  perry branches: 1.5.2; 1.5.4; 1.5.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 22-Jan-2005  chs branches: 1.3.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.2 16-Dec-2001  gmcgarry branches: 1.2.16; 1.2.24;
Make this compile with new toolchain.
 1.1 28-May-2001  chs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
move the spl*() and IPL_* definitions to intr.h.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 28-May-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-01-08 00:28:18 +0000
 1.1.6.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 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.2 30-Dec-2006  yamt sync with head.
 1.3.8.1 21-Jun-2006  yamt sync with head.
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.5.2.1 18-Feb-2006  yamt sync with head.
 1.6.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.6.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.6.2.1 01-Apr-2006  yamt sync with head.
 1.7.10.3 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.7.10.2 19-Sep-2006  yamt implement new api for sun3.
 1.7.10.1 19-Sep-2006  yamt revert old version of splraiseipl().
 1.7.8.1 18-Nov-2006  ad Sync with head.
 1.11 17-Dec-1996  gwr The declarations for isr_add_xxx are now in autoconf.h
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.8 11-Jan-1995  gwr Cleanup
 1.7 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 10-Aug-1993  glass new file for interrupt handling
 1.6 27-Aug-2002  uwe Make sun ports use common keyboard/firm events related includes
from dev/sun.
 1.5 05-Oct-1997  gwr branches: 1.5.32; 1.5.36; 1.5.44;
cosmetic
 1.4 03-Oct-1997  gwr Declare kbd_docmd()
 1.3 24-Jan-1996  gwr branches: 1.3.12;
Update for the new z8530 driver
 1.2 24-May-1995  gwr Sunc with sparc version (adds key repeat capability)
 1.1 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.3.12.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.44.1 31-Aug-2002  gehenna catch up with -current.
 1.5.36.1 27-Aug-2002  nathanw Catch up to -current.
 1.5.32.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5 27-Aug-2002  uwe Make sun ports use common keyboard/firm events related includes
from dev/sun.
 1.4 24-Jan-1996  gwr branches: 1.4.46; 1.4.50; 1.4.58;
Update for the new z8530 driver
 1.3 08-Aug-1995  gwr Cosmetic (fix order)
 1.2 24-May-1995  gwr Sunc with sparc version (adds key repeat capability)
 1.1 01-Dec-1994  gwr Export some headers that X will want, and minor clean-up.
 1.4.58.1 31-Aug-2002  gehenna catch up with -current.
 1.4.50.1 27-Aug-2002  nathanw Catch up to -current.
 1.4.46.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4 09-Apr-1997  thorpej Use <m68k/kcore.h>
 1.3 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.2 21-Nov-1996  gwr Copyright assigned to The NetBSD Foundation
 1.1 05-May-1996  gwr Used by the new libkvm
 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 05-Feb-1998  gwr branches: 1.3.48; 1.3.56;
Merge arch/sun3x into arch/sun3
 1.2 28-Apr-1997  gwr branches: 1.2.10;
Add a kernel declarations section.
 1.1 18-Mar-1997  gwr Add /dev/leds (closes PR#2172 from der Mouse)
 1.2.10.1 27-Jan-1998  gwr add leds_init
 1.3.56.1 29-Apr-2005  kent sync with -current
 1.3.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 23-Jul-1998  gwr Make this like the other redirect includes.
 1.7 09-Jan-1998  perry multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom)
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 26-Jul-1994  gwr branches: 1.4.2;
No longer redefine CLK_TCK because JTC says the value is arbitrary
and the redefinition caused noisy warnings.
 1.3 04-Feb-1994  glass branches: 1.3.2;
sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.3.2.1 26-Jul-1994  cgd From trunk.
 1.4.2.2 26-Jul-1994  gwr No longer redefine CLK_TCK because JTC says the value is arbitrary
and the redefinition caused noisy warnings.
 1.4.2.1 26-Jul-1994  gwr file limits.h was added on branch netbsd-1-0 on 1994-07-26 18:15:19 +0000
 1.4 17-Sep-2006  tsutsui 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.3 25-Jan-2006  christos branches: 1.3.18;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 31-Oct-2001  thorpej branches: 1.2.2; 1.2.34; 1.2.46;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.1 22-Feb-2001  chs branches: 1.1.4; 1.1.6; 1.1.8;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.1.8.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file loadfile_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:29:36 +0000
 1.2.46.1 01-Feb-2006  yamt sync with head.
 1.2.34.2 30-Dec-2006  yamt sync with head.
 1.2.34.1 21-Jun-2006  yamt sync with head.
 1.2.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:50 +0000
 1.3.18.1 18-Nov-2006  ad Sync with head.
 1.1 29-Apr-2000  thorpej branches: 1.1.6;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +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:12 +0000
 1.13 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.12 06-Oct-1997  gwr branches: 1.12.4;
Move some of the VM initialization work from _startup.c to pmap.c
where it is normally found.
 1.11 05-Oct-1997  gwr Do kernel core header initialization a little differently.
 1.10 29-May-1997  gwr branches: 1.10.4;
Define getsr() as _getsr() for backward compatibility.
 1.9 28-Apr-1997  gwr Moved leds_* declarations into leds.h
 1.8 09-Apr-1997  thorpej regdump() is prototyped in m68k/cpu.h now.
 1.7 18-Mar-1997  gwr Moved the _KERNEL declarations to machdep.h
 1.6 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.5 11-Feb-1997  gwr Change most occurrences of "struct frame" (union of all frames formats)
to "struct trapframe" (the minimal frame) because in most cases, all we
care about is the minimal, invariant part. Further, if the declaration
says we have an arg of type "frame" (big union), then KGDB will try to
print the whole bloody thing out whether you want to see it or not.
 1.4 04-Feb-1997  perry branches: 1.4.2;
Nuke some options GENERIC residue.
 1.3 27-Jan-1997  gwr Just declare the sunmon_* functions here. No need for sunmon.h
 1.2 27-Jan-1997  gwr Pull out things now declared elsewhere.
 1.1 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.4.1 25-Jan-1998  gwr Now in ../sun3
 1.1 23-Dec-1999  kleink branches: 1.1.6;
C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 20:27:54 +0000
 1.7 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.6 28-Apr-2008  martin branches: 1.6.124;
Remove clause 3 and 4 from TNF licenses
 1.5 14-May-1997  jeremy branches: 1.5.152; 1.5.154; 1.5.156;
Long awaited MI/MD separation completed.
 1.4 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.3 23-Jan-1997  gwr Rename members of struct mmu_rootptr, and add a comment. (From Jeremy)
 1.2 16-Jan-1997  gwr Add an introductory comment about pte.h vs mc68851.h
Move sun3x_round_up_page() to pte.h
Define struct mmu_rootptr here.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.156.1 16-May-2008  yamt sync with head.
 1.5.154.1 18-May-2008  yamt sync with head.
 1.5.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.124.1 02-Aug-2025  perseant Sync with HEAD
 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.4 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.30 24-Jun-2023  msaitoh Fix typo in comment.
 1.29 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.28 01-Oct-2006  tsutsui branches: 1.28.52; 1.28.54; 1.28.56;
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.27 11-Dec-2005  christos branches: 1.27.20; 1.27.22;
merge ktrace-lwp.
 1.26 03-Jun-2005  tsutsui branches: 1.26.2;
Constify.
 1.25 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.24 22-Feb-2001  chs branches: 1.24.24; 1.24.32;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.23 05-Feb-1998  gwr branches: 1.23.14;
Merge arch/sun3x into arch/sun3
 1.22 05-Feb-1997  gwr branches: 1.22.14;
sync with the sun3x version
 1.21 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.20 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.19 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.18 13-Oct-1996  christos backout previous kprintf change
 1.17 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.16 07-Feb-1995  gwr Add saio.h and move relevant struct from mon.h into it.
 1.15 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.14 26-Oct-1994  cgd new RCS ID format.
 1.13 20-Sep-1994  gwr branches: 1.13.2;
Cleanup, fix mon_reboot()
 1.12 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.11 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.10 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.9 08-Aug-1993  glass various changes
 1.8 05-Aug-1993  glass gets to consinit() and blows up
 1.7 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.6 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.5 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.4 27-Jul-1993  glass new pmap module
 1.3 29-Jun-1993  glass additional needed functionality
 1.2 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.13.2.2 20-Sep-1994  gwr Cleanup, fix mon_reboot()
 1.13.2.1 20-Sep-1994  gwr file mon.h was added on branch netbsd-1-0 on 1994-09-20 16:26:41 +0000
 1.22.14.1 27-Jan-1998  gwr The last section that used to be ifdef sun3/3x is now a union
so the boot programs can use either variant as appropriate.
 1.23.14.1 12-Mar-2001  bouyer Sync with HEAD.
 1.24.32.1 29-Apr-2005  kent sync with -current
 1.24.24.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.24.24.1 24-Jan-2005  skrll Sync with HEAD.
 1.26.2.1 30-Dec-2006  yamt sync with head.
 1.27.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.27.20.1 18-Nov-2006  ad Sync with head.
 1.28.56.1 16-May-2008  yamt sync with head.
 1.28.54.1 18-May-2008  yamt sync with head.
 1.28.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 25-Jun-1993  glass adding include files...not much of this works
 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:35 +0000
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.21 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.20 28-Apr-1997  gwr branches: 1.20.10;
Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.19 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.18 18-Jan-1997  gwr Use the same names (OBIO_ZS_*) as the sun3x port so we can share zs.
 1.17 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.16 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.15 30-Oct-1996  gwr cosmetic...
 1.14 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.13 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.12 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 20-Sep-1994  gwr branches: 1.10.2;
Add obio_find_mapping(), kill xxx_va gunk.
 1.9 04-May-1994  gwr Add zs0_va, zs1_va
 1.8 16-Mar-1994  glass eeprom stuff
 1.7 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 08-Aug-1993  glass various changes
 1.10.2.2 20-Sep-1994  gwr Add obio_find_mapping(), kill xxx_va gunk.
 1.10.2.1 20-Sep-1994  gwr file obio.h was added on branch netbsd-1-0 on 1994-09-20 16:28:01 +0000
 1.20.10.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 27-Jan-1997  gwr branches: 1.8.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.8.14.1 25-Jan-1998  gwr Now in ../sun3 or ../sun3x
 1.62 31-May-2021  simonb Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE is
referenced since some sources include <machine/param.h>.
 1.61 11-Aug-2012  tsutsui branches: 1.61.56;
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.
 1.60 10-Feb-2012  para branches: 1.60.2;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.59 08-Feb-2011  rmind branches: 1.59.4; 1.59.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.58 15-Oct-2010  tsutsui branches: 1.58.2; 1.58.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.57 11-Dec-2005  christos branches: 1.57.98; 1.57.100;
merge ktrace-lwp.
 1.56 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.55 07-Aug-2003  agc branches: 1.55.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.54 01-Jun-2002  nathanw branches: 1.54.6;
Explicitly include <arch/sun3/include/param3{,x}.h> rather than
<machine/param3{,x}.h>, so that this file can be included on non-sun3 builds.
 1.53 28-May-2001  chs branches: 1.53.2; 1.53.8; 1.53.16; 1.53.18;
move the spl*() and IPL_* definitions to intr.h.
 1.52 28-May-2001  chs make sun3x work again after the recent change to the m68k cpu_kcore_hdr:
allocate a page for dumps like the sun3 does rather than using part of
the msgbuf page. this also lets the msgbuf use the full msgbuf page.
 1.51 11-Feb-2000  thorpej branches: 1.51.6;
Update for the NKMEMPAGES changes.
 1.50 04-Dec-1999  ragge CL* discarding.
 1.49 05-Apr-1999  gwr branches: 1.49.2; 1.49.8; 1.49.14;
Make it clear that MSGBUFSIZE is not user-adjustable.
 1.48 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.47 03-Oct-1997  gwr branches: 1.47.4;
Increase MSGBUFOFF to 512 so we can be sure there is room for a
kernel core header before the message buffer.
 1.46 02-Oct-1997  gwr Fix MSGBUFSIZE
 1.45 20-Sep-1997  leo Correct for the extra member in 'struct kern_msgbuf' when calculating
the number of bytes we want to allocate.
 1.44 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.43 10-Jul-1997  veego branches: 1.43.2;
Restore the define of UPAGES.
 1.42 10-Jun-1997  veego Define NBSG from (1 << SEGSHIFT) and move some variables before
<m68k/param.h>.
 1.41 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.40 27-Feb-1997  gwr Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.39 27-Feb-1997  gwr Allow option MCLSHIFT=x to control MCLBYTES etc.
 1.38 26-Feb-1997  gwr Use ALIGNBYTES in the new ALIGNED_POINTER macro.
(That is always good enough on the m68k.)
 1.37 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.36 18-Jan-1997  gwr branches: 1.36.4;
Move sun3_btop (etc.) macros from param.h to pte.h
 1.35 13-Dec-1996  gwr Define MAXBSIZE as 32KB to limit the size clustered transfers.
 1.34 04-Mar-1996  cgd add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
 1.33 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.32 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.31 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.30 10-Nov-1995  gwr Need to define KERNTEXTOFF for kvm_mkdb
 1.29 27-Jun-1995  gwr branches: 1.29.2;
Nuke user-mode DELAY() macro.
 1.28 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.27 13-Jun-1995  gwr Provide delay2us as an inline and make it reasonably accurate,
but conservative (long) by a factor of about 1.25
 1.26 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.25 27-Mar-1995  gwr Put spltty at level 4 and adjust others appropriately.
Also, improve the inline _spl() and move it to psl.h
 1.24 18-Mar-1995  cgd don't be so quick to cast macro arguments to unsigned; if the
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
 1.23 28-Nov-1994  gwr cosmetic
 1.22 23-Nov-1994  gwr Add USPACE
 1.21 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.20 26-Oct-1994  gwr Remove some unnecessary junk.
 1.19 26-Oct-1994  cgd new RCS ID format.
 1.18 20-Sep-1994  gwr branches: 1.18.2;
Kill CLOCK_VA, INTERREG_VA. Do spl0() and splx(x) inline too.
 1.17 16-Sep-1994  jtc asm -> __asm (PR #463).
 1.16 23-Aug-1994  gwr Add USPACE
 1.15 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.14 04-May-1994  gwr Make the DELAY macro call the new delay() function.
 1.13 02-May-1994  glass ugh. splimp is the greater of splnet and splbio now. used by pmap module for splpmap()
 1.12 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.11 12-Dec-1993  glass MACHINE_ARCH
 1.10 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.9 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.8 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.7 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.6 08-Aug-1993  glass various changes
 1.5 05-Aug-1993  glass gets to consinit() and blows up
 1.4 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.3 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.2 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.18.2.2 20-Sep-1994  gwr Kill CLOCK_VA, INTERREG_VA. Do spl0() and splx(x) inline too.
 1.18.2.1 20-Sep-1994  gwr file param.h was added on branch netbsd-1-0 on 1994-09-20 16:31:04 +0000
 1.29.2.1 10-Nov-1995  gwr Update from HEAD
 1.36.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.43.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.43.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.47.4.3 05-Feb-1998  gwr Remove _KVA_MASK
 1.47.4.2 04-Feb-1998  gwr Move UPAGES into the common file.
 1.47.4.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.49.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.49.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.49.2.2 05-Apr-1999  gwr Make it clear that MSGBUFSIZE is not user-adjustable.
 1.49.2.1 05-Apr-1999  gwr file param.h was added on branch netbsd-1-4 on 1999-04-05 14:34:19 +0000
 1.51.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.53.18.2 09-Sep-2003  lukem Apply patch from Matthias Scheler to fix the sun3 build after the pullup
of ticket 1434 broke it.
[tron, ticket #1453]
 1.53.18.1 01-Jun-2002  tv Pull up revision 1.54 (requested by nathanw in ticket #115):
Explicitly include <arch/sun3/include/param3{,x}.h> rather than
<machine/param3{,x}.h>, so that this file can be included on non-sun3 builds.
 1.53.16.1 15-Jul-2002  gehenna catch up with -current.
 1.53.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.53.8.1 28-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-06-20 03:41:43 +0000
 1.53.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.54.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.54.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.54.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.54.6.1 03-Aug-2004  skrll Sync with HEAD
 1.55.8.1 29-Apr-2005  kent sync with -current
 1.57.100.1 05-Mar-2011  rmind sync with head
 1.57.98.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.58.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.58.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.59.8.1 18-Feb-2012  mrg merge to -current.
 1.59.4.2 30-Oct-2012  yamt sync with head
 1.59.4.1 17-Apr-2012  yamt sync with head
 1.60.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.61.56.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.57 03-Mar-2018  mrg 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.56 12-Aug-2012  tsutsui branches: 1.56.32;
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.55 11-Aug-2012  tsutsui 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.
 1.54 08-Feb-2011  rmind branches: 1.54.4; 1.54.10;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.53 15-Oct-2010  tsutsui branches: 1.53.2; 1.53.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.52 11-Dec-2009  tsutsui branches: 1.52.2; 1.52.4;
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 sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.51 11-Dec-2005  christos branches: 1.51.78;
merge ktrace-lwp.
 1.50 22-Jan-2005  chs bring back the sun3 MAXPHYS definition that has been missing for 8 years.
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
 1.49 07-Aug-2003  agc branches: 1.49.2; 1.49.6; 1.49.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.48 05-Feb-1998  gwr branches: 1.48.48;
Merge arch/sun3x into arch/sun3
 1.47 03-Oct-1997  gwr branches: 1.47.4;
Increase MSGBUFOFF to 512 so we can be sure there is room for a
kernel core header before the message buffer.
 1.46 02-Oct-1997  gwr Fix MSGBUFSIZE
 1.45 20-Sep-1997  leo Correct for the extra member in 'struct kern_msgbuf' when calculating
the number of bytes we want to allocate.
 1.44 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.43 10-Jul-1997  veego branches: 1.43.2;
Restore the define of UPAGES.
 1.42 10-Jun-1997  veego Define NBSG from (1 << SEGSHIFT) and move some variables before
<m68k/param.h>.
 1.41 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.40 27-Feb-1997  gwr Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.39 27-Feb-1997  gwr Allow option MCLSHIFT=x to control MCLBYTES etc.
 1.38 26-Feb-1997  gwr Use ALIGNBYTES in the new ALIGNED_POINTER macro.
(That is always good enough on the m68k.)
 1.37 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.36 18-Jan-1997  gwr branches: 1.36.4;
Move sun3_btop (etc.) macros from param.h to pte.h
 1.35 13-Dec-1996  gwr Define MAXBSIZE as 32KB to limit the size clustered transfers.
 1.34 04-Mar-1996  cgd add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
 1.33 01-Mar-1996  cgd Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE.
 1.32 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.31 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.30 10-Nov-1995  gwr Need to define KERNTEXTOFF for kvm_mkdb
 1.29 27-Jun-1995  gwr branches: 1.29.2;
Nuke user-mode DELAY() macro.
 1.28 26-Jun-1995  cgd clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
 1.27 13-Jun-1995  gwr Provide delay2us as an inline and make it reasonably accurate,
but conservative (long) by a factor of about 1.25
 1.26 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.25 27-Mar-1995  gwr Put spltty at level 4 and adjust others appropriately.
Also, improve the inline _spl() and move it to psl.h
 1.24 18-Mar-1995  cgd don't be so quick to cast macro arguments to unsigned; if the
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
 1.23 28-Nov-1994  gwr cosmetic
 1.22 23-Nov-1994  gwr Add USPACE
 1.21 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.20 26-Oct-1994  gwr Remove some unnecessary junk.
 1.19 26-Oct-1994  cgd new RCS ID format.
 1.18 20-Sep-1994  gwr Kill CLOCK_VA, INTERREG_VA. Do spl0() and splx(x) inline too.
 1.17 16-Sep-1994  jtc asm -> __asm (PR #463).
 1.16 23-Aug-1994  gwr Add USPACE
 1.15 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.14 04-May-1994  gwr Make the DELAY macro call the new delay() function.
 1.13 02-May-1994  glass ugh. splimp is the greater of splnet and splbio now. used by pmap module for splpmap()
 1.12 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.11 12-Dec-1993  glass MACHINE_ARCH
 1.10 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.9 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.8 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.7 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.6 08-Aug-1993  glass various changes
 1.5 05-Aug-1993  glass gets to consinit() and blows up
 1.4 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.3 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.2 27-Jun-1993  glass fixed bug in mon.h; fixed NEED_* in cpu.h; spl macro problems
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.29.2.1 10-Nov-1995  gwr Update from HEAD
 1.36.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.43.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.43.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.47.4.2 04-Feb-1998  gwr Move UPAGES into the common file.
 1.47.4.1 27-Jan-1998  gwr Remove common stuff found in param.h
 1.48.48.4 24-Jan-2005  skrll Sync with HEAD.
 1.48.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.48.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.48.48.1 03-Aug-2004  skrll Sync with HEAD
 1.49.8.1 29-Apr-2005  kent sync with -current
 1.49.6.1 16-Mar-2005  tron Pull up revision 1.50 (requested by chs in ticket #1229):
bring back the sun3 MAXPHYS definition that has been missing for 8 years.
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
 1.49.2.1 16-Mar-2005  tron Pull up revision 1.50 (requested by chs in ticket #1229):
bring back the sun3 MAXPHYS definition that has been missing for 8 years.
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
 1.51.78.1 11-Mar-2010  yamt sync with head
 1.52.4.1 05-Mar-2011  rmind sync with head
 1.52.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.53.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.53.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.54.10.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.54.4.1 30-Oct-2012  yamt sync with head
 1.56.32.1 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- 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.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.18 11-Aug-2012  tsutsui 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.
 1.17 08-Feb-2011  rmind branches: 1.17.4; 1.17.10;
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.16 15-Oct-2010  tsutsui branches: 1.16.2; 1.16.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.15 11-Dec-2009  tsutsui branches: 1.15.2; 1.15.4;
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 sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.14 11-Dec-2005  christos branches: 1.14.78;
merge ktrace-lwp.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.12 05-Feb-1998  gwr branches: 1.12.48;
Merge arch/sun3x into arch/sun3
 1.11 03-Oct-1997  gwr branches: 1.11.4;
Increase MSGBUFOFF to 512 so we can be sure there is room for a
kernel core header before the message buffer.
 1.10 02-Oct-1997  gwr Fix MSGBUFSIZE
 1.9 20-Sep-1997  leo Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
 1.8 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.7 10-Jul-1997  veego branches: 1.7.2;
Restore the define of UPAGES.
 1.6 10-Jun-1997  veego Define NBSG from (1 << SEGSHIFT) and move some variables before
<m68k/param.h>.
 1.5 10-Jun-1997  veego Use the MI <m68k/param.h> include.
 1.4 27-Feb-1997  gwr Allow option MCLSHIFT=x to control MCLBYTES etc.
 1.3 26-Feb-1997  gwr Use ALIGNBYTES in the new ALIGNED_POINTER macro.
(That is always good enough on the m68k.)
 1.2 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.6;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.11.4.2 04-Feb-1998  gwr Move UPAGES into the common file.
 1.11.4.1 27-Jan-1998  gwr Remove common stuff found in param.h
 1.12.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.48.1 03-Aug-2004  skrll Sync with HEAD
 1.14.78.1 11-Mar-2010  yamt sync with head
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.15.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.16.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.16.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.10.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.17.4.1 30-Oct-2012  yamt sync with head
 1.11 31-Mar-1997  gwr Use <m68k/pcb.h>
 1.10 20-Jan-1997  gwr Make this once again identical to the hp300 version.
Perhaps this should exist as <m68k/include/pcb.h>
 1.9 18-Jun-1996  gwr branches: 1.9.2;
Add the field "pcb_mmuctx" for future use by the pmap code.
(This will make later update of the pmap code much easier.)
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.5 25-May-1994  glass md_coredump
 1.4 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.9.2.2 18-Jun-1996  gwr Add the field "pcb_mmuctx" for future use by the pmap code.
(This will make later update of the pmap code much easier.)
 1.9.2.1 18-Jun-1996  gwr file pcb.h was added on branch netbsd-1-2 on 1996-06-18 16:03:46 +0000
 1.34 01-Feb-2020  tsutsui Use "__nothing" macro defined in <sys/cdefs.h> for empty pmap_update().

Suggested by pgoyette@ in PR/54869.
 1.33 18-Jan-2020  tsutsui Fix "modload nfsserver" failure on sun3. PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.32 11-Dec-2009  tsutsui branches: 1.32.64; 1.32.68; 1.32.70;
Export pmap_procwr() declaration only #ifdef _KERNEL.
 1.31 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.30 28-Apr-2008  martin branches: 1.30.6; 1.30.8;
Remove clause 3 and 4 from TNF licenses
 1.29 11-Dec-2005  christos branches: 1.29.74; 1.29.76; 1.29.78;
merge ktrace-lwp.
 1.28 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.27 26-Feb-1999  is branches: 1.27.42; 1.27.50;
sun3 part of fix for PR 6152
 1.26 16-Mar-1998  gwr Add an anonymous declaration of struct pmap in pmap.h and put
typedef struct pmap *pmap_t there, removing the latter from
pmap3.h and pmap3x.h (so LKMs can use <vm/vm.h>).
 1.25 15-Mar-1998  fair make sure _SUN3_ or _SUN3X_ is defined.
 1.24 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.23 03-Jan-1998  thorpej branches: 1.23.2;
Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.22 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.21 28-Feb-1997  gwr Define pmap_page_index as a macro.
 1.20 18-Feb-1997  gwr No longer need pm_stats
 1.19 18-Feb-1997  gwr Add pmap_wired_count()
 1.18 27-Jan-1997  gwr branches: 1.18.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.17 27-Jan-1997  gwr Remove unused PMAP_ACTIVATE/PMAP_DEACTIVATE macros.
Add new _pmap_fault macro used in trap.c
Declare pmap_activate() correctly.
 1.16 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.15 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.14 28-Feb-1996  gwr update PMAP_PREFER
 1.13 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.12 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 29-Jun-1994  gwr ..wrong version last time...
 1.8 28-Jun-1994  gwr Add PMEGQ_KERNEL for pmegs on the new kernel queue.
 1.7 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.18.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.23.2.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.27.50.1 29-Apr-2005  kent sync with -current
 1.27.42.1 24-Jan-2005  skrll Sync with HEAD.
 1.29.78.3 11-Mar-2010  yamt sync with head
 1.29.78.2 04-May-2009  yamt sync with head.
 1.29.78.1 16-May-2008  yamt sync with head.
 1.29.76.1 18-May-2008  yamt sync with head.
 1.29.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.29.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.30.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.32.70.2 29-Feb-2020  ad Sync with head.
 1.32.70.1 25-Jan-2020  ad Sync with head.
 1.32.68.1 21-Jan-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #636):

sys/arch/sun3/include/pmap.h: revision 1.33
sys/arch/sun3/include/pmap3.h: revision 1.50
sys/arch/sun3/include/pmap3x.h: revision 1.30

Fix "modload nfsserver" failure on sun3. PR/54869
sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.32.64.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.51 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.50 18-Jan-2020  tsutsui Fix "modload nfsserver" failure on sun3. PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.49 07-Jan-2013  chs branches: 1.49.38; 1.49.42; 1.49.44;
switch to __USE_TOPDOWN_VM.
 1.48 03-Jun-2011  tsutsui branches: 1.48.2; 1.48.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.47 11-Dec-2009  tsutsui branches: 1.47.4; 1.47.6; 1.47.10;
Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines.
 1.46 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 sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.45 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.44 28-Apr-2008  martin branches: 1.44.6; 1.44.8;
Remove clause 3 and 4 from TNF licenses
 1.43 04-Jan-2008  ad branches: 1.43.6; 1.43.8; 1.43.10;
Don't pull in unrelated gunk.
 1.42 01-Oct-2006  tsutsui branches: 1.42.28; 1.42.34; 1.42.42;
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 16-Feb-2006  perry branches: 1.41.14; 1.41.16;
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.40 24-Dec-2005  perry branches: 1.40.2; 1.40.4; 1.40.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.39 11-Dec-2005  christos merge ktrace-lwp.
 1.38 22-Jan-2005  chs branches: 1.38.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.37 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.36 22-Sep-2002  chs branches: 1.36.6; 1.36.14;
it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.35 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.34 10-Sep-2001  chris branches: 1.34.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.33 03-Jul-2001  chs branches: 1.33.2; 1.33.4;
vm_offset_t -> [pv]addr_t.
 1.32 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.31 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.30 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.29 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.28 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.27 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.26 16-Mar-1998  gwr branches: 1.26.14; 1.26.26;
Add an anonymous declaration of struct pmap in pmap.h and put
typedef struct pmap *pmap_t there, removing the latter from
pmap3.h and pmap3x.h (so LKMs can use <vm/vm.h>).
 1.25 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.24 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.23 03-Jan-1998  thorpej branches: 1.23.4;
Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.22 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.21 28-Feb-1997  gwr Define pmap_page_index as a macro.
 1.20 18-Feb-1997  gwr No longer need pm_stats
 1.19 18-Feb-1997  gwr Add pmap_wired_count()
 1.18 27-Jan-1997  gwr branches: 1.18.4;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.17 27-Jan-1997  gwr Remove unused PMAP_ACTIVATE/PMAP_DEACTIVATE macros.
Add new _pmap_fault macro used in trap.c
Declare pmap_activate() correctly.
 1.16 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.15 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.14 28-Feb-1996  gwr update PMAP_PREFER
 1.13 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.12 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 29-Jun-1994  gwr ..wrong version last time...
 1.8 28-Jun-1994  gwr Add PMEGQ_KERNEL for pmegs on the new kernel queue.
 1.7 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.18.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.23.4.1 27-Jan-1998  gwr Make structure layout match Sun3X (just in case useland cares).
 1.26.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.14.1 23-Apr-2001  bouyer Sync with HEAD.
 1.33.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.33.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.33.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.34.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.34.4.1 10-Sep-2001  nathanw file pmap3.h was added on branch nathanw_sa on 2002-10-18 02:40:22 +0000
 1.36.14.1 29-Apr-2005  kent sync with -current
 1.36.6.2 24-Jan-2005  skrll Sync with HEAD.
 1.36.6.1 17-Jan-2005  skrll Sync with HEAD.
 1.38.8.2 21-Jan-2008  yamt sync with head
 1.38.8.1 30-Dec-2006  yamt sync with head.
 1.40.6.1 22-Apr-2006  simonb Sync with head.
 1.40.4.1 09-Sep-2006  rpaulo sync with head
 1.40.2.1 18-Feb-2006  yamt sync with head.
 1.41.16.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.14.1 18-Nov-2006  ad Sync with head.
 1.42.42.1 08-Jan-2008  bouyer Sync with HEAD
 1.42.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.42.28.1 09-Jan-2008  matt sync with HEAD
 1.43.10.3 11-Mar-2010  yamt sync with head
 1.43.10.2 04-May-2009  yamt sync with head.
 1.43.10.1 16-May-2008  yamt sync with head.
 1.43.8.1 18-May-2008  yamt sync with head.
 1.43.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.43.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.44.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.44.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.47.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.47.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.47.4.1 12-Jun-2011  rmind sync with head
 1.48.12.1 25-Feb-2013  tls resync with head
 1.48.2.1 23-Jan-2013  yamt sync with head
 1.49.44.1 25-Jan-2020  ad Sync with head.
 1.49.42.1 21-Jan-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #636):

sys/arch/sun3/include/pmap.h: revision 1.33
sys/arch/sun3/include/pmap3.h: revision 1.50
sys/arch/sun3/include/pmap3x.h: revision 1.30

Fix "modload nfsserver" failure on sun3. PR/54869
sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.49.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.32 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.31 14-Mar-2020  ad branches: 1.31.28;
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.30 18-Jan-2020  tsutsui Fix "modload nfsserver" failure on sun3. PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.29 03-Jun-2011  tsutsui branches: 1.29.54; 1.29.58; 1.29.60;
- 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.28 11-Dec-2009  tsutsui branches: 1.28.4; 1.28.6; 1.28.10;
Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines.
 1.27 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 sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.26 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.25 28-Apr-2008  martin branches: 1.25.6; 1.25.8;
Remove clause 3 and 4 from TNF licenses
 1.24 04-Jan-2008  ad branches: 1.24.6; 1.24.8; 1.24.10;
Don't pull in unrelated gunk.
 1.23 01-Oct-2006  tsutsui branches: 1.23.28; 1.23.34; 1.23.42;
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.22 16-Feb-2006  perry branches: 1.22.14; 1.22.16;
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.21 24-Dec-2005  perry branches: 1.21.2; 1.21.4; 1.21.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.20 11-Dec-2005  christos merge ktrace-lwp.
 1.19 22-Jan-2005  chs branches: 1.19.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.18 22-Sep-2002  chs branches: 1.18.6; 1.18.14;
it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.17 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.16 10-Sep-2001  chris branches: 1.16.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.15 03-Jul-2001  chs branches: 1.15.2; 1.15.4;
vm_offset_t -> [pv]addr_t.
 1.14 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.13 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.12 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.11 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.10 09-Jun-1998  gwr branches: 1.10.14; 1.10.26;
Move sun3x _pmap_fault macro from pmap.h to trap.c
 1.9 16-Mar-1998  gwr Add an anonymous declaration of struct pmap in pmap.h and put
typedef struct pmap *pmap_t there, removing the latter from
pmap3.h and pmap3x.h (so LKMs can use <vm/vm.h>).
 1.8 18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.7 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.6 03-Jan-1998  thorpej branches: 1.6.4;
Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.5 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.4 14-Feb-1997  gwr Define pmap_resident_count(), pmap_wired_count() as
macros that call pmap_count(). (from Jeremy).
 1.3 12-Feb-1997  gwr In struct pmap, replace pm_mmucrp with pm_a_phys.
Define pmap_resident_count(), pmap_wired_count()
to call pmap_resident_pages(), pmap_wired_pages()
respectively, so we can keep those statistics on
lower-level structures instead of here.
 1.2 23-Jan-1997  gwr branches: 1.2.4;
Add <machine/pte.h> and the new pm_mmucrp member of struct pmap.
Kill macros PMAP_ACTIVATE and PMAP_ACTIVATE (not used).
Add macro _pmap_fault for use in trap.c
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.6.4.1 27-Jan-1998  gwr Some comments, etc.
 1.10.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.14.1 23-Apr-2001  bouyer Sync with HEAD.
 1.15.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.15.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.15.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.4.1 10-Sep-2001  nathanw file pmap3x.h was added on branch nathanw_sa on 2002-10-18 02:40:22 +0000
 1.18.14.1 29-Apr-2005  kent sync with -current
 1.18.6.1 24-Jan-2005  skrll Sync with HEAD.
 1.19.8.2 21-Jan-2008  yamt sync with head
 1.19.8.1 30-Dec-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.21.2.1 18-Feb-2006  yamt sync with head.
 1.22.16.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.22.14.1 18-Nov-2006  ad Sync with head.
 1.23.42.1 08-Jan-2008  bouyer Sync with HEAD
 1.23.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.23.28.1 09-Jan-2008  matt sync with HEAD
 1.24.10.3 11-Mar-2010  yamt sync with head
 1.24.10.2 04-May-2009  yamt sync with head.
 1.24.10.1 16-May-2008  yamt sync with head.
 1.24.8.1 18-May-2008  yamt sync with head.
 1.24.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.24.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.25.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.28.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.28.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.28.4.1 12-Jun-2011  rmind sync with head
 1.29.60.1 25-Jan-2020  ad Sync with head.
 1.29.58.1 21-Jan-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #636):

sys/arch/sun3/include/pmap.h: revision 1.33
sys/arch/sun3/include/pmap3.h: revision 1.50
sys/arch/sun3/include/pmap3x.h: revision 1.30

Fix "modload nfsserver" failure on sun3. PR/54869
sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.
 1.29.54.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.28.1 02-Aug-2025  perseant Sync with HEAD
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.1 07-Aug-2002  briggs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.202; 1.1.204;
Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:42:10 +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:44 +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:19:00 +0000
 1.9 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.8 25-Nov-1996  gwr branches: 1.8.44; 1.8.48; 1.8.56;
Get rid of md_upte[] and my copyright line.
 1.7 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 23-Jul-1994  gwr branches: 1.5.2;
Get rid of MDP_AST
 1.4 27-May-1994  gwr branches: 1.4.2;
Catch up with frame.h chages, merge stuff from new hp300 port.
 1.3 06-May-1994  gwr Track changes to proc.h
 1.2 12-Dec-1993  glass snapshot of my private sources
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.4.2.1 26-Jul-1994  cgd From trunk.
 1.5.2.2 23-Jul-1994  gwr Get rid of MDP_AST
 1.5.2.1 23-Jul-1994  gwr file proc.h was added on branch netbsd-1-0 on 1994-07-23 03:23:45 +0000
 1.8.56.1 17-Jul-2002  gehenna catch up with -current.
 1.8.48.2 01-Aug-2002  nathanw Catch up to -current.
 1.8.48.1 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.8.44.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 30-May-1994  glass so libkern compiles
 1.20 28-May-2001  chs branches: 1.20.8;
move the spl*() and IPL_* definitions to intr.h.
 1.19 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.18 22-Feb-2001  chs branches: 1.18.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.17 14-Jan-2001  thorpej Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.16 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.15 05-Aug-1999  thorpej branches: 1.15.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.14 24-Nov-1998  kleink Need declarations of defined inlined spl/sr functions.
 1.13 29-May-1997  gwr Add inline definitions for _getsr() and _splraise(), and
define splimp() using splraise so early calls to the VM
code (and pmap) do not accidently enable interrupts.
 1.12 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.11 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.8 10-Oct-1995  gwr The previous hack to save two instructions when the
return value of splx() was ignored did not prevent the
optimizer from re-ordering the asm statements! (Yikes!)
Revert this to the old, single asm statement method.
Thanks VERY MUCH to David Jones for finding this!
 1.7 13-Aug-1995  mycroft Add splsoftnet().
 1.6 27-Mar-1995  gwr Put spltty at level 4 and adjust others appropriately.
Also, improve the inline _spl() and move it to psl.h
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.15.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.15.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.15.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.8.2 28-May-2001  chs move the spl*() and IPL_* definitions to intr.h.
 1.20.8.1 28-May-2001  chs file psl.h was added on branch nathanw_sa on 2001-05-28 21:06:20 +0000
 1.20 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.19 11-Dec-2005  christos branches: 1.19.74; 1.19.76; 1.19.78;
merge ktrace-lwp.
 1.18 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.17 05-Sep-2001  tsutsui branches: 1.17.6; 1.17.22; 1.17.30;
vm_offset_t -> vaddr_t
 1.16 05-Feb-1998  gwr branches: 1.16.28;
Merge arch/sun3x into arch/sun3
 1.15 10-Jun-1997  veego branches: 1.15.10;
Delete _btos and _stob.
The remaining 'Mach derived conversion macros' are now in <m68k/param.h>
 1.14 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.13 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.12 18-Jan-1997  gwr Move sun3_btop (etc.) macros from param.h to pte.h
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 05-May-1996  gwr Add VA_SEGNUM for libkvm.
 1.9 10-Mar-1995  gwr Fix PA_PGNUM for high addresses (cast to unsigned).
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 08-Aug-1993  glass various changes
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.15.10.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.16.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.30.1 29-Apr-2005  kent sync with -current
 1.17.22.1 24-Jan-2005  skrll Sync with HEAD.
 1.17.6.2 05-Sep-2001  tsutsui vm_offset_t -> vaddr_t
 1.17.6.1 05-Sep-2001  tsutsui file pte.h was added on branch nathanw_sa on 2001-09-05 13:31:37 +0000
 1.19.78.1 16-May-2008  yamt sync with head.
 1.19.76.1 18-May-2008  yamt sync with head.
 1.19.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.18 12-Jan-2009  tsutsui Add parantheses to macro to suppress possible compiler warnings.
 1.17 28-Apr-2008  martin branches: 1.17.8;
Remove clause 3 and 4 from TNF licenses
 1.16 05-Feb-1998  gwr branches: 1.16.150; 1.16.152; 1.16.154;
Merge arch/sun3x into arch/sun3
 1.15 10-Jun-1997  veego branches: 1.15.4;
Delete _btos and _stob.
The remaining 'Mach derived conversion macros' are now in <m68k/param.h>
 1.14 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.13 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.12 18-Jan-1997  gwr Move sun3_btop (etc.) macros from param.h to pte.h
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 05-May-1996  gwr Add VA_SEGNUM for libkvm.
 1.9 10-Mar-1995  gwr Fix PA_PGNUM for high addresses (cast to unsigned).
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 08-Aug-1993  glass various changes
 1.2 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.1 27-Jul-1993  glass new pmap module
 1.15.4.1 27-Jan-1998  gwr Minor tweaks.
 1.16.154.2 04-May-2009  yamt sync with head.
 1.16.154.1 16-May-2008  yamt sync with head.
 1.16.152.1 18-May-2008  yamt sync with head.
 1.16.150.2 17-Jan-2009  mjf Sync with HEAD.
 1.16.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.9 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.8 28-Apr-2008  martin branches: 1.8.124;
Remove clause 3 and 4 from TNF licenses
 1.7 05-Feb-1998  gwr branches: 1.7.150; 1.7.152; 1.7.154;
Merge arch/sun3x into arch/sun3
 1.6 10-Jun-1997  veego branches: 1.6.4;
Delete _btos and _stob.
The remaining 'Mach derived conversion macros' are now in <m68k/param.h>
 1.5 14-May-1997  jeremy Long awaited MI/MD separation completed.
 1.4 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.3 23-Jan-1997  gwr Wrap prototypes with ifdef _KERNEL
 1.2 16-Jan-1997  gwr Add an introductory comment about pte.h vs mc68851.h
Move sun3x_round_up_page() to here.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.6.4.1 27-Jan-1998  gwr Remove Sun3 stuff that did not belong, etc.
 1.7.154.1 16-May-2008  yamt sync with head.
 1.7.152.1 18-May-2008  yamt sync with head.
 1.7.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.124.1 02-Aug-2025  perseant Sync with HEAD
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.1 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.8 27-Jan-1994  cgd HP300 -> MACHINE
 1.7 08-Jan-1994  cgd stubs which pint to m68k include
 1.6 06-Jan-1994  mycroft Still need old #defines for now.
 1.5 06-Jan-1994  mycroft Implement `struct reg'.
 1.4 08-Dec-1993  mycroft Move #define of NIPCREG outside #fidef.
 1.3 02-Sep-1993  mycroft Ditto.
 1.2 22-May-1993  cgd add rcsids to everything and clean up headers
 1.1 13-May-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-May-1993  cgd add hp300 kernel files. generic kernel files might need some help...
 1.2 12-Feb-1997  gwr Now using <sys/kgdb.h>
 1.1 15-Jun-1996  gwr branches: 1.1.2; 1.1.6;
Add KGDB support
 1.1.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.1.2.2 15-Jun-1996  gwr Add KGDB support
 1.1.2.1 15-Jun-1996  gwr file remote-sl.h was added on branch netbsd-1-2 on 1996-06-15 14:34:36 +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:35 +0000
 1.5 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.4 27-Jan-1997  gwr branches: 1.4.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.3 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 24-May-1995  gwr Define struct saif
 1.1 07-Feb-1995  gwr Add saio.h and move relevant struct from mon.h into it.
 1.4.14.1 25-Jan-1998  gwr Now in ../stand/libsa
 1.1 20-Dec-1994  cgd make the definition of _JBLEN mach. dep. header-dependent.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.6 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.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.5 20-Jun-1998  mrg moved to <dev/sun/disklabel.h>
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.2 26-Oct-1994  cgd new RCS ID format.
 1.1 13-May-1994  gwr SCSI driver works!
 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:54 +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:16 +0000
 1.4 19-Dec-2018  maxv Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.3 09-Nov-1999  kleink branches: 1.3.40; 1.3.218;
Rip protection against multiple inclusion from wrapper headers.
 1.2 29-Apr-1999  kleink branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10;
Pull in the right generic m68k header. (Where was my mind?)
 1.1 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.2.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.6.1 15-Nov-1999  fvdl Sync with -current
 1.2.4.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.218.1 10-Jun-2019  christos Sync with HEAD
 1.3.40.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8 11-Mar-1997  gwr Remove unnecessary differences (T_BRKPT, T_WATCHPOINT gone).
 1.7 21-Nov-1994  gwr branches: 1.7.12;
Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.7.12.1 12-Mar-1997  is Merge in changes from The Trunk
 1.23 14-Jan-2024  thorpej Merge common sun68k types defns into <sun68k/types.h>.
 1.22 01-Apr-2021  simonb Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
 1.21 01-Apr-2021  simonb Whitespace: #define<tab>
 1.20 08-May-2018  christos branches: 1.20.14; 1.20.16;
make as not having pmap statistics available
 1.19 28-Oct-2012  chs branches: 1.19.36;
no need to define __BROKEN_CONFIG_UNIT_USAGE, the code that this enabled
has been gone for years.
 1.18 12-Jun-2011  rmind branches: 1.18.2; 1.18.12;
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.17 20-Jan-2008  joerg branches: 1.17.32; 1.17.42;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.16 17-Oct-2007  garbled branches: 1.16.2; 1.16.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.15 14-Jul-2007  ad branches: 1.15.10;
Generic soft interrupts are mandatory.
 1.14 05-Oct-2006  tsutsui branches: 1.14.8; 1.14.16;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.13 05-Sep-2006  gdamore branches: 1.13.2; 1.13.4;
Update sun3 to use timecounters (interrupt clock only) and generic-todr.
 1.12 28-Feb-2002  simonb branches: 1.12.32; 1.12.46; 1.12.50;
Use "#define<tab>".
 1.11 05-Feb-2000  cgd branches: 1.11.8; 1.11.12;
add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
 1.10 17-Dec-1996  gwr branches: 1.10.30;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.9 05-Dec-1996  cgd First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
 1.8 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.7 27-Jun-1995  gwr Remove temporary __BDEVSW_DUMP_OLD_TYPE (our dumpsys is safe 8^)
 1.6 26-Jun-1995  cgd define __BDEVSW_DUMP_OLD_TYPE for ports where it's true. clean up
some m68k ports inclusion of common header.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 08-Jan-1994  cgd make the include files stubs, but add bits where necessary (most XXX).
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.10.30.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.11.12.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.12.50.1 14-Sep-2006  yamt sync with head.
 1.12.46.1 09-Sep-2006  rpaulo sync with head
 1.12.32.3 21-Jan-2008  yamt sync with head
 1.12.32.2 03-Sep-2007  yamt sync with head.
 1.12.32.1 30-Dec-2006  yamt sync with head.
 1.13.4.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.13.2.1 18-Nov-2006  ad Sync with head.
 1.14.16.1 03-Oct-2007  garbled Sync with HEAD
 1.14.8.1 15-Jul-2007  ad Sync with head.
 1.15.10.2 23-Mar-2008  matt sync with HEAD
 1.15.10.1 06-Nov-2007  matt sync with HEAD
 1.16.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.16.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.17.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.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.19.36.1 21-May-2018  pgoyette Sync with HEAD
 1.20.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.20.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6 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.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 23-May-1994  gwr Contents got doubled somehow - remove 2nd copy.
 1.2 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.1 27-Jan-1994  mycroft Pointer to common version.
 1.1 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.38 01-Feb-2020  tsutsui Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.
For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.37 07-Jan-2013  chs branches: 1.37.38; 1.37.42; 1.37.44;
switch to __USE_TOPDOWN_VM.
 1.36 06-Nov-2010  uebayasi branches: 1.36.8; 1.36.18;
Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.35 15-Oct-2010  tsutsui Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.34 30-Apr-2010  pooka Raise the blade, make the change, don't quite rearrange to where
it's sane. But improves the non-monolithic kernel case anyway.
 1.33 28-Apr-2008  martin branches: 1.33.20; 1.33.22;
Remove clause 3 and 4 from TNF licenses
 1.32 02-Apr-2003  thorpej branches: 1.32.104; 1.32.106; 1.32.108;
Use PAGE_SIZE rather than NBPG.
 1.31 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.30 03-Jul-2001  chs branches: 1.30.2; 1.30.8;
move parts that are the same from vmparam3{,x}.h to vmparam.h.
 1.29 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.28 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

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

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.27 04-Feb-2001  jmc branches: 1.27.2;
In the LKM section add some things the LKM's need (since they aren't
defining _SUN3_ or _SUN3X_ generally to pickup the full vmparam.h

Added MAXDSIZ (set to sun3's limit) and VM_NFREELIST
 1.26 14-Nov-2000  thorpej Sun3 and Sun3x both use 8K pages. Make PAGE_* and friends into
compile-time constants.
 1.25 26-Jan-2000  tsutsui Remove obsoleted macros.
 1.24 04-Dec-1999  ragge CL* discarding.
 1.23 10-Apr-1999  gwr branches: 1.23.2; 1.23.8; 1.23.14;
Fix compile error in: sys/lkm/vfs/miscfs/procfs
 1.22 05-Apr-1999  gwr Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.21 18-Feb-1999  gwr It appears that pmap_physseg is now required in userland. Too bad.
 1.20 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.19 12-Jul-1997  perry branches: 1.19.8;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.18 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.17 29-May-1997  gwr Increase the default datasize limit to 16MB (enough to build libc).
 1.16 27-Feb-1997  gwr branches: 1.16.2;
Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.15 18-Jan-1997  gwr branches: 1.15.2; 1.15.4;
Define MACHINE_NONCONTIG here instead of in conf/std.sun3.
 1.14 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.13 08-Aug-1995  gwr Add default value for SHMMAXPGS (from Jason Thorpe - fixes PR#1220)
 1.12 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.11 13-Feb-1995  gwr DVMA slave mapping support.
 1.10 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 12-Dec-1993  glass snapshot of my private sources
 1.7 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.6 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 27-Jul-1993  glass new pmap module
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.15.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.15.2.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.16.2.2 01-Jun-1997  mrg update to trunk.
 1.16.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.19.8.3 05-Feb-1998  gwr OK, move some stuff back to the kernel-only part.
 1.19.8.2 04-Feb-1998  gwr Move a few things to the common file:
USRTEXT, MAXSLP, SAFERSS, VM_*
 1.19.8.1 27-Jan-1998  gwr Conditionally include *3.h or *3x.h as appropriate.
 1.23.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.23.8.3 11-Feb-2001  bouyer Sync with HEAD.
 1.23.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.23.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.23.2.2 10-Apr-1999  gwr Fix compile error in: sys/lkm/vfs/miscfs/procfs
 1.23.2.1 10-Apr-1999  gwr file vmparam.h was added on branch netbsd-1-4 on 1999-04-10 02:15:47 +0000
 1.27.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.30.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.30.8.1 03-Jul-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:28:19 +0000
 1.30.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.32.108.2 11-Aug-2010  yamt sync with head.
 1.32.108.1 16-May-2008  yamt sync with head.
 1.32.106.1 18-May-2008  yamt sync with head.
 1.32.104.1 02-Jun-2008  mjf Sync with HEAD.
 1.33.22.2 05-Mar-2011  rmind sync with head
 1.33.22.1 30-May-2010  rmind sync with head
 1.33.20.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.33.20.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.33.20.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.36.18.1 25-Feb-2013  tls resync with head
 1.36.8.1 23-Jan-2013  yamt sync with head
 1.37.44.1 29-Feb-2020  ad Sync with head.
 1.37.42.1 10-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #682):

sys/arch/next68k/include/vmparam.h: revision 1.27
sys/arch/mac68k/include/vmparam.h: revision 1.46
sys/arch/sun3/include/vmparam.h: revision 1.38
sys/arch/m68k/include/vmparam.h: revision 1.1
sys/arch/hp300/include/vmparam.h: revision 1.41
sys/arch/m68k/include/Makefile: revision 1.32
sys/arch/amiga/include/vmparam.h: revision 1.48
distrib/sets/lists/comp/ad.m68k: revision 1.63
sys/arch/x68k/include/vmparam.h: revision 1.40
sys/arch/mvme68k/include/vmparam.h: revision 1.38
sys/arch/luna68k/include/vmparam.h: revision 1.23
sys/arch/news68k/include/vmparam.h: revision 1.23
sys/arch/atari/include/vmparam.h: revision 1.34
sys/arch/cesfic/include/vmparam.h: revision 1.19

Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.

For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.37.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.39 03-Mar-2018  mrg 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.38 02-Feb-2017  rin branches: 1.38.6;
PR port-mac68k/51923
Bump default MAXTSIZ to 32MB for m68k ports, which allos us to use GCC 5.4 on
GENERIC kernels.
Ok jklos
 1.37 15-Oct-2010  tsutsui branches: 1.37.18; 1.37.36; 1.37.40; 1.37.44;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.36 30-Apr-2010  pooka Raise the blade, make the change, don't quite rearrange to where
it's sane. But improves the non-monolithic kernel case anyway.
 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 25-Oct-2007  yamt branches: 1.34.20; 1.34.28; 1.34.34;
defparam PAGER_MAP_SIZE.
 1.33 11-Dec-2005  christos branches: 1.33.30; 1.33.48; 1.33.50; 1.33.54;
merge ktrace-lwp.
 1.32 07-Aug-2003  agc branches: 1.32.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.31 10-Dec-2002  thorpej branches: 1.31.6;
Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.30 03-Jul-2001  chs branches: 1.30.8;
move parts that are the same from vmparam3{,x}.h to vmparam.h.
 1.29 21-Feb-2001  chs reduce PAGER_MAP_SIZE to 4MB, we're short on KVA.
 1.28 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.27 04-Dec-1999  ragge CL* discarding.
 1.26 26-Apr-1999  thorpej branches: 1.26.2; 1.26.8;
Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.25 05-Apr-1999  gwr branches: 1.25.2; 1.25.4;
Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.24 18-Feb-1999  gwr It appears that pmap_physseg is now required in userland. Too bad.
 1.23 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.22 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.21 20-Feb-1998  gwr Switch to MACHINE_NEW_NONCONTIG
 1.20 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.19 12-Jul-1997  perry branches: 1.19.4;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.18 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.17 29-May-1997  gwr Increase the default datasize limit to 16MB (enough to build libc).
 1.16 27-Feb-1997  gwr branches: 1.16.2;
Define VM_MAX_KERNEL_ADDRESS using KERN_END instead of a constant.
 1.15 18-Jan-1997  gwr branches: 1.15.2; 1.15.4;
Define MACHINE_NONCONTIG here instead of in conf/std.sun3.
 1.14 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.13 08-Aug-1995  gwr Add default value for SHMMAXPGS (from Jason Thorpe - fixes PR#1220)
 1.12 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.11 13-Feb-1995  gwr DVMA slave mapping support.
 1.10 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 12-Dec-1993  glass snapshot of my private sources
 1.7 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.6 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.3 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.2 27-Jul-1993  glass new pmap module
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.15.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.15.2.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.16.2.2 01-Jun-1997  mrg update to trunk.
 1.16.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.19.4.2 05-Feb-1998  gwr OK, move some stuff back to the kernel-only part.
 1.19.4.1 04-Feb-1998  gwr Move a few things to the common file:
USRTEXT, MAXSLP, SAFERSS, VM_*
 1.25.4.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.25.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.25.2.2 05-Apr-1999  gwr Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.25.2.1 05-Apr-1999  gwr file vmparam3.h was added on branch netbsd-1-4 on 1999-04-05 14:35:14 +0000
 1.26.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.26.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.26.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.30.8.2 11-Dec-2002  thorpej Sync with HEAD.
 1.30.8.1 03-Jul-2001  thorpej file vmparam3.h was added on branch nathanw_sa on 2002-12-11 06:12:34 +0000
 1.31.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.6.1 03-Aug-2004  skrll Sync with HEAD
 1.32.16.1 27-Oct-2007  yamt sync with head.
 1.33.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.33.50.1 06-Nov-2007  matt sync with HEAD
 1.33.48.1 28-Oct-2007  joerg Sync with HEAD.
 1.33.30.1 03-Dec-2007  ad Sync with HEAD.
 1.34.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.34.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.34.20.2 11-Aug-2010  yamt sync with head.
 1.34.20.1 04-May-2009  yamt 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.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.35.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.37.44.1 21-Apr-2017  bouyer Sync with HEAD
 1.37.40.1 20-Mar-2017  pgoyette Sync with HEAD
 1.37.36.1 05-Feb-2017  skrll Sync with HEAD
 1.37.18.1 03-Dec-2017  jdolecek update from HEAD
 1.38.6.1 12-Apr-2018  martin Pull up following revision(s) (requested by mrg in ticket #745):

sys/arch/sun3/conf/Makefile.sun3: revision 1.106
sys/arch/sun3/conf/Makefile.sun3: revision 1.107
sys/arch/sun3/conf/GENERIC3X: revision 1.131
sys/arch/sun3/include/param3.h: revision 1.57
sys/arch/sun3/conf/GENERIC: revision 1.177
sys/arch/sun3/conf/GENERIC: revision 1.178
sys/arch/sun3/include/vmparam3.h: revision 1.39

sun3:
- build libkern as an archive for non modular builds. from maya@
- 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.

also disable SYSCTL_INCLUDE_DESCR.

copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit.

Build compat code as .a if not MODULAR.

Removes some more unused functions.
 1.23 02-Feb-2017  rin PR port-mac68k/51923
Bump default MAXTSIZ to 32MB for m68k ports, which allos us to use GCC 5.4 on
GENERIC kernels.
Ok jklos
 1.22 08-Feb-2011  rmind branches: 1.22.14; 1.22.32; 1.22.36; 1.22.40;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.21 15-Oct-2010  tsutsui branches: 1.21.2; 1.21.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.20 30-Apr-2010  pooka Raise the blade, make the change, don't quite rearrange to where
it's sane. But improves the non-monolithic kernel case anyway.
 1.19 06-Mar-2009  joerg branches: 1.19.2; 1.19.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.18 11-Dec-2005  christos branches: 1.18.78; 1.18.86; 1.18.92;
merge ktrace-lwp.
 1.17 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.16 10-Dec-2002  thorpej branches: 1.16.6;
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.15 03-Jul-2001  chs branches: 1.15.8;
move parts that are the same from vmparam3{,x}.h to vmparam.h.
 1.14 11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.13 04-Dec-1999  ragge CL* discarding.
 1.12 26-Apr-1999  thorpej branches: 1.12.2; 1.12.8;
Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.11 05-Apr-1999  gwr branches: 1.11.2; 1.11.4;
Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.10 18-Feb-1999  gwr It appears that pmap_physseg is now required in userland. Too bad.
 1.9 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.8 12-Dec-1998  gwr Switch to MACHINE_NEW_NONCONTIG (Yea! Finally!:)
 1.7 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.6 17-Jun-1998  gwr Turn off MACHINE_NEW_NONCONTIG for now. Bug...
 1.5 10-Jun-1998  gwr Switch over to MACHINE_NEW_NONCONTIG
 1.4 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.3 12-Jul-1997  perry branches: 1.3.4;
update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.2 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.4; 1.1.1.1.8;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.8.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.1.1.1.4.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.3.4.2 05-Feb-1998  gwr OK, move some stuff back to the kernel-only part.
 1.3.4.1 04-Feb-1998  gwr Move a few things to the common file:
USRTEXT, MAXSLP, SAFERSS, VM_*
 1.11.4.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.11.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.2 05-Apr-1999  gwr Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs).
 1.11.2.1 05-Apr-1999  gwr file vmparam3x.h was added on branch netbsd-1-4 on 1999-04-05 14:35:14 +0000
 1.12.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.8.2 11-Dec-2002  thorpej Sync with HEAD.
 1.15.8.1 03-Jul-2001  thorpej file vmparam3x.h was added on branch nathanw_sa on 2002-12-11 06:12:35 +0000
 1.16.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.6.1 03-Aug-2004  skrll Sync with HEAD
 1.18.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.78.2 11-Aug-2010  yamt sync with head.
 1.18.78.1 04-May-2009  yamt sync with head.
 1.19.4.2 05-Mar-2011  rmind sync with head
 1.19.4.1 30-May-2010  rmind sync with head
 1.19.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.19.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.21.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.21.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.40.1 21-Apr-2017  bouyer Sync with HEAD
 1.22.36.1 20-Mar-2017  pgoyette Sync with HEAD
 1.22.32.1 05-Feb-2017  skrll Sync with HEAD
 1.22.14.1 03-Dec-2017  jdolecek update from HEAD
 1.2 27-Aug-2002  uwe Make sun ports use common keyboard/firm events related includes
from dev/sun.
 1.1 01-Dec-1994  gwr branches: 1.1.48; 1.1.52; 1.1.60;
Export some headers that X will want, and minor clean-up.
 1.1.60.1 31-Aug-2002  gehenna catch up with -current.
 1.1.52.1 27-Aug-2002  nathanw Catch up to -current.
 1.1.48.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:42:05 +0000
 1.14 29-Mar-2008  tsutsui Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.13 11-Mar-2007  tsutsui branches: 1.13.38;
Remove splzs() definition, which is in <sun68k/intr.h>.
 1.12 05-Oct-2006  tsutsui branches: 1.12.4; 1.12.8;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
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 07-Aug-2003  agc branches: 1.9.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 11-Mar-2002  chs branches: 1.8.12;
override cn_trap() with zs_abort() so we can drop to the monitor
if there's no DDB. fixes PR 12547.
 1.7 20-Aug-1999  chs branches: 1.7.16; 1.7.20;
copy some definitions from the sparc port. fixes PR 7880.
 1.6 17-Dec-1996  gwr Adapt to the new version of dev/ic/z8530*
(Note: now define zsc_softc here.)
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 30-Jan-1996  gwr Eliminate remaining direct references to the z8530 chip
to allow the MD access functions to do delays, etc.
 1.2 24-Jan-1996  gwr Update for the new z8530 driver
 1.1 24-Jan-1996  gwr file z8530var.h was initially added on branch netbsd-1-1.
 1.7.20.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.16.1 16-Mar-2002  jdolecek Catch up with -current.
 1.8.12.4 24-Jan-2005  skrll Sync with HEAD.
 1.8.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.12.1 03-Aug-2004  skrll Sync with HEAD
 1.9.8.1 29-Apr-2005  kent sync with -current
 1.10.8.2 03-Sep-2007  yamt sync with head.
 1.10.8.1 30-Dec-2006  yamt sync with head.
 1.11.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.11.20.1 18-Nov-2006  ad Sync with head.
 1.12.8.1 13-Mar-2007  ad Sync with head.
 1.12.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.38.1 03-Apr-2008  mjf Sync with HEAD.
 1.5 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.81 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.80 24-Apr-2021  thorpej branches: 1.80.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.79 07-Sep-2013  tsutsui branches: 1.79.44;
Whitespace cleanup.
 1.78 13-Oct-2012  tsutsui branches: 1.78.2;
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.77 30-Jul-2012  christos branches: 1.77.2;
make this compile again
 1.76 29-Jul-2012  mlelstv Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

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

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

Make cpu_rootconf(9) describe the calling order.
 1.75 28-Apr-2008  martin branches: 1.75.34; 1.75.40;
Remove clause 3 and 4 from TNF licenses
 1.74 12-Feb-2008  joerg branches: 1.74.6; 1.74.8; 1.74.10;
Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
 1.73 05-Dec-2007  tsutsui Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro.
 1.72 04-Dec-2007  tsutsui Adapt sun68k ports to recent interrupt handling changes.

XXX: sun2 (m68010) doesn't have CAS instructions.
 1.71 01-Dec-2007  tsutsui branches: 1.71.2;
- update a comment
- use __func__ to print function names
- some KNF
 1.70 04-Mar-2007  christos branches: 1.70.2; 1.70.18; 1.70.20; 1.70.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.69 05-Oct-2006  tsutsui branches: 1.69.4;
Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.68 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.67 21-Feb-2006  thorpej branches: 1.67.14; 1.67.16;
Use device_class() instead of accessing dv_class directly.
 1.66 11-Dec-2005  christos branches: 1.66.2; 1.66.4; 1.66.6;
merge ktrace-lwp.
 1.65 26-Aug-2005  drochner s/locdesc_t/int/g
 1.64 30-Jun-2005  drochner branches: 1.64.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.63 03-Jun-2005  tsutsui Constify.
 1.62 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.61 15-Jul-2003  lukem branches: 1.61.8;
__KERNEL_RCSID()
 1.60 01-Jan-2003  thorpej branches: 1.60.2;
Use aprint_normal() for cfprint routines.
 1.59 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.58 18-May-2002  lukem enable scsi_find (et al) only if NSCSIBUS > 0
 1.57 16-May-2002  thorpej Don't access a scsipi channel's periph table directly; use
scsipi_lookup_periph().
 1.56 05-Sep-2001  tsutsui branches: 1.56.6; 1.56.14;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.55 25-Apr-2001  bouyer branches: 1.55.2;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.54 17-Sep-1999  thorpej branches: 1.54.2; 1.54.14;
Centralize the declaration and clearing of `cold'.
 1.53 15-Sep-1999  thorpej Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
 1.52 07-Jun-1999  thorpej Don't pass a nam2blk around at all; just have setroot() and friends reference
dev_name2blk[] directly. Addresses PR #7622 (ITOH Yasufumi), although
in a different way.
 1.51 08-Feb-1998  gwr branches: 1.51.10;
Factor *peek out of bus_subr.c and move it to autoconf.c
(to reduce duplication). Add bus_tmapin and bus_tmapout
for use in probe functions (gets a temporary mapping).
Add bus_mapout() to undo bus_mapin() if needed.
 1.50 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.49 27-Aug-1997  bouyer branches: 1.49.6;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.48 25-Apr-1997  gwr branches: 1.48.2; 1.48.4;
Moved bus_scan() and bus_print() from here to bus_subr.c
because they are now different in sun3 vs sun3x.
 1.47 27-Mar-1997  gwr cleanup
 1.46 26-Mar-1997  gwr Move findroot/setroot stuff from configure() to cpu_rootconf().
 1.45 19-Feb-1997  gwr Oh... can not set cold=0 before swapconf() is done with any I/O
that might cause a call to sleep (procinit not done yet).
 1.44 18-Feb-1997  gwr New implementation of the findroot/setroot business. Eliminates
dependency on wired-down SCSI target/LUN for boot devices.
 1.43 31-Jan-1997  gwr branches: 1.43.2; 1.43.4;
Add include <machine/mon.h> so this compiles, etc.
 1.42 31-Jan-1997  thorpej Use new machine-independent setroot().
 1.41 27-Jan-1997  gwr Let bus_mapin() return void *; moved machdep.h
 1.40 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.39 18-Jan-1997  gwr Enable interrupts AFTER autoconfiguration, to avoid spurrious ones.
 1.38 17-Dec-1996  gwr branches: 1.38.2;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.37 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.36 13-Oct-1996  christos backout previous kprintf change
 1.35 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.34 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.33 07-Apr-1996  gwr minor nit...
 1.32 04-Apr-1996  cgd update for the fact that config_found() and config_rootfound() now
return pointers. (Check vs. NULL, rather than just boolean tests.)
 1.31 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.30 21-Mar-1996  gwr Catch-up with cf_driver/cf_attach changes.
 1.29 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.28 12-Feb-1996  gwr Fix address wrap in bus_mapin
 1.27 26-Sep-1995  gwr branches: 1.27.2;
New DVMA interface, and various cleanup.
 1.26 21-Aug-1995  gwr If a swap entry is being used as root, do not swap there.
 1.25 27-Jun-1995  gwr Add/correct some cache-flush logic to deal with the fact that the
VAC has ref/mod bits that need write-back treatment.
 1.24 10-Apr-1995  mycroft conf_init() is no more.
 1.23 10-Mar-1995  gwr Kill old declarations which now conflict...
 1.22 13-Feb-1995  gwr DVMA slave mapping support.
 1.21 24-Jan-1995  gwr move code to enable interrupts just a little later
 1.20 11-Jan-1995  gwr Cleanup
 1.19 20-Dec-1994  gwr Do spl0() a bit later, after autoconfiguration is finished.
 1.18 13-Dec-1994  gwr Have working bus_peek(), and drivers use it.
 1.17 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.16 23-Nov-1994  gwr New cd_match prototype.
 1.15 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.14 26-Oct-1994  cgd new RCS ID format.
 1.13 20-Sep-1994  gwr branches: 1.13.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.12 27-Jul-1994  gwr Add swapconf() to compute size of swap space, and
variables required by savecore. No dumpsys() yet.
 1.11 28-Jun-1994  gwr branches: 1.11.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.10 14-Jun-1994  gwr Add functions for new FS code: chrtoblk, isdisk, ...
 1.9 20-May-1994  gwr Move boothowto hack into consinit so it happens early enough.
 1.8 04-May-1994  gwr Add RB_NOSYNC to boothowto instead of disabling machdep.c:boot()
 1.7 01-Mar-1994  glass bugs fixed and cleanup
 1.6 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 08-Aug-1993  glass lots of changes, too many printfs
 1.11.2.1 27-Jul-1994  cgd from trunk, per gwr.
 1.13.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.13.2.1 20-Sep-1994  gwr file autoconf.c was added on branch netbsd-1-0 on 1994-09-20 16:52:22 +0000
 1.27.2.1 12-Feb-1996  gwr Fix address wrap in bus_mapin
 1.38.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

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

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

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

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

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

config netbsd root on cd0a type cd9660

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

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

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

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

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

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.43.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.43.2.1 02-Mar-1997  mrg swapconf() is no more.
 1.48.4.1 27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.48.2.1 01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.49.6.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.51.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.54.14.1 21-Jun-2001  nathanw Catch up to -current.
 1.54.2.1 22-Jan-2001  bouyer first cut at converting to thorpej_scsipi
 1.55.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.55.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.55.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.56.14.1 30-May-2002  gehenna Catch up with -current.
 1.56.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.56.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.56.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.56.6.1 05-Sep-2001  nathanw file autoconf.c was added on branch nathanw_sa on 2002-06-20 03:41:52 +0000
 1.60.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.60.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.60.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.60.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.60.2.1 03-Aug-2004  skrll Sync with HEAD
 1.61.8.1 29-Apr-2005  kent sync with -current
 1.64.2.5 27-Feb-2008  yamt sync with head.
 1.64.2.4 07-Dec-2007  yamt sync with head
 1.64.2.3 03-Sep-2007  yamt sync with head.
 1.64.2.2 30-Dec-2006  yamt sync with head.
 1.64.2.1 21-Jun-2006  yamt sync with head.
 1.66.6.1 22-Apr-2006  simonb Sync with head.
 1.66.4.1 09-Sep-2006  rpaulo sync with head
 1.66.2.1 01-Mar-2006  yamt sync with head.
 1.67.16.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.67.14.1 18-Nov-2006  ad Sync with head.
 1.69.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.70.26.2 18-Feb-2008  mjf Sync with HEAD.
 1.70.26.1 08-Dec-2007  mjf Sync with HEAD.
 1.70.20.2 23-Mar-2008  matt sync with HEAD
 1.70.20.1 09-Jan-2008  matt sync with HEAD
 1.70.18.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.70.18.1 03-Dec-2007  joerg Sync with HEAD.
 1.70.2.1 03-Dec-2007  ad Sync with HEAD.
 1.71.2.1 08-Dec-2007  ad Sync with head.
 1.74.10.1 16-May-2008  yamt sync with head.
 1.74.8.1 18-May-2008  yamt sync with head.
 1.74.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.75.40.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.75.34.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.75.34.1 30-Oct-2012  yamt sync with head
 1.77.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.77.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.78.2.1 18-May-2014  rmind sync with head
 1.79.44.3 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.79.44.2 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.79.44.1 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.80.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.18 07-Sep-2013  tsutsui Whitespace cleanup.
 1.17 28-Apr-2008  martin branches: 1.17.34; 1.17.44; 1.17.50;
Remove clause 3 and 4 from TNF licenses
 1.16 03-Oct-2006  tsutsui branches: 1.16.52; 1.16.54; 1.16.56;
- 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 11-Dec-2005  christos branches: 1.14.20; 1.14.22;
merge ktrace-lwp.
 1.13 01-Apr-2005  yamt branches: 1.13.2;
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.12 22-Jan-2005  chs branches: 1.12.2;
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 05-Sep-2001  tsutsui branches: 1.10.6; 1.10.22;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.9 29-Jun-2000  mrg branches: 1.9.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.8 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.7 24-Mar-1999  mrg branches: 1.7.8;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.6 08-Jun-1998  gwr Add UVM support
 1.5 08-Feb-1998  gwr Factor *peek out of bus_subr.c and move it to autoconf.c
(to reduce duplication). Add bus_tmapin and bus_tmapout
for use in probe functions (gets a temporary mapping).
Add bus_mapout() to undo bus_mapin() if needed.
 1.4 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.3 17-Oct-1997  gwr branches: 1.3.4;
Sync. with the sun3x (mostly cosmetic changes).
 1.2 25-Apr-1997  gwr Moved bus_scan() and bus_print() here from autoconf.c
because they are now different in sun3 vs sun3x.
 1.1 18-Feb-1997  gwr branches: 1.1.2;
Move bus_peek(), bus_mapin() here from autoconf.c so the latter
may be shared with the sun3x port.
 1.1.2.2 12-Mar-1997  is Merge in changes from The Trunk
 1.1.2.1 18-Feb-1997  is file bus_subr.c was added on branch is-newarp on 1997-03-12 14:05:04 +0000
 1.3.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.7.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.9.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.22.5 01-Apr-2005  skrll Sync with HEAD.
 1.10.22.4 24-Jan-2005  skrll Sync with HEAD.
 1.10.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.22.1 03-Aug-2004  skrll Sync with HEAD
 1.10.6.2 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.10.6.1 05-Sep-2001  tsutsui file bus_subr.c was added on branch nathanw_sa on 2001-09-05 13:21:10 +0000
 1.11.8.1 29-Apr-2005  kent sync with -current
 1.12.2.1 12-Feb-2005  yamt use new apis.
 1.13.2.1 30-Dec-2006  yamt sync with head.
 1.14.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.14.20.1 18-Nov-2006  ad Sync with head.
 1.16.56.1 16-May-2008  yamt sync with head.
 1.16.54.1 18-May-2008  yamt sync with head.
 1.16.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.50.1 18-May-2014  rmind sync with head
 1.17.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.9 09-Feb-2002  chs branches: 1.9.118; 1.9.120; 1.9.122;
define the sun3-only bits all the time, helps when building LKMs.
 1.8 05-Feb-1998  gwr branches: 1.8.28; 1.8.32;
Merge arch/sun3x into arch/sun3
 1.7 27-Jan-1997  gwr branches: 1.7.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.5 11-Feb-1995  gwr Add BUSERR_MMU (and some comments)
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.1 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.7.14.1 27-Jan-1998  gwr The MMU-related stuff is sun3 specific.
 1.8.32.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.28.1 16-Mar-2002  jdolecek Catch up with -current.
 1.9.122.1 16-May-2008  yamt sync with head.
 1.9.120.1 18-May-2008  yamt sync with head.
 1.9.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.24 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.23 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.22 07-Sep-2013  tsutsui Whitespace cleanup.
 1.21 21-Nov-2009  rmind branches: 1.21.12; 1.21.22; 1.21.26;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.20 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.19 24-Dec-2005  perry branches: 1.19.74; 1.19.76; 1.19.78;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.18 11-Dec-2005  christos merge ktrace-lwp.
 1.17 22-Jan-2005  chs branches: 1.17.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.16 15-Jul-2003  lukem branches: 1.16.8;
__KERNEL_RCSID()
 1.15 01-Apr-2003  thorpej branches: 1.15.2;
Use PAGE_SIZE rather than NBPG.
 1.14 05-Sep-2001  tsutsui branches: 1.14.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.13 22-Feb-2001  chs branches: 1.13.4;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.12 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.11 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.10 05-Feb-1998  gwr branches: 1.10.14;
Merge arch/sun3x into arch/sun3
 1.9 06-Oct-1997  gwr branches: 1.9.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.8 27-Jan-1997  gwr branches: 1.8.8;
Changed "machdep.h" to <machine/machdep.h>
 1.7 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.5 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.4 13-Oct-1996  christos backout previous kprintf change
 1.3 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2 26-Apr-1995  gwr Some corrections for cache control. Still needs work...
 1.1 13-Apr-1995  gwr First cut at code to support the VAC on 3/260 machines.
Not yet working, but the brave might play with it...
 1.8.8.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.9.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.10.14.2 12-Mar-2001  bouyer Sync with HEAD.
 1.10.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.14.6.2 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.14.6.1 05-Sep-2001  tsutsui file cache.c was added on branch nathanw_sa on 2001-09-05 13:21:10 +0000
 1.15.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.8.1 29-Apr-2005  kent sync with -current
 1.17.8.1 21-Jun-2006  yamt sync with head.
 1.19.78.2 11-Mar-2010  yamt sync with head
 1.19.78.1 16-May-2008  yamt sync with head.
 1.19.76.1 18-May-2008  yamt sync with head.
 1.19.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.26.1 18-May-2014  rmind sync with head
 1.21.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.12.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 04-May-2008  martin Move to 2 clause TNF license
 1.5 07-Feb-2001  tsutsui branches: 1.5.126; 1.5.128; 1.5.130;
Use common %cacr definitions between sun3 and sun3x.
%cacr bits added on 68030 don't cause any sideeffect on 68020.

XXX: We probably need <m68k/cacr.h>. See comments in <m68k/cpu.h>.
 1.4 05-Feb-1998  gwr branches: 1.4.14;
Merge arch/sun3x into arch/sun3
 1.3 17-Dec-1996  gwr branches: 1.3.4;
The declarations for cache_flush_xxx are now in machdep.h
 1.2 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.1 13-Apr-1995  gwr First cut at code to support the VAC on 3/260 machines.
Not yet working, but the brave might play with it...
 1.3.4.2 27-Jan-1998  gwr Bits in the cacr register.
 1.3.4.1 25-Jan-1998  gwr Resurrect.
 1.4.14.1 11-Feb-2001  bouyer Sync with HEAD.
 1.5.130.1 16-May-2008  yamt sync with head.
 1.5.128.1 18-May-2008  yamt sync with head.
 1.5.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.69 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.68 15-Jan-2024  thorpej Provide a m68k_count_intr() macro that hides the details of how interrupts
are counted, and also ensures that ci_data.cpu_nintr is incremented.
 1.67 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.66 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.65 02-Apr-2021  rin For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived
variables into u_int, to match with kern/subr_evcnt.c.
 1.64 07-Sep-2013  tsutsui branches: 1.64.42; 1.64.44;
Whitespace cleanup.
 1.63 20-Dec-2010  matt branches: 1.63.8; 1.63.18; 1.63.22;
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.62 28-Jan-2010  mbalmer branches: 1.62.4;
Fix language.
 1.61 29-Mar-2008  tsutsui branches: 1.61.4;
Don't forget to initialize sc_dev.
 1.60 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.59 26-Jan-2008  tsutsui branches: 1.59.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.58 10-Jan-2008  tsutsui Move todr_attach(9) calls from each MD attachment to MI intersil7170_attach().
 1.57 04-Oct-2006  tsutsui branches: 1.57.28; 1.57.34; 1.57.42;
Make sun3 port use MI mk48txx(4) and intersil7170(4) TOD clock drivers
with bus_space(9) support.
Note clock device name in obio.sun3 is renamed to oclock to use the same
MI attribute (intersil7170) with sun3x.

Tested on 3/80 and TME emulating 3/120 (but not on 3/4xx VME monsters).
 1.56 05-Sep-2006  gdamore branches: 1.56.2; 1.56.4;
Update sun3 to use timecounters (interrupt clock only) and generic-todr.
 1.55 11-Dec-2005  christos branches: 1.55.4; 1.55.8;
merge ktrace-lwp.
 1.54 22-Jan-2005  chs branches: 1.54.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.53 22-Sep-2003  tsutsui branches: 1.53.8;
Count clock interrupts.
clock_intr() functions on sun3 are called directly without dispatchers.

XXX should use evcnt(9)?
 1.52 22-Sep-2003  tsutsui - replace a magic number with macro
- some KNF
 1.51 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.50 15-Jul-2003  lukem __KERNEL_RCSID()
 1.49 02-Oct-2002  thorpej branches: 1.49.6;
Add trailing ; to CFATTACH_DECL.
 1.48 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.47 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.46 05-Sep-2001  tsutsui branches: 1.46.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.45 03-Feb-2001  tsutsui branches: 1.45.4;
Remove some of broken cf_unit usage.
 1.44 19-Jan-2000  msaitoh check whether tv_usec >= 1000000
 1.43 05-Feb-1998  gwr branches: 1.43.14;
Merge arch/sun3x into arch/sun3
 1.42 12-Jan-1998  thorpej branches: 1.42.2;
Update for changes to config.
 1.41 17-Oct-1997  gwr Make the "LED slow-down on load" thing an option.
 1.40 28-Apr-1997  gwr No longer needs an early init call (just normal autoconfig).
Only animate the LEDs when we were idle (like SunOS).
 1.39 18-Mar-1997  gwr Add /dev/leds (closes PR#2172 from der Mouse)
 1.38 05-Mar-1997  gwr Do some of the clock init a little later, in clock_attach.
(plus some other mostly cosmetic cleanup)
 1.37 05-Mar-1997  gwr No need to block out ZS interrupts in clock_intr() as long as
we are careful to use the single_inst_* macros.
 1.36 04-Mar-1997  gwr Fix race conditions that allowed the interrupt latch register to have
the wrong value. Now using the <m68k/asm_single.h> stuff from Leo.
 1.35 19-Feb-1997  gwr Make this use sys/dev/clock_subr.[ch]
 1.34 27-Jan-1997  gwr branches: 1.34.4;
Use sunmon_abort() instead of mon_panic(), etc.
 1.33 27-Jan-1997  gwr Changed "machdep.h" to <machine/machdep.h>
 1.32 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.31 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.30 13-Oct-1996  christos backout previous kprintf change
 1.29 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.28 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.27 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.26 21-Aug-1995  gwr Fix vectored interrupts, and do autovectored ones similarly.
 1.25 08-Aug-1995  gwr Fix "oops" line that was supposed to increment tv_usec
(just to make sure time keeps moving 8^)
 1.24 07-Apr-1995  gwr Make sure we do not enable clock interrupts too early.
 1.23 18-Jan-1995  gwr Cleanup (add some checks, remove dead code).
 1.22 30-Dec-1994  gwr void microtime();
 1.21 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.20 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.19 26-Oct-1994  cgd new RCS ID format.
 1.18 26-Sep-1994  gwr branches: 1.18.2;
Fix routines to read/write the stupid intersil clock.
 1.17 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.16 01-Jun-1994  gwr Cute moving light in the diag LEDs like SunOS does.
(OK you can hit me once for frobbing with such useless things :-)
 1.15 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.14 06-May-1994  gwr Tracking 4.4 integration
 1.13 01-Mar-1994  glass bugs fixed and cleanup
 1.12 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.11 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.10 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.9 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.8 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.7 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.6 08-Aug-1993  glass lots of changes, too many printfs
 1.5 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.4 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.3 26-Jun-1993  glass added resettodr()
 1.2 25-Jun-1993  glass new intersil clock support; this time written from datasheet
still need to write resettodr()
 1.1 25-Jun-1993  glass initial commit
 1.18.2.2 26-Sep-1994  gwr Fix routines to read/write the stupid intersil clock.
 1.18.2.1 26-Sep-1994  gwr file clock.c was added on branch netbsd-1-0 on 1994-09-26 17:25:24 +0000
 1.34.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.42.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.43.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.43.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.45.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.45.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.46.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.46.6.1 05-Sep-2001  nathanw file clock.c was added on branch nathanw_sa on 2002-10-18 02:40:23 +0000
 1.49.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.49.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.49.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.49.6.1 03-Aug-2004  skrll Sync with HEAD
 1.53.8.1 29-Apr-2005  kent sync with -current
 1.54.8.3 04-Feb-2008  yamt sync with head.
 1.54.8.2 21-Jan-2008  yamt sync with head
 1.54.8.1 30-Dec-2006  yamt sync with head.
 1.55.8.1 14-Sep-2006  yamt sync with head.
 1.55.4.1 09-Sep-2006  rpaulo sync with head
 1.56.4.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.56.2.1 18-Nov-2006  ad Sync with head.
 1.57.42.1 10-Jan-2008  bouyer Sync with HEAD
 1.57.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.57.28.1 23-Mar-2008  matt sync with HEAD
 1.59.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.61.4.1 11-Mar-2010  yamt sync with head
 1.62.4.1 05-Mar-2011  rmind sync with head
 1.63.22.1 18-May-2014  rmind sync with head
 1.63.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.63.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.64.44.1 03-Apr-2021  thorpej Sync with HEAD.
 1.64.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.70 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.69 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.68 19-Jul-2002  thorpej Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device. While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
 1.67 17-Jun-2002  christos MD systrace gluons.
 1.66 12-Jan-2002  manu branches: 1.66.8;
Added clockctl
 1.65 21-Mar-2001  lukem branches: 1.65.2; 1.65.8;
move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
 1.64 14-Apr-2000  tsutsui branches: 1.64.6;
Typo in comments. (Zilog 8350 -> 8530)
 1.63 19-Apr-1999  kleink branches: 1.63.2;
Add COMPAT_SVR4 for m68k.
 1.62 13-Nov-1998  oster branches: 1.62.6;
Updating of bdev's and cdev's to support RAIDframe.
 1.61 10-Oct-1998  thorpej Add scsibus entry points to the cdevsw[].
 1.60 26-Feb-1998  gwr Fix build with NFB=0
 1.59 11-Feb-1998  gwr remove ifdef sun3x
 1.58 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.57 17-Oct-1997  christos branches: 1.57.4;
fix chrtoblk prototype
 1.56 13-Oct-1997  explorer o Make usage of /dev/random dependant on
pseudo-device rnd # /dev/random and in-kernel generator
in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
that this code is derived in part from Ted Tyso's linux code.
 1.55 26-Mar-1997  gwr branches: 1.55.4;
Add cdev_lpt_init(NPP,pp) for the 3/80
 1.54 25-Feb-1997  gwr Add ch, fd, ss, tun, uk
Add cdev for md
Add lkm slots
 1.53 28-Dec-1996  pk branches: 1.53.6;
rename: ramdisk => md
 1.52 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.51 04-Nov-1996  gwr Clean out some hacks left over from the old zs driver.
 1.50 22-Oct-1996  gwr Define the *poll functions.
 1.49 05-Sep-1996  mycroft Remove duplicate declarations of LKM functions and macros.
 1.48 14-Mar-1996  christos fdopen -> filedescopen
 1.47 04-Feb-1996  gwr Quick fix to make this build. More to come...
 1.46 24-Jan-1996  gwr Update for the new z8530 driver
 1.45 29-Oct-1995  gwr Fix previous change that broke kd console
 1.44 08-Oct-1995  gwr branches: 1.44.2;
Add rd, xd, xy. Sort the includes.
 1.43 22-Aug-1995  jtc inclide -> include; PR #1400
 1.42 17-Aug-1995  thorpej Add entries for the ccd.
 1.41 04-Jul-1995  mycroft Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely. Remove d_strategy from cdevsw to
force the abstraction barrier.
 1.40 26-Apr-1995  gwr pt_tty -> ptytty
 1.39 13-Apr-1995  gwr Recover from the crusade. (sigh)
 1.38 10-Apr-1995  mycroft Fix declarations of zscnprobe_[ab].
 1.37 10-Apr-1995  mycroft Fix typo.
 1.36 10-Apr-1995  mycroft Rewrite in new format.
 1.35 08-Apr-1995  gwr Fix CGTWO entry
 1.34 07-Apr-1995  gwr Add cgtwo
 1.33 26-Mar-1995  gwr Add "tun" device.
 1.32 10-Mar-1995  gwr Add bwtwo, cgfour, and fb
 1.31 26-Jan-1995  gwr Add vnd
 1.30 25-Jan-1995  cgd vn -> vnd renaming, for consistency
 1.29 16-Jan-1995  gwr Oops... make keyboard/display console work again.
 1.28 20-Dec-1994  gwr better fix than that last one...
 1.27 20-Dec-1994  gwr Make "kd" required for the moment.
 1.26 14-Dec-1994  mycroft Remove extra arg to d_open.
 1.25 23-Nov-1994  gwr Add nullcnpollc() so DDB works again.
 1.24 23-Nov-1994  gwr Update to match new d_ioctl prototype.
 1.23 14-Nov-1994  christos changed open prototype
 1.22 26-Oct-1994  cgd new RCS ID format.
 1.21 20-Sep-1994  gwr branches: 1.21.2;
Move internal swap device to BLK major 4 (xy wants 3).
Add some more comments about Sun device numbers.
 1.20 14-Jul-1994  gwr Add "evil empire" copyright to avoid a fight.
 1.19 28-Jun-1994  gwr branches: 1.19.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.18 14-Jun-1994  gwr Add functions for new FS code: chrtoblk, isdisk, ...
 1.17 01-Jun-1994  gwr mem.c: Add mmap support to /dev/mem, validate offset for I/O on same.
conf.c: Add mmmap, move MEM_MAJ to 3 for SunOS compatibility.
 1.16 20-May-1994  gwr Add iskmemdev(), iszerodev()
 1.15 12-May-1994  gwr Declare strategy functions as type void again.
 1.14 06-May-1994  gwr Tracking 4.4 integration
 1.13 06-May-1994  gwr Fix swapdev again but do it right this time...
(swapdev wants the BLOCK major number)
 1.12 05-May-1994  gwr Fix major number of swapdev
 1.11 05-May-1994  gwr Fix prom entry for Adam's version of prom.c
 1.10 04-May-1994  gwr New style (easier to read), use SunOS-4.1.1 device numbers.
 1.9 01-Mar-1994  glass bugs fixed and cleanup
 1.8 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.7 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 08-Aug-1993  glass lots of changes, too many printfs
 1.4 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.3 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.19.2.1 15-Jul-1994  cgd update from trunk.
 1.21.2.2 20-Sep-1994  gwr Move internal swap device to BLK major 4 (xy wants 3).
Add some more comments about Sun device numbers.
 1.21.2.1 20-Sep-1994  gwr file conf.c was added on branch netbsd-1-0 on 1994-09-20 16:52:57 +0000
 1.44.2.1 29-Oct-1995  gwr Update from HEAD: make kd console work again.
 1.53.6.1 12-Mar-1997  is Merge in changes from The Trunk
 1.55.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.57.4.1 27-Jan-1998  gwr No longer need the ifdef sun3x
 1.62.6.1 21-Jun-1999  thorpej Sync w/ -current.
 1.63.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.63.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.64.6.1 09-Apr-2001  nathanw Catch up with -current.
 1.65.8.6 11-Nov-2002  nathanw Catch up to -current
 1.65.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.65.8.4 01-Aug-2002  nathanw Catch up to -current.
 1.65.8.3 20-Jun-2002  nathanw Catch up to -current.
 1.65.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.65.8.1 21-Mar-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-02-28 04:12:24 +0000
 1.65.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.65.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.65.2.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.66.8.3 21-Jul-2002  gehenna catch up with -current.
 1.66.8.2 15-Jul-2002  gehenna catch up with -current.
 1.66.8.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.9 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.8 01-Mar-1994  glass bugs fixed and cleanup
 1.7 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 08-Aug-1993  glass lots of changes, too many printfs
 1.4 05-Aug-1993  glass gets to consinit() and blows up
 1.3 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 25-Jun-1993  glass initial commit
 1.24 07-Sep-2013  tsutsui Whitespace cleanup.
 1.23 28-Apr-2008  martin branches: 1.23.34; 1.23.44; 1.23.50;
Remove clause 3 and 4 from TNF licenses
 1.22 11-Dec-2005  christos branches: 1.22.74; 1.22.76; 1.22.78;
merge ktrace-lwp.
 1.21 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.20 15-Jul-2003  lukem branches: 1.20.8;
__KERNEL_RCSID()
 1.19 05-Sep-2001  tsutsui branches: 1.19.6; 1.19.22;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.18 04-Aug-2001  chs rewrite set_segmap_allctx() in assembly.
reduces cpu usage of sequential write()s to a file by 5%.
 1.17 05-Feb-1998  gwr branches: 1.17.28;
Merge arch/sun3x into arch/sun3
 1.16 06-Oct-1997  gwr branches: 1.16.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.15 27-Jan-1997  gwr branches: 1.15.8;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.14 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.13 17-Nov-1995  gwr cosmetic
 1.12 10-Oct-1995  gwr branches: 1.12.2;
New function: set_segmap_allctx()
 1.11 01-Jun-1995  gwr Make this build in libsa
 1.10 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 05-Jul-1994  gwr Fix uninitialized local variable in get_pte_pmeg which caused
random physical pages to be unmapped, etc.
 1.7 06-May-1994  gwr Tracking 4.4 integration
 1.6 01-Mar-1994  glass bugs fixed and cleanup
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 08-Aug-1993  glass lots of changes, too many printfs
 1.1 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.12.2.1 18-Nov-1995  gwr cosmetic
 1.15.8.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.16.4.1 27-Jan-1998  gwr Make get_pte/set_pte match the prototypes, etc.
 1.17.28.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.28.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.19.22.4 24-Jan-2005  skrll Sync with HEAD.
 1.19.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.22.1 03-Aug-2004  skrll Sync with HEAD
 1.19.6.2 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.19.6.1 05-Sep-2001  tsutsui file control.c was added on branch nathanw_sa on 2001-09-05 13:21:10 +0000
 1.20.8.1 29-Apr-2005  kent sync with -current
 1.22.78.1 16-May-2008  yamt sync with head.
 1.22.76.1 18-May-2008  yamt sync with head.
 1.22.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.50.1 18-May-2014  rmind sync with head
 1.23.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.22 11-Dec-2005  christos branches: 1.22.74; 1.22.76; 1.22.78;
merge ktrace-lwp.
 1.21 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.20 05-Sep-2001  tsutsui branches: 1.20.6; 1.20.22; 1.20.30;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.19 05-Feb-1998  gwr branches: 1.19.28;
Merge arch/sun3x into arch/sun3
 1.18 06-Oct-1997  gwr branches: 1.18.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.17 28-Apr-1997  gwr branches: 1.17.4;
Fix declaration of get_control_byte().
 1.16 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.15 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.14 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.13 10-Oct-1995  gwr New function: set_segmap_allctx()
 1.12 11-Feb-1995  gwr minor cleanup
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.7 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 02-Aug-1993  glass stupid cleanup; fixes to mon.h; rewrote asm.h based on old asm.h
and the i386 one from jolitz
cleaned up ending of virtaul addr space.
 1.4 30-Jul-1993  glass whatever was necessary to make the rest of it work.
 1.3 27-Jul-1993  glass new pmap module
 1.2 29-Jun-1993  glass additional needed functionality
 1.1 25-Jun-1993  glass adding include files...not much of this works
 1.17.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 27-Jan-1998  gwr Move out enable register values, and some other cruft.
 1.19.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.20.30.1 29-Apr-2005  kent sync with -current
 1.20.22.1 24-Jan-2005  skrll Sync with HEAD.
 1.20.6.2 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.20.6.1 05-Sep-2001  tsutsui file control.h was added on branch nathanw_sa on 2001-09-05 13:21:10 +0000
 1.22.78.1 16-May-2008  yamt sync with head.
 1.22.76.1 18-May-2008  yamt sync with head.
 1.22.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.5 21-Jan-1994  glass restored wrong ?fc register on su*() routines. found by chris
 1.4 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.1 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.6 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.5 22-Feb-2001  chs branches: 1.5.40; 1.5.70; 1.5.72;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.4 09-Oct-1997  jtc branches: 1.4.18;
Fix tipo inherited from old version of TNF copyright template.
 1.3 20-Nov-1996  gwr branches: 1.3.10;
Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.2 24-May-1995  gwr Merged locore code back into locore.s
 1.1 24-May-1995  gwr Merged locore code back into locore.s
 1.3.10.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.18.1 12-Mar-2001  bouyer Sync with HEAD.
 1.5.72.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.70.1 18-Nov-2006  ad Sync with head.
 1.5.40.1 30-Dec-2006  yamt sync with head.
 1.3 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 08-Aug-1993  glass lots of changes, too many printfs
 1.29 23-Feb-2021  mrg introduce DDB_END_CMD and replace more than 20 copies of the same
list of NULLs and 0. idea from rillig@.

all touched ports built, several booted.
 1.28 07-Sep-2013  tsutsui branches: 1.28.42;
Whitespace cleanup.
 1.27 06-Jun-2010  mrg branches: 1.27.8; 1.27.18; 1.27.22;
implement ddb help for sun2/sun3 commands. PR#38310 and PR#38308.
 1.26 28-Apr-2008  martin branches: 1.26.20; 1.26.22;
Remove clause 3 and 4 from TNF licenses
 1.25 17-Oct-2007  garbled branches: 1.25.16; 1.25.18; 1.25.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.24 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.23 22-Feb-2007  tsutsui branches: 1.23.4; 1.23.12; 1.23.20; 1.23.22;
Fix lossage on bool changes.
 1.22 11-Dec-2005  christos branches: 1.22.26;
merge ktrace-lwp.
 1.21 03-Jun-2005  tsutsui branches: 1.21.2;
Adapt to ddb constification.
 1.20 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.19 15-Jul-2003  lukem branches: 1.19.8;
__KERNEL_RCSID()
 1.18 01-Apr-2003  thorpej branches: 1.18.2;
Use PAGE_SIZE rather than NBPG.
 1.17 28-May-2001  chs branches: 1.17.8;
style cleanup.
 1.16 22-Jan-2001  jdolecek branches: 1.16.2;
Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
 1.15 03-Nov-2000  tsutsui Fix some db_printf() format.
 1.14 28-Oct-1999  lukem sort db_machine_cmds[]
 1.13 08-Jun-1998  gwr branches: 1.13.14; 1.13.16; 1.13.18;
Add UVM support
 1.12 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.11 27-Jan-1997  gwr branches: 1.11.14;
Nuke sunmon.h, add machdep.h
 1.10 27-Jan-1997  gwr Reorder to be somewhat more "top-down" (cosmetic).
Fix copyright.
 1.9 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.8 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.7 16-Feb-1996  gwr Moved functions for debugger memory access to db_memrw.c
so they can be pulled in for either ddb and/or kgdb.
 1.6 23-Oct-1995  gwr Use correct size access (char,short,int) in db_read_bytes, db_write_bytes
otherwise access to some device registers will give misleading results!
(I learned this the hard way while debugging the NCR SCSI driver...)
 1.5 27-Jun-1995  gwr branches: 1.5.2;
Add/correct some cache-flush logic to deal with the fact that the
VAC has ref/mod bits that need write-back treatment.
 1.4 26-Apr-1995  gwr Some corrections for cache control. Still needs work...
 1.3 13-Feb-1995  gwr Add "machine pgmap" (like PROM "p" command).
 1.2 11-Feb-1995  gwr Use kernel_text instead of start.
 1.1 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.5.2.1 23-Oct-1995  gwr Update from main branch.
 1.11.14.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.13.18.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.16.1 15-Nov-1999  fvdl Sync with -current
 1.13.14.3 11-Feb-2001  bouyer Sync with HEAD.
 1.13.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.13.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.17.8.2 28-May-2001  chs style cleanup.
 1.17.8.1 28-May-2001  chs file db_machdep.c was added on branch nathanw_sa on 2001-05-28 22:00:13 +0000
 1.18.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.18.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.21.2.2 27-Oct-2007  yamt sync with head.
 1.21.2.1 26-Feb-2007  yamt sync with head.
 1.22.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.23.22.1 06-Nov-2007  matt sync with HEAD
 1.23.20.1 02-Oct-2007  joerg Sync with HEAD.
 1.23.12.1 03-Oct-2007  garbled Sync with HEAD
 1.23.4.1 09-Oct-2007  ad Sync with head.
 1.25.20.2 11-Aug-2010  yamt sync with head.
 1.25.20.1 16-May-2008  yamt sync with head.
 1.25.18.1 18-May-2008  yamt sync with head.
 1.25.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.22.1 03-Jul-2010  rmind sync with head
 1.26.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.27.22.1 18-May-2014  rmind sync with head
 1.27.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.28 07-Sep-2013  tsutsui Whitespace cleanup.
 1.27 28-Apr-2008  martin branches: 1.27.34; 1.27.44; 1.27.50;
Remove clause 3 and 4 from TNF licenses
 1.26 11-Dec-2005  christos branches: 1.26.74; 1.26.76; 1.26.78;
merge ktrace-lwp.
 1.25 03-Jun-2005  tsutsui Adapt to ddb constification.
 1.24 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.23 15-Jul-2003  lukem branches: 1.23.8;
__KERNEL_RCSID()
 1.22 20-Oct-2002  chs branches: 1.22.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.21 05-Sep-2001  tsutsui branches: 1.21.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.20 29-Jun-2000  mrg branches: 1.20.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.19 05-Feb-1998  gwr branches: 1.19.14;
Merge arch/sun3x into arch/sun3
 1.18 10-Jun-1997  veego branches: 1.18.10;
s/_trunc_page/m68k_trunc_page/
 1.17 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.16 27-Jan-1997  gwr Changed "machdep.h" to <machine/machdep.h>
 1.15 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.14 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.13 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.12 17-Jun-1996  gwr branches: 1.12.2;
KGDB support
 1.11 20-Feb-1996  gwr Oh. Now that size is unsigned, (size >= 0) is always true.
 1.10 16-Feb-1996  gwr prototype fixes
 1.9 16-Feb-1996  gwr Resurrecting db_memrw.c to hold some code shared by ddb and kgdb.
 1.8 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.7 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 02-Dec-1994  gwr Remove some complication that is no longer needed now that
traps in ddb are handled correctly.
 1.4 28-Nov-1994  gwr Update a comment to match code...
 1.3 28-Nov-1994  gwr Fix syscall arg copyin, etc.
 1.2 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.1 17-Nov-1994  gwr Implements db_write_bytes() for the sun3.
(Needed now that kernel text is read-only 8-)
 1.12.2.2 17-Jun-1996  gwr KGDB support
 1.12.2.1 17-Jun-1996  gwr file db_memrw.c was added on branch netbsd-1-2 on 1996-06-17 15:40:49 +0000
 1.18.10.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.19.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.20.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.6.2 11-Nov-2002  nathanw Catch up to -current
 1.21.6.1 05-Sep-2001  nathanw file db_memrw.c was added on branch nathanw_sa on 2002-11-11 22:05:24 +0000
 1.22.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.22.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.22.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.22.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.22.6.1 03-Aug-2004  skrll Sync with HEAD
 1.23.8.1 29-Apr-2005  kent sync with -current
 1.26.78.1 16-May-2008  yamt sync with head.
 1.26.76.1 18-May-2008  yamt sync with head.
 1.26.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.50.1 18-May-2014  rmind sync with head
 1.27.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 08-Aug-1993  glass lots of changes, too many printfs
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 17-Nov-1994  gwr Implements db_write_bytes() for the sun3.
(Needed now that kernel text is read-only 8-)
 1.5 24-May-1995  gwr Merged locore code back into locore.s
 1.4 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.3 26-Oct-1994  cgd new RCS ID format.
 1.2 19-Jul-1994  gwr branches: 1.2.2;
Answer a silly question in a comment.
 1.1 04-May-1994  gwr branches: 1.1.2;
Implements the functions: delay(), delay2us()
 1.1.2.1 19-Jul-1994  cgd from trunk, per gwr.
 1.2.2.2 19-Jul-1994  gwr Answer a silly question in a comment.
 1.2.2.1 19-Jul-1994  gwr file delay.s was added on branch netbsd-1-0 on 1994-07-19 02:39:19 +0000
 1.34 15-Nov-2003  bouyer Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
groveling code to find a NetBSD disklabel in the first sector (so that it
can find a label at the old sun3 LABELOFFSET) as a fallback is not
label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
a DIOCWDINFO after writing the disklabel to the raw partition in the
-r/-I case (so that the kernel can convert the label if needed).
 1.33 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32 15-Jul-2003  lukem __KERNEL_RCSID()
 1.31 10-May-2003  thorpej branches: 1.31.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.30 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.29 19-Feb-2002  wiz strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.28 27-Oct-2001  he branches: 1.28.2;
Pull down revision 1.24.4.1 from the netbsd-1-5 branch:
Make sure that an unlabeled device gets at least RAW_PART
in the default in-core disklabel, instead of only a single
partition, so that applying a new disklabel can work normally.
 1.27 05-Sep-2001  tsutsui branches: 1.27.2; 1.27.4;
bcopy() -> memcpy(), bzero() -> memset()
 1.26 22-Feb-2001  chs branches: 1.26.4;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.25 20-Nov-2000  chs rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
 1.24 19-May-2000  thorpej branches: 1.24.4;
A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
 1.23 16-May-2000  thorpej Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.22 30-Mar-2000  tsutsui Remove register declarations.
 1.21 07-Mar-2000  tsutsui Use DISKPART/DISKMINOR/DISKUNIT instead of dkpart/dkminor/dkunit.
 1.20 18-Jan-2000  thorpej Use b_cylinder as defined in sys/buf.h
 1.19 20-Jun-1998  mrg branches: 1.19.14; 1.19.20;
use <dev/sun/disklabel.h>
 1.18 04-Mar-1997  gwr Fix a warning.
 1.17 04-Mar-1997  gwr Reinstate "isbad" which is used by the xd and xy drivers.
 1.16 10-Feb-1997  gwr minor nit in bounds_check_with_label()
 1.15 17-Dec-1996  gwr branches: 1.15.4;
Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.14 26-Sep-1996  gwr Fix bounds_check_with_label() as suggested in PR#2598 (Thanks to der Mouse)
 1.13 05-May-1996  gwr proto now says void dk_establish()
 1.12 26-Apr-1996  gwr Catch up with some prototype changes.
 1.11 17-Nov-1995  gwr Give translated label a valid magic number
 1.10 30-Oct-1995  gwr Add the function isbad(), needed by xd/xy drivers.
 1.9 30-May-1995  gwr branches: 1.9.2;
New version that supports writing a Sun disklabel (rewritten).
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 23-Jul-1994  gwr branches: 1.6.2;
Initialize p_fstype when reading Sun disklabel.
(Now I can open other partitions, mount /usr :-)
 1.5 13-May-1994  gwr branches: 1.5.2;
SCSI driver works!
 1.4 01-Mar-1994  glass bugs fixed and cleanup
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.1 25-Jun-1993  glass initial commit
 1.5.2.1 24-Jul-1994  cgd update per gwr.
 1.6.2.2 23-Jul-1994  gwr Initialize p_fstype when reading Sun disklabel.
(Now I can open other partitions, mount /usr :-)
 1.6.2.1 23-Jul-1994  gwr file disksubr.c was added on branch netbsd-1-0 on 1994-07-23 03:27:29 +0000
 1.9.2.2 18-Nov-1995  gwr Sync with HEAD: set magic numbers...
 1.9.2.1 30-Oct-1995  gwr Sync. with HEAD: Add the function isbad(), needed by xd/xy drivers.
 1.15.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.19.20.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

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

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

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.19.14.3 12-Mar-2001  bouyer Sync with HEAD.
 1.19.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.19.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.4.1 30-Sep-2001  he Apply patch (requested by he):
Make sure that an unlabeled device gets at least RAW_PART in the
default in-core disklabel, so that applying a new disklabel can work.
 1.26.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.26.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.26.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.27.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.27.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.28.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.28.2.1 27-Oct-2001  nathanw file disksubr.c was added on branch nathanw_sa on 2002-02-28 04:12:24 +0000
 1.31.2.1 03-Aug-2004  skrll Sync with HEAD
 1.43 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.42 01-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage DVMA mappings.
 1.41 01-Jun-2017  chs remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.40 07-Nov-2013  christos branches: 1.40.6;
fix unused warnings
 1.39 07-Sep-2013  tsutsui Whitespace cleanup.
 1.38 29-Jan-2012  para branches: 1.38.6; 1.38.10;
adapt to recent changes in uvm
 1.37 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.36 11-Dec-2009  tsutsui branches: 1.36.12; 1.36.16;
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 sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.35 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.34 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.33 04-Mar-2007  christos branches: 1.33.40; 1.33.42; 1.33.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.32 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.31 03-Feb-2007  tsutsui branches: 1.31.2;
Implement bus_dmamap_load(9) and bus_dmamap_unload(9) for sun3.
 1.30 02-Feb-2007  tsutsui KNF
 1.29 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.28 11-Dec-2005  christos branches: 1.28.20; 1.28.22;
merge ktrace-lwp.
 1.27 01-Apr-2005  yamt branches: 1.27.2;
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.26 22-Jan-2005  chs branches: 1.26.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.25 15-Jul-2003  lukem branches: 1.25.8;
__KERNEL_RCSID()
 1.24 27-Sep-2002  provos branches: 1.24.6;
remove trailing \n in panic(). approved perry.
 1.23 25-Sep-2002  thorpej Don't use rmaps; use extent maps.
 1.22 05-Sep-2001  tsutsui branches: 1.22.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.21 14-Jan-2001  thorpej branches: 1.21.4;
splimp() -> splvm()
 1.20 03-Nov-2000  tsutsui Fix printf formats in panic messages.
 1.19 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.18 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.17 26-May-1999  thorpej branches: 1.17.2;
Add a comment explaining why INTRSAFE isn't needed here.
 1.16 26-May-1999  thorpej Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.
 1.15 24-Mar-1999  mrg branches: 1.15.4;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.14 08-Jun-1998  gwr Add UVM support
 1.13 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.12 22-Jan-1998  gwr branches: 1.12.2;
Use the same names as the sun3x (DVMA_MAP_*)
 1.11 17-Oct-1997  gwr Make DVMA space pointers (void *) like the sun3x.
 1.10 10-Jun-1997  veego s/_round_seg/m68k_round_seg/ s/_round_page/m68k_round_page/
 1.9 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.8 27-Jan-1997  gwr Changed "machdep.h" to <machine/machdep.h>
 1.7 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.6 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.5 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.4 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.3 10-Oct-1995  gwr Need to use set_segmap_allctx() on kernel-space segments.
(Thanks again to David Jones!)
 1.2 08-Oct-1995  gwr Fix a big "oops" (Many thanks to David Jones!)
 1.1 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.12.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.15.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.17.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.17.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.17.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.21.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.22.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.22.6.1 05-Sep-2001  nathanw file dvma.c was added on branch nathanw_sa on 2002-10-18 02:40:24 +0000
 1.24.6.5 01-Apr-2005  skrll Sync with HEAD.
 1.24.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.24.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.6.1 03-Aug-2004  skrll Sync with HEAD
 1.25.8.1 29-Apr-2005  kent sync with -current
 1.26.2.1 12-Feb-2005  yamt use 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 30-Dec-2006  yamt sync with head.
 1.28.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.28.20.2 09-Feb-2007  ad Sync with HEAD.
 1.28.20.1 18-Nov-2006  ad Sync with head.
 1.31.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.31.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.33.44.2 11-Mar-2010  yamt sync with head
 1.33.44.1 16-May-2008  yamt sync with head.
 1.33.42.1 18-May-2008  yamt sync with head.
 1.33.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.36.16.1 18-Feb-2012  mrg merge to -current.
 1.36.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.36.12.1 17-Apr-2012  yamt sync with head
 1.38.10.1 18-May-2014  rmind sync with head
 1.38.6.2 03-Dec-2017  jdolecek update from HEAD
 1.38.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.6.1 28-Aug-2017  skrll Sync with HEAD
 1.8 07-Sep-2013  tsutsui Whitespace cleanup.
 1.7 28-Apr-2008  martin branches: 1.7.34; 1.7.44; 1.7.50;
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 19-Sep-2001  thorpej branches: 1.3.4; 1.3.20;
machine/fbio.h -> dev/sun/fbio.h
 1.2 05-Feb-1998  gwr branches: 1.2.26; 1.2.28;
Merge arch/sun3x into arch/sun3
 1.1 26-Jan-1998  gwr branches: 1.1.2;
file enable.c was initially added on branch gwr-3x3.
 1.1.2.1 26-Jan-1998  gwr Sun3 enable register stuff.
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.26.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.20.4 24-Jan-2005  skrll Sync with HEAD.
 1.3.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.20.1 03-Aug-2004  skrll Sync with HEAD
 1.3.4.2 19-Sep-2001  thorpej machine/fbio.h -> dev/sun/fbio.h
 1.3.4.1 19-Sep-2001  thorpej file enable.c was added on branch nathanw_sa on 2001-09-19 18:10:34 +0000
 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.7.50.1 18-May-2014  rmind sync with head
 1.7.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 05-Feb-1998  gwr branches: 1.2.150; 1.2.152; 1.2.154;
Merge arch/sun3x into arch/sun3
 1.1 26-Jan-1998  gwr branches: 1.1.2;
file enable.h was initially added on branch gwr-3x3.
 1.1.2.1 26-Jan-1998  gwr Sun3 enable register stuff.
 1.2.154.1 16-May-2008  yamt sync with head.
 1.2.152.1 18-May-2008  yamt sync with head.
 1.2.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 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.5 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.4 11-Dec-2005  christos branches: 1.4.100; 1.4.106; 1.4.108;
merge ktrace-lwp.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 05-Feb-1998  gwr branches: 1.2.48;
Merge arch/sun3x into arch/sun3
 1.1 27-Jan-1998  gwr branches: 1.1.2;
file fc.h was initially added on branch gwr-3x3.
 1.1.2.1 27-Jan-1998  gwr Moved function code stuff from machdep.h to fc.h
 1.2.48.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.48.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.48.1 03-Aug-2004  skrll Sync with HEAD
 1.4.108.1 17-Feb-2011  bouyer Sync with HEAD
 1.4.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.100.1 05-Mar-2011  rmind sync with head
 1.26 15-Nov-2011  tsutsui Merge copy-and-pasted fpu_probe() function (to share it among more m68k ports).
Tested on TT030, Sun3/80, and X68030.
 1.25 28-Apr-2008  martin branches: 1.25.34;
Remove clause 3 and 4 from TNF licenses
 1.24 17-Oct-2007  garbled branches: 1.24.16; 1.24.18; 1.24.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.23 02-Jun-2007  tsutsui branches: 1.23.10;
- Don't refer fputype before FPU is probed.
- Call m68k_make_fpu_idle_frame() from initfpu().
 1.22 11-Dec-2005  christos branches: 1.22.30; 1.22.32; 1.22.38;
merge ktrace-lwp.
 1.21 03-Jun-2005  tsutsui branches: 1.21.2;
Constify.
 1.20 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.19 15-Jul-2003  lukem branches: 1.19.8;
__KERNEL_RCSID()
 1.18 23-Jun-2003  martin branches: 1.18.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.17 29-Dec-2002  kristerw Use "__asm" instead of "asm" to pacify lint.
 1.16 03-Feb-2001  tsutsui branches: 1.16.8;
Bring FPU probe code from atari/fpu.c and remove unneeded includes.
 1.15 05-Feb-1998  gwr branches: 1.15.14;
Merge arch/sun3x into arch/sun3
 1.14 06-Oct-1997  gwr branches: 1.14.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.13 17-Mar-1997  gwr branches: 1.13.4;
s/fpu_type/fputype/g
 1.12 27-Jan-1997  gwr Changed "machdep.h" to <machine/machdep.h>
 1.11 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.10 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.9 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.8 13-Oct-1996  christos backout previous kprintf change
 1.7 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.5 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.4 13-Feb-1996  gwr pass correct type to setjmp
 1.3 09-Feb-1996  gwr eliminate setjmp.h
 1.2 27-Jun-1995  gwr Fix warnings about setjmp arg.
 1.1 24-Mar-1995  gwr Determine FPU type during autoconfig.
 1.13.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.14.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.15.14.1 11-Feb-2001  bouyer Sync with HEAD.
 1.16.8.1 29-Dec-2002  thorpej Sync with HEAD.
 1.18.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.18.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.21.2.1 03-Sep-2007  yamt sync with head.
 1.22.38.1 26-Jun-2007  garbled Sync with HEAD.
 1.22.32.1 11-Jul-2007  mjf Sync with head.
 1.22.30.1 09-Jun-2007  ad Sync with head.
 1.23.10.1 06-Nov-2007  matt sync with HEAD
 1.24.20.1 16-May-2008  yamt sync with head.
 1.24.18.1 18-May-2008  yamt sync with head.
 1.24.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.34.1 17-Apr-2012  yamt sync with head
 1.3 07-Sep-2013  tsutsui Whitespace cleanup.
 1.2 28-Jun-2012  tsutsui branches: 1.2.2; 1.2.4;
Fix typo in __KERNEL_RCSID().
 1.1 15-Nov-2011  tsutsui branches: 1.1.8;
Merge copy-and-pasted fpu_probe() function (to share it among more m68k ports).
Tested on TT030, Sun3/80, and X68030.
 1.1.8.4 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.8.3 30-Oct-2012  yamt sync with head
 1.1.8.2 17-Apr-2012  yamt sync with head
 1.1.8.1 15-Nov-2011  yamt file fpu_machdep.c was added on branch yamt-pagecache on 2012-04-17 00:06:58 +0000
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 04-Oct-1997  gwr use common genassym.awk
 1.3 04-Oct-1997  gwr more comments
 1.2 10-Sep-1997  gwr Generalize somewhat (now works for alpha too).
 1.1 03-Feb-1997  gwr branches: 1.1.8;
This little awk program translates the initialized data table found
in the assembly file genassym.s into the usual assym.h file. The
assym.h file generated this way is identical to the output generated
if I simply compile and run the genassym.s file. "Heh, Kewl!"
Thanks to Matthias Pfaller for the "translate the .s file" idea!
 1.1.8.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.8.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.53 07-Dec-2000  jdolecek convert to use genassym.cf & genassym.sh, as other ports do
 1.52 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.51 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.50 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.49 01-Jul-1999  thorpej branches: 1.49.2; 1.49.4; 1.49.6;
Const poison local printf prototype.
 1.48 06-May-1999  kleink SVR4-related typo in previous.
 1.47 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.46 01-Oct-1998  thorpej branches: 1.46.8;
Define SYS_compat_13_sigreturn13.
 1.45 30-Sep-1998  thorpej Make sure SYS_exit and SYS___sigreturn14 are defined. Garbage collect
SYS_sigreturn.
 1.44 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.43 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.42 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.41 22-Jan-1998  gwr branches: 1.41.2;
Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.
 1.40 23-Oct-1997  gwr Make this generate the same output as kern/genassym.awk
 1.39 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
(also fix some typos in comments).
 1.38 19-Feb-1997  gwr Need to define M68020 for copy.s
Add PM_CTXNUM, tweak...
 1.37 03-Feb-1997  gwr branches: 1.37.4;
Put all the name/value pairs in an initialized array of structures
so that this can be compiled to assembly code and then translated
directly into assym.h by a simple awk program (genassym.awk).
This program can still be run the old way for verification.
 1.36 27-Jan-1997  gwr Changed "machdep.h" to <machine/machdep.h>
 1.35 20-Jan-1997  gwr Kill PCB_MMUCTX, add VM_PMAP_CTX.
 1.34 17-Jan-1997  gwr Add PCB_MMUCTX, and reorder things a little.
 1.33 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.32 23-Oct-1996  gwr Use struct trapframe instead of struct frame, and include a
slight hack to make this cross-build correctly on a SPARC.
 1.31 16-Feb-1996  gwr New handlers for kernel trace and breakpoint traps. These allow
the kernel debugger (ddb or kgdb) to play with the stack pointer.
 1.30 02-Feb-1996  mycroft Don't define _KERNEL here.
 1.29 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.28 24-May-1995  gwr Add FPF_REGS and FPF_FPCR for FPU save/restore code.
 1.27 16-May-1995  jtc Removing -DKERNEL, transition to _KERNEL has been completed
 1.26 28-Mar-1995  gwr Add _KERNEL
 1.25 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.24 24-Jan-1995  gwr Add another handy symbol for DVMA_SPACE_START
 1.23 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.22 26-Oct-1994  cgd new RCS ID format.
 1.21 20-Sep-1994  gwr branches: 1.21.2;
Remove some unused definitions (locore.s includes trap.h now).
 1.20 01-Jun-1994  gwr No longer need V_SWTCH (or any other vmstat stuff) in assembly code.
 1.19 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.18 25-May-1994  glass bad include
 1.17 06-May-1994  gwr Tracking 4.4 integration
 1.16 05-May-1994  gwr take out the trash
 1.15 04-May-1994  gwr Catch up with changes in common vm code.
 1.14 01-Mar-1994  glass bugs fixed and cleanup
 1.13 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.12 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.11 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.10 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.9 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.8 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.7 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.6 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.5 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.4 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.3 29-Jun-1993  glass various updates: but hasn't been compiled
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.21.2.2 20-Sep-1994  gwr Remove some unused definitions (locore.s includes trap.h now).
 1.21.2.1 20-Sep-1994  gwr file genassym.c was added on branch netbsd-1-0 on 1994-09-20 16:53:41 +0000
 1.37.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.41.2.1 27-Jan-1998  gwr Accomodate some name changes in mon.h and elsewhere.
 1.46.8.2 01-Jul-1999  thorpej Sync w/ -current.
 1.46.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.49.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.49.4.1 15-Nov-1999  fvdl Sync with -current
 1.49.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.49.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.20 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.19 10-Aug-2020  rin Clean up _LKM --> _MODULE leftovers.

Note that _KERNEL is always defined for modules.
 1.18 20-Feb-2020  skrll G/C
 1.17 17-Feb-2020  skrll G/C LS{SLEEP,RUN,ONPROC}

LWP status manipulation was moved out of assembly long ago.
 1.16 19-Dec-2018  maxv branches: 1.16.6;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.15 07-Sep-2013  tsutsui branches: 1.15.28; 1.15.30;
Whitespace cleanup.
 1.14 15-Oct-2010  tsutsui branches: 1.14.8; 1.14.18; 1.14.22;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.13 07-Jul-2010  chs enable usermode RAS for sun[23] also.
 1.12 10-Dec-2009  rmind branches: 1.12.2; 1.12.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.11 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.10 17-Oct-2007  garbled branches: 1.10.16; 1.10.20; 1.10.22; 1.10.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.9 18-May-2007  tsutsui branches: 1.9.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.8 09-Feb-2007  ad branches: 1.8.6; 1.8.8; 1.8.14;
Merge newlock2 to head.
 1.7 11-Dec-2005  christos branches: 1.7.20;
merge ktrace-lwp.
 1.6 22-Sep-2003  cl branches: 1.6.16;
SA_SIGINFO support for m68k (port specific changes)
 1.5 11-Apr-2003  nathanw branches: 1.5.2;
Use PAGE_SIZE rather than NBPG.
 1.4 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 11-May-2002  jdolecek use _KERNEL_OPT rather than _KERNEL && !_LKM
 1.2 09-Feb-2002  chs in LKM context, skip a bunch of unnecessary stuff that doesn't compile there.
 1.1 07-Dec-2000  jdolecek branches: 1.1.2; 1.1.6; 1.1.10;
convert to use genassym.cf & genassym.sh, as other ports do
 1.1.10.5 02-Aug-2002  nathanw Don't need SAF_UPCALL anymore.
 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 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.1 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.1.2.1 07-Dec-2000  bouyer file genassym.cf was added on branch thorpej_scsipi on 2000-12-13 15:49:38 +0000
 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.16.2 03-Sep-2007  yamt sync with head.
 1.6.16.1 26-Feb-2007  yamt sync with head.
 1.7.20.1 06-Feb-2007  ad Update m68k pasteware.
 1.8.14.1 22-May-2007  matt Update to HEAD.
 1.8.8.1 11-Jul-2007  mjf Sync with head.
 1.8.6.1 27-May-2007  ad Sync with head.
 1.9.10.1 06-Nov-2007  matt sync with HEAD
 1.10.26.1 19-Oct-2008  haad Sync with HEAD.
 1.10.22.1 10-Oct-2008  skrll Sync with HEAD.
 1.10.20.3 11-Aug-2010  yamt sync with head.
 1.10.20.2 11-Mar-2010  yamt sync with head
 1.10.20.1 04-May-2009  yamt sync with head.
 1.10.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.12.4.1 05-Mar-2011  rmind sync with head
 1.12.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.12.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.14.22.1 18-May-2014  rmind sync with head
 1.14.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15.30.1 10-Jun-2019  christos Sync with HEAD
 1.15.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.16.6.1 29-Feb-2020  ad Sync with head.
 1.30 07-Sep-2013  tsutsui Whitespace cleanup.
 1.29 28-Apr-2008  martin branches: 1.29.34; 1.29.44; 1.29.50;
Remove clause 3 and 4 from TNF licenses
 1.28 11-Dec-2005  christos branches: 1.28.74; 1.28.76; 1.28.78;
merge ktrace-lwp.
 1.27 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.26 15-Jul-2003  lukem branches: 1.26.8;
__KERNEL_RCSID()
 1.25 05-Sep-2001  tsutsui branches: 1.25.6; 1.25.22;
bcopy() -> memcpy(), bzero() -> memset()
 1.24 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.23 08-Apr-1999  gwr branches: 1.23.2; 1.23.22;
Fix the IDPROM checksum. It should check only the first 16 bytes.
Also try to make the sun3 and sun3x versions more similar.
 1.22 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.21 17-Oct-1997  gwr branches: 1.21.4;
Sync. with the sun3x (mostly cosmetic changes).
 1.20 06-Oct-1997  gwr Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.19 28-Apr-1997  gwr branches: 1.19.4;
Sync. up with the sun3x version.
 1.18 27-Jan-1997  gwr Nuke sunmon.h, add machdep.h
 1.17 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic()
Let idprom_init() have void return.
 1.16 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.15 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.14 13-Dec-1996  gwr Kill some dead code.
 1.13 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.12 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.11 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.10 11-Feb-1995  gwr Moved some functions here from sun3_startup.c
 1.9 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 06-May-1994  gwr Tracking 4.4 integration
 1.5 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.4 08-Aug-1993  glass stuff to make them compile properly
 1.3 05-Aug-1993  glass gets to consinit() and blows up
 1.2 30-Jul-1993  glass make idprom compile, and a bogus OBIO addr
 1.1 29-Jun-1993  glass added /dev/idprom driver :), doesn't compile yet
 1.19.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.23.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.23.2.2 08-Apr-1999  gwr Fix the IDPROM checksum. It should check only the first 16 bytes.
Also try to make the sun3 and sun3x versions more similar.
 1.23.2.1 08-Apr-1999  gwr file idprom.c was added on branch netbsd-1-4 on 1999-04-08 04:08:02 +0000
 1.25.22.4 24-Jan-2005  skrll Sync with HEAD.
 1.25.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.25.22.1 03-Aug-2004  skrll Sync with HEAD
 1.25.6.2 05-Sep-2001  tsutsui bcopy() -> memcpy(), bzero() -> memset()
 1.25.6.1 05-Sep-2001  tsutsui file idprom.c was added on branch nathanw_sa on 2001-09-05 14:12:22 +0000
 1.26.8.1 29-Apr-2005  kent sync with -current
 1.28.78.1 16-May-2008  yamt sync with head.
 1.28.76.1 18-May-2008  yamt sync with head.
 1.28.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.29.50.1 18-May-2014  rmind sync with head
 1.29.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 13-Aug-1993  glass added chksum support from hp300, removed bad stub
 1.13 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.12 11-Dec-2005  christos branches: 1.12.74; 1.12.76; 1.12.78;
merge ktrace-lwp.
 1.11 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.10 05-Feb-1998  gwr branches: 1.10.48; 1.10.56;
Merge arch/sun3x into arch/sun3
 1.9 27-Jan-1997  gwr branches: 1.9.14;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.8 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 20-Sep-1994  gwr branches: 1.4.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.4.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.4.2.1 20-Sep-1994  gwr file interreg.h was added on branch netbsd-1-0 on 1994-09-20 16:52:25 +0000
 1.9.14.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.10.56.1 29-Apr-2005  kent sync with -current
 1.10.48.1 24-Jan-2005  skrll Sync with HEAD.
 1.12.78.1 16-May-2008  yamt sync with head.
 1.12.76.1 18-May-2008  yamt sync with head.
 1.12.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.18 24-May-1995  gwr Merged locore code back into locore.s
 1.17 11-Jan-1995  gwr Add VME interrupt attach.
 1.16 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.15 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.14 26-Oct-1994  cgd new RCS ID format.
 1.13 20-Sep-1994  gwr branches: 1.13.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.12 25-Jul-1994  gwr Add intrnames, intrcnt, eintrcnt so vmstat will work.
 1.11 11-Jul-1994  gwr miscellaneous cleanup
 1.10 27-May-1994  gwr branches: 1.10.2;
Catch up with frame.h chages, merge stuff from new hp300 port.
 1.9 09-Mar-1994  glass interrupt.s
 1.8 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.7 12-Dec-1993  glass snapshot of my private sources
 1.6 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.3 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.2 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.1 08-Aug-1993  glass lots of changes, too many printfs
 1.10.2.2 26-Jul-1994  cgd from trunk.
 1.10.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.13.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.13.2.1 20-Sep-1994  gwr file interrupt.s was added on branch netbsd-1-0 on 1994-09-20 16:52:26 +0000
 1.12 02-May-1997  jeremy Now in dev/ic.
 1.11 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.10 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.9 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 26-Sep-1994  gwr branches: 1.6.2;
Fix routines to read/write the stupid intersil clock.
 1.5 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 25-Jun-1993  glass new intersil clock support; this time written from datasheet
still need to write resettodr()
 1.6.2.2 26-Sep-1994  gwr Fix routines to read/write the stupid intersil clock.
 1.6.2.1 26-Sep-1994  gwr file intersil7170.h was added on branch netbsd-1-0 on 1994-09-26 17:25:22 +0000
 1.30 07-Sep-2013  tsutsui Whitespace cleanup.
 1.29 28-Jun-2008  tsutsui branches: 1.29.30; 1.29.40; 1.29.46;
Split softc/device_t, with misc cosmetic changes.
 1.28 28-Apr-2008  martin branches: 1.28.2; 1.28.4;
Remove clause 3 and 4 from TNF licenses
 1.27 04-Dec-2007  tsutsui branches: 1.27.12; 1.27.14; 1.27.16;
Adapt sun68k ports to recent interrupt handling changes.

XXX: sun2 (m68010) doesn't have CAS instructions.
 1.26 10-Oct-2006  tsutsui branches: 1.26.26; 1.26.28; 1.26.34; 1.26.38;
Replace magic numbers with proper macro.
 1.25 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.24 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.23 11-Dec-2005  christos branches: 1.23.20; 1.23.22;
merge ktrace-lwp.
 1.22 22-Jan-2005  chs branches: 1.22.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.21 15-Jul-2003  lukem branches: 1.21.8;
__KERNEL_RCSID()
 1.20 02-Oct-2002  thorpej branches: 1.20.6;
Add trailing ; to CFATTACH_DECL.
 1.19 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 05-Sep-2001  tsutsui branches: 1.17.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.16 27-May-2001  chs branches: 1.16.2;
don't abuse cf_unit.
 1.15 15-Jan-2001  thorpej branches: 1.15.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
 1.14 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.13 24-Mar-1999  mrg branches: 1.13.8;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.12 08-Jun-1998  gwr Add UVM support
 1.11 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.10 12-Jan-1998  thorpej branches: 1.10.2;
Update for changes to config.
 1.9 04-Mar-1997  gwr Fix race conditions that allowed the interrupt latch register to have
the wrong value. Now using the <m68k/asm_single.h> stuff from Leo.
 1.8 27-Jan-1997  gwr branches: 1.8.4;
Use sunmon_abort() instead of mon_panic(), etc.
 1.7 24-Jan-1997  gwr Use <machine/machdep.h>
 1.6 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.5 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.4 30-Oct-1996  gwr Get rid of some cruft in the match function.
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 26-Mar-1996  gwr New driver to handle the "interrupt register".
 1.8.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.13.8.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.13.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.16.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.16.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.17.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.17.6.1 05-Sep-2001  nathanw file intreg.c was added on branch nathanw_sa on 2002-10-18 02:40:24 +0000
 1.20.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.20.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.6.1 03-Aug-2004  skrll Sync with HEAD
 1.21.8.1 29-Apr-2005  kent sync with -current
 1.22.8.2 07-Dec-2007  yamt sync with head
 1.22.8.1 30-Dec-2006  yamt sync with head.
 1.23.22.2 22-Oct-2006  yamt sync with head
 1.23.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.23.20.1 18-Nov-2006  ad Sync with head.
 1.26.38.1 08-Dec-2007  ad Sync with head.
 1.26.34.1 08-Dec-2007  mjf Sync with HEAD.
 1.26.28.1 09-Jan-2008  matt sync with HEAD
 1.26.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.27.16.2 04-May-2009  yamt sync with head.
 1.27.16.1 16-May-2008  yamt sync with head.
 1.27.14.1 18-May-2008  yamt sync with head.
 1.27.12.2 29-Jun-2008  mjf Sync with HEAD.
 1.27.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.4.1 03-Jul-2008  simonb Sync with head.
 1.28.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.29.46.1 18-May-2014  rmind sync with head
 1.29.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.30.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.52 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.51 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.50 11-Dec-2005  christos branches: 1.50.20; 1.50.22;
merge ktrace-lwp.
 1.49 22-Jan-2005  chs branches: 1.49.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.48 15-Jul-2003  lukem branches: 1.48.8;
__KERNEL_RCSID()
 1.47 06-Jan-2003  wiz branches: 1.47.2;
interrupt with two rs.
 1.46 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.45 05-Sep-2001  tsutsui branches: 1.45.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.44 02-Jul-2000  cgd branches: 1.44.4;
Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.
 1.43 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.42 21-Feb-2000  erh Define the DONETISR macro and use netisr_dispatch.h. This is to cut down on code duplication and to standardize the available NETISRs across all ports.
 1.41 28-Jun-1999  itojun branches: 1.41.2;
- Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
 1.40 24-Mar-1999  mrg branches: 1.40.4; 1.40.6;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.39 05-Jul-1998  jonathan defopt NS, NSIP.
 1.38 05-Jul-1998  jonathan defopt ISO TPIP.
 1.37 05-Jul-1998  jonathan defopt CCITT.
 1.36 05-Jul-1998  jonathan defopt INET, NETATALK.
 1.35 08-Jun-1998  gwr Add UVM support
 1.34 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.33 13-Nov-1997  veego branches: 1.33.2;
Add a missing #if NARP > 0 around arpintr(); and add a #include "arp.h"
for NARP. This is for the 'new' arp system.
 1.32 28-Apr-1997  gwr branches: 1.32.8;
Use AUTOVEC_BASE instead of 0x18.
 1.31 07-Apr-1997  jeremy Removed spurrious ``#ifdef ISO''.
 1.30 03-Apr-1997  christos Add netatalk netisr
 1.29 27-Jan-1997  gwr Include <sun3/sun3/vector.h>
 1.28 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.27 23-Jan-1997  gwr Use <machine/machdep.h>
 1.26 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.25 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.24 13-Oct-1996  christos backout previous kprintf change
 1.23 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.22 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.21 08-Oct-1995  gwr Make arpintr() call conditional on NETHER
 1.20 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.19 21-Aug-1995  gwr Fix vectored interrupts, and do autovectored ones similarly.
 1.18 04-Jul-1995  paulus Add code to netintr to call pppintr.
 1.17 07-Apr-1995  gwr Announce unexpected interrupts once for each level.
 1.16 18-Jan-1995  gwr Disable the NMI clock earlier, so the PROM does not touch the ZS chip
while we are using it. (No need to preserve orig_nmi_vect either).
 1.15 11-Jan-1995  gwr Add VME interrupt attach.
 1.14 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.13 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.12 26-Oct-1994  cgd new RCS ID format.
 1.11 20-Sep-1994  gwr branches: 1.11.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.10 25-Jul-1994  gwr Add intrnames, intrcnt, eintrcnt so vmstat will work.
 1.9 28-Jun-1994  gwr branches: 1.9.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.8 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.7 16-May-1994  gwr Add arpintr() call to netintr() for Lite network code.
 1.6 01-Mar-1994  glass bugs fixed and cleanup
 1.5 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.9.2.1 26-Jul-1994  cgd from trunk.
 1.11.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.11.2.1 20-Sep-1994  gwr file isr.c was added on branch netbsd-1-0 on 1994-09-20 16:52:28 +0000
 1.32.8.1 15-Nov-1997  mellon Pull rev 1.33 up from trunk (veego)
 1.33.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.40.6.2 30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

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

NOTE: this branch (kame) is used just for refernce. this may not compile
due to multiple reasons.
 1.40.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.41.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.44.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.44.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.45.6.3 07-Jan-2003  thorpej Sync with HEAD.
 1.45.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.45.6.1 05-Sep-2001  nathanw file isr.c was added on branch nathanw_sa on 2002-10-18 02:40:24 +0000
 1.47.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.47.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.47.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.47.2.1 03-Aug-2004  skrll Sync with HEAD
 1.48.8.1 29-Apr-2005  kent sync with -current
 1.49.8.1 30-Dec-2006  yamt sync with head.
 1.50.22.2 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.50.22.1 19-Sep-2006  yamt implement new api for sun3.
 1.50.20.1 18-Nov-2006  ad Sync with head.
 1.6 03-Nov-2002  chs merge all the m68k copies of kgdb_machdep.c.
 1.5 05-Sep-2001  tsutsui branches: 1.5.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.4 22-Nov-1999  jdolecek branches: 1.4.8;
don't prototype Debugger() here, including <sys/sytm.h> is enough
 1.3 05-Feb-1998  gwr branches: 1.3.14; 1.3.20;
Merge arch/sun3x into arch/sun3
 1.2 18-Feb-1997  gwr branches: 1.2.2; 1.2.12;
Set kgdb_debug_panic if we connect to gdb.
 1.1 12-Feb-1997  gwr Machine-dependent part of the KGDB remote "stub"
 1.2.12.1 27-Jan-1998  gwr Just say "yes, accessible"
 1.2.2.2 12-Mar-1997  is Merge in changes from The Trunk
 1.2.2.1 18-Feb-1997  is file kgdb_machdep.c was added on branch is-newarp on 1997-03-12 14:05:12 +0000
 1.3.20.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.4.8.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.2 11-Nov-2002  nathanw Catch up to -current
 1.5.6.1 05-Sep-2001  nathanw file kgdb_machdep.c was added on branch nathanw_sa on 2002-11-11 22:05:25 +0000
 1.3 12-Feb-1997  gwr Now using <sys/kgdb.h>
 1.2 20-Nov-1996  gwr branches: 1.2.4;
Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.1 15-Jun-1996  gwr branches: 1.1.2;
Add KGDB support
 1.1.2.2 15-Jun-1996  gwr Add KGDB support
 1.1.2.1 15-Jun-1996  gwr file kgdb_proto.h was added on branch netbsd-1-2 on 1996-06-15 14:34:38 +0000
 1.2.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.10 12-Feb-1997  gwr Now using <kern/kgdb_stub.c>
 1.9 27-Jan-1997  gwr branches: 1.9.2;
Nuke sunmon.h, add machdep.h
 1.8 23-Jan-1997  gwr Use <sun3/sun3/sunmon.h>
 1.7 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.6 23-Oct-1996  gwr Dont bother grouping labels in computeSignal().
This form is easier to compare with trap.h
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 07-Sep-1996  mycroft Use SIGBUS iff we get a legitimate bus fault. Use SIGSEGV for page protection
violations (per Solaris, SVR4, AIX, Linux, Irix, and SunOS).
 1.2 15-Jun-1996  gwr branches: 1.2.2;
Remove unnecessary CPP conditional around file contents.
 1.1 15-Jun-1996  gwr Add KGDB support
 1.2.2.2 15-Jun-1996  gwr Remove unnecessary CPP conditional around file contents.
 1.2.2.1 15-Jun-1996  gwr file kgdb_stub.c was added on branch netbsd-1-2 on 1996-06-15 14:47:50 +0000
 1.9.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.16 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.15 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.14 07-Sep-2013  tsutsui branches: 1.14.28; 1.14.30;
Whitespace cleanup.
 1.13 28-Apr-2008  martin branches: 1.13.34; 1.13.44; 1.13.50;
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 03-Oct-2006  tsutsui branches: 1.11.4;
- 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.10 11-Dec-2005  christos branches: 1.10.20; 1.10.22;
merge ktrace-lwp.
 1.9 19-Jun-2005  thorpej branches: 1.9.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 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 05-Sep-2001  tsutsui branches: 1.6.6; 1.6.22;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.5 05-Feb-1998  gwr branches: 1.5.28;
Merge arch/sun3x into arch/sun3
 1.4 06-Oct-1997  gwr branches: 1.4.4;
Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space. (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
 1.3 12-Aug-1997  gwr cosmetic
 1.2 16-May-1997  jeremy branches: 1.2.4;
Return EIO instead of EFAULT when read/write is too big or small.
 1.1 18-Mar-1997  gwr Add /dev/leds (closes PR#2172 from der Mouse)
 1.2.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.4.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.5.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.22.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.22.4 24-Jan-2005  skrll Sync with HEAD.
 1.6.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.22.1 03-Aug-2004  skrll Sync with HEAD
 1.6.6.2 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.6.6.1 05-Sep-2001  tsutsui file leds.c was added on branch nathanw_sa on 2001-09-05 13:21:10 +0000
 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 30-Dec-2006  yamt sync with head.
 1.10.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.10.20.1 18-Nov-2006  ad Sync with head.
 1.11.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.44.1 16-May-2008  yamt sync with head.
 1.12.42.1 18-May-2008  yamt sync with head.
 1.12.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.50.1 18-May-2014  rmind sync with head
 1.13.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.30.1 10-Jun-2019  christos Sync with HEAD
 1.14.28.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.9 24-May-1995  gwr Merged locore code back into locore.s
 1.8 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.7 26-Oct-1994  cgd new RCS ID format.
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.3 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.110 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.109 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.108 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.107 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.106 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.105 13-Jan-2024  thorpej G/C unreferenced copies of _spl() and _splraise().
 1.104 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.103 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.102 12-Jan-2024  thorpej Remove getsp(); nothing uses it.
 1.101 16-Mar-2022  andvar branches: 1.101.4;
s/paniced/panicked/ and s/borken/broken/ in comments.
 1.100 31-Mar-2021  simonb Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.
 1.99 06-Aug-2019  msaitoh branches: 1.99.8; 1.99.10;
Fix typo in comment. Found by Wataru Ashihara.
 1.98 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.97 07-Nov-2013  christos branches: 1.97.28; 1.97.30;
don't duplicate definitions
 1.96 07-Sep-2013  tsutsui Whitespace cleanup.
 1.95 22-Dec-2011  tsutsui branches: 1.95.6; 1.95.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
 1.94 15-Nov-2011  tsutsui branches: 1.94.4;
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.93 15-Oct-2010  tsutsui branches: 1.93.8;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.92 03-Mar-2010  skrll branches: 1.92.2;
s/cpu_fork/cpu_lwp_fork/ in comment.
 1.91 10-Dec-2009  rmind branches: 1.91.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.90 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.89 17-Oct-2007  garbled branches: 1.89.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.88 12-Jun-2007  mhitch branches: 1.88.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.87 18-May-2007  tsutsui Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.86 11-Dec-2005  christos branches: 1.86.24; 1.86.30; 1.86.32; 1.86.38; 1.86.40;
merge ktrace-lwp.
 1.85 04-Mar-2004  nathanw branches: 1.85.16;
Centralize identical copies of proc_trampoline code.

(lots more opportunites here for the bored hacker, such as rei and trap0...)
 1.84 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.83 18-Jan-2003  thorpej branches: 1.83.2;
Merge the nathanw_sa branch.
 1.82 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.81 04-Aug-2001  chs branches: 1.81.6;
rewrite set_segmap_allctx() in assembly.
reduces cpu usage of sequential write()s to a file by 5%.
 1.80 30-May-2001  lukem branches: 1.80.2;
add missing #include "opt_kgdb.h"
 1.79 12-May-2001  kleink Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.
 1.78 22-Feb-2001  chs branches: 1.78.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.77 26-Nov-2000  jdolecek split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
 1.76 03-Nov-2000  tsutsui Fix typo in the previous revision. (s/LIdle/Lidle/)
 1.75 20-Aug-2000  thorpej Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
 1.74 31-May-2000  thorpej Add a comment on single-processor systems about p_cpu being initialized
by fork1().
 1.73 31-May-2000  nathanw Update for qs -> sched_qs change.
Kernel compiles again.
 1.72 26-May-2000  thorpej branches: 1.72.2;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.71 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.70 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.69 01-Aug-1999  thorpej branches: 1.69.2; 1.69.4; 1.69.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.
 1.68 29-Apr-1999  christos Include opt_compat_sunos.h
 1.67 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.66 24-Mar-1999  mrg branches: 1.66.2;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.65 26-Feb-1999  is sun3 part of fix for PR 6152
 1.64 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.63 30-Sep-1998  thorpej Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s
 1.62 30-Sep-1998  thorpej Pull in opt_compat_netbsd.h
 1.61 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.60 08-Jun-1998  gwr Add UVM support
 1.59 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.58 22-Jan-1998  gwr branches: 1.58.2;
Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.
 1.57 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.56 29-May-1997  gwr typo
 1.55 29-May-1997  gwr Add non-inline version of _splraise.
 1.54 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
(also fix some comments).
 1.53 13-May-1997  gwr Use GLOBAL(), _C_LABEL(), etc.
 1.52 28-Apr-1997  gwr Export the symbol _Idle for clock.c (and fix some comments).
 1.51 25-Apr-1997  thorpej Adjust for <m68k/m68k/trap_subr.s>
 1.50 13-Apr-1997  thorpej Use common m68k sigcode.
 1.49 09-Apr-1997  thorpej Use <m68k/m68k/proc_subr.s>
 1.48 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.47 16-Mar-1997  thorpej Use <m68k/m68k/support.s>
 1.46 11-Mar-1997  gwr Clarify duties of traps 1, 2, 12, 15 for emulations
Include <m68k/m68k/sigreturn.s> code.
Add/fix some comments...
 1.45 11-Feb-1997  gwr Move the logic about entering the kernel debugger (whichever one) to
trap.c:trap_kdebug() so it can be C code instead of assembly.
Make sure the initial frame pointer is zero so KGDB will know when to
stop trying to follow frame pointers during backtrace.
 1.44 02-Feb-1997  thorpej branches: 1.44.2;
Remove an untrue comment.
 1.43 27-Jan-1997  gwr Rename some of the sun3-specific things to be closer to the sun3x version.
Call pmap_activate with just one arg (the pmap), and do the cache flush
in there (if needed).
 1.42 18-Jan-1997  gwr Enable interrupts AFTER autoconfiguration, to avoid spurrious ones.
 1.41 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.40 06-Nov-1996  cgd Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed. Rename remrq() to
remrunqueue().
 1.39 17-Jun-1996  gwr branches: 1.39.2;
KGDB support
 1.38 07-Apr-1996  gwr SunOS binaries use "trap #2" (for some obscure FPU business,
or so claims the comment in trap.c). Reinstate the code that
treats trap 2 as "trace" which is given special handling in
trap.c for SunOS binaries. Also add some comments about this.
Thanks to <Ian.Dall@dsto.defence.gov.au> for this one.
 1.37 16-Feb-1996  gwr New handlers for kernel trace and breakpoint traps. These allow
the kernel debugger (ddb or kgdb) to play with the stack pointer.
 1.36 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.35 02-Feb-1996  mycroft assym.s -> assym.h
(Some ports did this already.)
 1.34 11-Dec-1995  thorpej Move bcopy/ovbcopy/memcpy into m68/m68k/copy.s, which is used by all
m68k ports already anyhow. No use in keeping 6 identical copies of this
function around.
 1.33 10-Oct-1995  gwr Get rid of things now in libkern: bzero, bcmp, strlen
 1.32 21-Aug-1995  gwr Fix vectored interrupts, and do autovectored ones similarly.
 1.31 13-Jun-1995  gwr Moved delay2us to param.h (now an inline function).
 1.30 02-Jun-1995  gwr Use the exec header left by the boot program to validate the
symbol table size, and then preserve symbols for ddb.
 1.29 30-May-1995  gwr Take care of curpcb->pcb_ps in vm_machdep, and use appropriate IPL.
Add missing line accidently dropped near the end of cpu_switch().
 1.28 26-May-1995  gwr Initialize proc0pcb.sr here (before cpu_fork copies it).
 1.27 24-May-1995  gwr Merged locore code back into locore.s
 1.26 26-Mar-1995  gwr Enable interrupts before autoconfig (like hp300).
The reasons to do it later no longer exist.
 1.25 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.24 24-Jan-1995  gwr Add another handy symbol for DVMA_SPACE_START
 1.23 20-Dec-1994  gwr Do spl0() a bit later, after autoconfiguration is finished.
 1.22 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.21 26-Oct-1994  cgd new RCS ID format.
 1.20 20-Sep-1994  gwr branches: 1.20.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.19 11-Jul-1994  gwr miscellaneous cleanup
 1.18 29-May-1994  gwr branches: 1.18.2;
Start init the new way (no more icode).
 1.17 04-May-1994  gwr Add delay.s
 1.16 01-Mar-1994  glass bugs fixed and cleanup
 1.15 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.14 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.13 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.12 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.11 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.10 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.9 08-Aug-1993  glass lots of changes, too many printfs
 1.8 05-Aug-1993  glass gets to consinit() and blows up
 1.7 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.6 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.5 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.4 27-Jul-1993  glass new pmap module
 1.3 29-Jun-1993  glass various updates: but hasn't been compiled
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.18.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.20.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.20.2.1 20-Sep-1994  gwr file locore.s was added on branch netbsd-1-0 on 1994-09-20 16:52:29 +0000
 1.39.2.2 17-Jun-1996  gwr KGDB support
 1.39.2.1 17-Jun-1996  gwr file locore.s was added on branch netbsd-1-2 on 1996-06-17 15:40:53 +0000
 1.44.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.44.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.58.2.1 27-Jan-1998  gwr Accomodate some name changes in mon.h and elsewhere.
 1.66.2.1 30-Apr-1999  perry branches: 1.66.2.1.2;
pullup 1.67->1.68 (christos); conflicts manually edited
 1.66.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.66.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.69.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.69.4.1 15-Nov-1999  fvdl Sync with -current
 1.69.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.69.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.69.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.69.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.72.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.78.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.80.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.81.6.5 11-Nov-2002  nathanw Catch up to -current
 1.81.6.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.81.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.81.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.81.6.1 04-Aug-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-18 19:39:00 +0000
 1.83.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.83.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.83.2.1 03-Aug-2004  skrll Sync with HEAD
 1.85.16.1 03-Sep-2007  yamt sync with head.
 1.86.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.86.38.2 26-Jun-2007  garbled Sync with HEAD.
 1.86.38.1 22-May-2007  matt Update to HEAD.
 1.86.32.1 11-Jul-2007  mjf Sync with head.
 1.86.30.2 15-Jul-2007  ad Sync with head.
 1.86.30.1 27-May-2007  ad Sync with head.
 1.86.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.88.10.1 06-Nov-2007  matt sync with HEAD
 1.89.20.1 11-Mar-2010  yamt sync with head
 1.91.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.91.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.92.2.1 05-Mar-2011  rmind sync with head
 1.93.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.93.8.1 17-Apr-2012  yamt sync with head
 1.94.4.1 18-Feb-2012  mrg merge to -current.
 1.95.10.1 18-May-2014  rmind sync with head
 1.95.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.97.30.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.97.30.1 10-Jun-2019  christos Sync with HEAD
 1.97.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.99.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.99.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.101.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.104 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.103 11-Jul-2020  nia Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.
 1.102 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.101 07-Sep-2013  tsutsui branches: 1.101.28; 1.101.30;
Whitespace cleanup.
 1.100 10-Aug-2012  tsutsui branches: 1.100.2; 1.100.4;
Appease gcc -fno-common:
- initialize cn_tab in locore2.c:_bootstrap() for early printf calls
Tested on sun3 (3/160 on TME) and sun3x (real 3/80).

XXX: sun3 with >16MB RAM gets "panic: ubc_init: failed to map ubc_object"
 1.99 15-Oct-2010  tsutsui branches: 1.99.8;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.98 29-Nov-2009  pooka branches: 1.98.2; 1.98.4;
Initialize before set.
 1.97 29-Nov-2009  pooka fix build. (hi rmind)
 1.96 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.95 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.94 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.93 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.92 12-Nov-2008  ad branches: 1.92.4;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.91 28-Apr-2008  martin branches: 1.91.6; 1.91.8;
Remove clause 3 and 4 from TNF licenses
 1.90 04-Mar-2007  christos branches: 1.90.40; 1.90.42; 1.90.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.89 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.88 01-Oct-2006  tsutsui branches: 1.88.4;
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.87 11-Dec-2005  christos branches: 1.87.20; 1.87.22;
merge ktrace-lwp.
 1.86 19-Jun-2005  thorpej branches: 1.86.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.85 03-Jun-2005  tsutsui Constify.
 1.84 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.83 15-Jul-2003  lukem branches: 1.83.8;
__KERNEL_RCSID()
 1.82 27-Apr-2003  ragge branches: 1.82.2;
Preserve the symbol table in the LKM || KSYMS cases also.
 1.81 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.80 02-Aug-2002  soren G/c vestiges of old sun3-specific SYMTAB_SPACE support.
 1.79 05-Sep-2001  tsutsui branches: 1.79.6; 1.79.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.78 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.77 22-Feb-2001  chs branches: 1.77.4;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.76 03-Feb-2001  tsutsui Use macro in <m68k/m68k.h> for cputype and mmutype.
 1.75 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.74 04-Jul-1998  jonathan branches: 1.74.14;
defopt DDB.
 1.73 12-Jun-1998  gwr In _save_symtab, ignore any symbol table if preserving it would
cause our memory use to exceed the 1MB limit (on the 3/50 only).
 1.72 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.71 30-Oct-1997  gwr branches: 1.71.4;
Move some variables from _startup.c into pmap.c (used only there).
Re-organize pmap_bootstrap, and shorten some function names.
 1.70 06-Oct-1997  gwr branches: 1.70.2;
Move some of the VM initialization work from _startup.c to pmap.c
where it is normally found.
 1.69 04-Oct-1997  gwr Move the call to cninit() up a level (easier to find).
 1.68 04-Oct-1997  gwr Move dumppage initialization from sun3_startup.c to machdep.c
(so it can be a normal kmem_alloc)
 1.67 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.66 10-Jun-1997  veego branches: 1.66.4;
s/_round_seg/m68k_round_seg/ s/_trunc_seg/m68k_trunc_seg/
s/_round_page/m68k_round_page/ s/_trunc_page/m68k_trunc_page/
 1.65 28-Apr-1997  gwr Be quiet in _save_symtab() unless there is a problem.
Improve some comments (and sync with sun3x code).
 1.64 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.63 18-Feb-1997  gwr Define "cold" over in autoconf.c
 1.62 10-Feb-1997  gwr Set cputype,mmutype at compile-time.
 1.61 02-Feb-1997  thorpej branches: 1.61.2;
Declare and set cputype and mmutype.
 1.60 27-Jan-1997  gwr Nuke sunmon.h, add machdep.h
 1.59 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic(), etc.
 1.58 27-Jan-1997  gwr Remove code that is now in sun3/sunmon.c (shared with sun3x)
Rename some functions (remove sun3 prefix). Fix copyright.
 1.57 30-Dec-1996  gwr Remove some junk.
 1.56 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.55 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.54 13-Oct-1996  christos backout previous kprintf change
 1.53 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.52 05-May-1996  gwr Kernel crash dumps now work on the sun3. (Yea!)
 1.51 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.50 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.49 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.48 17-Oct-1995  gwr Explain why sun3_context_equiv() can not just call set_segmap_allctx().
 1.47 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.46 05-Jul-1995  gwr Do not advance esym if the SYMTAB_SPACE option is set.
 1.45 27-Jun-1995  gwr Fix uses of btoc() which requires an unsigned arg.
 1.44 13-Jun-1995  gwr Fix cpuspeed values for Carerra and similar.
Enable the virtual address cache on the 3/260
 1.43 09-Jun-1995  gwr More liberal check for exec header. Nuke machine type defines (support all)
 1.42 02-Jun-1995  gwr Use the exec header left by the boot program to validate the
symbol table size, and then preserve symbols for ddb.
 1.41 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.40 26-Apr-1995  gwr Disable the cache stuff for now. Add more comments.
 1.39 13-Apr-1995  gwr prepare to enable the cache
 1.38 08-Apr-1995  gwr minor cleanup
 1.37 07-Apr-1995  gwr Make sure curproc->p_addr is set before any faults occur.
Put msgbuf in page zero (so its location is predictable).
 1.36 26-Mar-1995  gwr Add/fix some comments.
 1.35 24-Mar-1995  gwr Determine FPU type during autoconfig.
 1.34 13-Feb-1995  gwr DVMA slave mapping support.
 1.33 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.32 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.31 18-Jan-1995  gwr Disable the NMI clock earlier, so the PROM does not touch the ZS chip
while we are using it. (No need to preserve orig_nmi_vect either).
 1.30 11-Jan-1995  gwr Cleanup
 1.29 13-Dec-1994  gwr Nuke the "vmempage" used by /dev/mem (our pmap doesn't like it).
Instead, allocate a DVMA page as needed (like vmapbuf/vunmapbuf).
 1.28 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.27 21-Nov-1994  gwr branches: 1.27.2;
Lots of changes. Fairly stable now.
 1.26 26-Oct-1994  gwr Move sun3_round_up_seg() here from param.h as a temporary measure.
Eventually, it should be eliminated from these two files as well.
 1.25 26-Oct-1994  cgd new RCS ID format.
 1.24 20-Sep-1994  gwr Get boothowto flags from PROM flags; fix reboot.
 1.23 11-Jul-1994  gwr miscellaneous cleanup
 1.22 28-Jun-1994  gwr branches: 1.22.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.21 06-May-1994  gwr Tracking 4.4 integration
 1.20 04-May-1994  gwr Enable/disable clocks in sun3_stop()
Add functions to call sun3_stop() with the appropriate arg.
Set the cpuspeed according to the machine type.
 1.19 18-Apr-1994  glass some incredibly trivial cleanup
 1.18 17-Apr-1994  glass compiles again. also cleanup of development printfs. and trap stuff
 1.17 01-Mar-1994  glass bugs fixed and cleanup
 1.16 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.15 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.14 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.13 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.12 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.11 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.10 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.9 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.8 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.7 08-Aug-1993  glass lots of changes, too many printfs
 1.6 05-Aug-1993  glass gets to consinit() and blows up
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.3 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.22.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.27.2.1 30-Nov-1994  gwr Make a branch that works with the 1.0 code base.
 1.61.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.66.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.66.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.70.2.1 30-Oct-1997  mellon Pull rev 1.71 up from trunk (gwr)
 1.71.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.74.14.3 12-Mar-2001  bouyer Sync with HEAD.
 1.74.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.74.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.77.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.77.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.79.14.1 31-Aug-2002  gehenna catch up with -current.
 1.79.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.79.6.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.79.6.3 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.79.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.79.6.1 05-Sep-2001  scw file locore2.c was added on branch nathanw_sa on 2001-11-18 19:39:01 +0000
 1.82.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.82.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.82.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.82.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.82.2.1 03-Aug-2004  skrll Sync with HEAD
 1.83.8.1 29-Apr-2005  kent sync with -current
 1.86.2.3 03-Sep-2007  yamt sync with head.
 1.86.2.2 26-Feb-2007  yamt sync with head.
 1.86.2.1 30-Dec-2006  yamt sync with head.
 1.87.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.87.20.1 18-Nov-2006  ad Sync with head.
 1.88.4.2 12-Mar-2007  rmind Sync with HEAD.
 1.88.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.90.44.4 11-Mar-2010  yamt sync with head
 1.90.44.3 19-Aug-2009  yamt sync with head.
 1.90.44.2 04-May-2009  yamt sync with head.
 1.90.44.1 16-May-2008  yamt sync with head.
 1.90.42.1 18-May-2008  yamt sync with head.
 1.90.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.90.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.91.8.2 03-Mar-2009  skrll Sync with HEAD.
 1.91.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.91.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.92.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.98.4.1 05-Mar-2011  rmind sync with head
 1.98.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.99.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.99.8.1 30-Oct-2012  yamt sync with head
 1.100.4.1 18-May-2014  rmind sync with head
 1.100.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.101.30.1 10-Jun-2019  christos Sync with HEAD
 1.101.28.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.17 24-May-1995  gwr Merged locore code back into locore.s
 1.16 26-Mar-1995  gwr Nuke FPCOPROC
 1.15 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.14 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.13 26-Oct-1994  cgd new RCS ID format.
 1.12 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.11 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.10 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.9 23-Jan-1994  glass now supports cachectl(). totally untested.
 1.8 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.7 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.6 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.3 29-Jun-1993  glass various updates: but hasn't been compiled
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.214 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.213 07-Sep-2020  mrg move the __packed attribute from struct frame::F_t into the single
unaligned member inside. CTASSERT() the size is unchanged.

with this, sun3 and GCC 9 appears to work.
 1.212 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.211 31-Dec-2019  ad Rename uvm_free() -> uvm_availmem().
 1.210 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.209 03-Jun-2019  msaitoh Fix typo in comment(s/similiar/similar/).
 1.208 24-Mar-2014  christos branches: 1.208.10; 1.208.20; 1.208.30;
use cpu_{g,s}etmodel
 1.207 07-Sep-2013  tsutsui Whitespace cleanup.
 1.206 28-Jul-2012  matt branches: 1.206.2; 1.206.4;
Remove declartions of physmem
 1.205 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.204 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.203 14-Jun-2011  tsutsui branches: 1.203.2; 1.203.6;
Fix merge botch. KERNBASE macro was split into KERNBASE3 and KERNBASE3X
for kernel, and was replaced with kernbase constant for possible reference
of USRSTACK in module(7).
 1.202 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.201 16-May-2011  tsutsui branches: 1.201.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.200 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.199 17-Jan-2011  tsutsui branches: 1.199.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.198 15-Oct-2010  tsutsui branches: 1.198.2;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.197 08-Feb-2010  joerg branches: 1.197.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.196 10-Dec-2009  matt branches: 1.196.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.195 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.194 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.193 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.192 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.191 21-Jan-2009  he branches: 1.191.2;
Re-adapt to the changed return types for major() and minor().
 1.190 12-Jan-2009  cegger use PRIu64 format to printf major() and minor() values
 1.189 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.188 25-Nov-2008  ad dumpsys: don't spew numbers into the log.
 1.187 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.186 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.185 02-Jul-2008  ad branches: 1.185.2; 1.185.4; 1.185.6;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.184 17-Oct-2007  garbled branches: 1.184.16; 1.184.20; 1.184.22; 1.184.24;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.183 02-Jun-2007  tsutsui branches: 1.183.10;
- Don't refer fputype before FPU is probed.
- Call m68k_make_fpu_idle_frame() from initfpu().
 1.182 04-Mar-2007  tsutsui branches: 1.182.2; 1.182.4; 1.182.10;
Use (char *) on pointer arith.
 1.181 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.180 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.179 09-Feb-2007  ad branches: 1.179.2;
Merge newlock2 to head.
 1.178 21-Oct-2006  mrg in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

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

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

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.177 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.176 11-Dec-2005  christos branches: 1.176.20; 1.176.22;
merge ktrace-lwp.
 1.175 25-Apr-2005  lukem branches: 1.175.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
 1.174 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.173 22-Jan-2005  chs branches: 1.173.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.172 24-Mar-2004  atatat branches: 1.172.8;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.171 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.170 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.169 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.168 27-Sep-2003  cl Cast through (void *) to appease gcc3.
 1.167 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.166 15-Jul-2003  lukem __KERNEL_RCSID()
 1.165 29-Jun-2003  fvdl branches: 1.165.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.164 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.163 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.162 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.161 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.160 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.159 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.158 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.157 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.156 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.155 14-May-2002  matt branches: 1.155.2;
Eliminate more commons or redundant declarations.
 1.154 20-Mar-2002  christos kill remaining PS_STRINGS instances.
 1.153 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.152 11-Sep-2001  chs branches: 1.152.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.151 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.150 05-Sep-2001  tsutsui branches: 1.150.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.149 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.148 02-Jun-2001  chs branches: 1.148.2;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.147 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.146 28-May-2001  chs remove a useless call to uvm_map_protect(). the kernel text is already
mapped read-only in pmap_bootstrap() and the comment which tried to
explain why this might be needed anyway didn't make any sense.
 1.145 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.144 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.143 22-Feb-2001  chs branches: 1.143.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.142 22-Jan-2001  jdolecek Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
 1.141 13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.140 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.139 26-Jun-2000  mrg remove/move more mach vm header files:

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

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

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.136 19-Jan-2000  thorpej Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.135 04-Dec-1999  ragge CL* discarding.
 1.134 22-Nov-1999  jdolecek minor stylistic change
 1.133 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.132 12-Sep-1999  chs branches: 1.132.2; 1.132.4; 1.132.8;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.131 26-May-1999  thorpej Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.
 1.130 20-May-1999  lukem * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
 1.129 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.128 25-Apr-1999  simonb g/c REAL_CLISTS.
 1.127 11-Apr-1999  chs add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.126 08-Apr-1999  gwr branches: 1.126.2;
Use the string kernel_arch to determine "sun3" vs "sun3x"
and leave the machine string as it was (make uses it).
 1.125 01-Apr-1999  thorpej Don't call configure() from cpu_startup().
 1.124 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.123 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.122 04-Mar-1999  kleink Need to include DDB headers only if DDB is defined.
 1.121 27-Feb-1999  scottr defopt BUFCACHE and BUFPAGES.
 1.120 09-Jan-1999  thorpej Garbage-collect `mbutl'.
 1.119 24-Nov-1998  kleink Need <sys/device.h> to bring configure() declaration in scope.
 1.118 19-Oct-1998  tron Defopt SYSVMSG, SYSVSEM and SYSVSHM.
 1.117 01-Oct-1998  thorpej Fix a couple of printf formats.
 1.116 04-Jul-1998  jonathan defopt DDB.
 1.115 09-Jun-1998  gwr Make this compile...
 1.114 09-Jun-1998  tv Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
 1.113 08-Jun-1998  gwr Add UVM support
 1.112 20-May-1998  fair make some preliminary changes so that this compiles for UVM
 1.111 08-Mar-1998  gwr Do the "early breakpoint" (if booted with "-d") even if we
have only the PROM to handle it, so one can patch things.
 1.110 19-Feb-1998  thorpej Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
 1.109 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.108 24-Jan-1998  mycroft When dumping, print out the device number as major,minor.
 1.107 04-Dec-1997  tv branches: 1.107.2;
Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
 1.106 25-Nov-1997  gwr The calculation of dumpsize was incorrect. It is the size of
the raw memory part of the dump (not including the headers).
 1.105 30-Oct-1997  gwr Print out the real/avail memory like this:
real mem = 8192K (0x800000)
avail mem = 6392K (0x63e000)
 1.104 17-Oct-1997  fair branches: 1.104.2;
move sysctl.h include after vm.h to get at vmspace definition and correct compile error
 1.103 05-Oct-1997  gwr Do kernel core header initialization a little differently.
 1.102 04-Oct-1997  gwr Move dumppage initialization from sun3_startup.c to machdep.c
(so it can be a normal kmem_alloc)
 1.101 02-Oct-1997  gwr Make msgbuf stay in page zero
 1.100 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.99 12-Sep-1997  mycroft Set the status word as well, and remove a bogus comment.
 1.98 12-Sep-1997  mycroft Always initialize all registers in setregs().
 1.97 11-Sep-1997  mycroft Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way. (See tech-kern.)
 1.96 12-Aug-1997  gwr cosmetic
 1.95 29-Jul-1997  fair branches: 1.95.2;
%x -> 0x%x, fixes for PR#3757
 1.94 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.93 08-Jun-1997  veego Initialize machine from MACHINE.
 1.92 28-Apr-1997  gwr branches: 1.92.2;
Do console initialization earlier (see obio_init).
Document initialization order dependencies.
 1.91 09-Apr-1997  thorpej Adjust for new m68k/kcore.h
 1.90 04-Apr-1997  gwr Add a comment.
 1.89 27-Mar-1997  thorpej Don't allocate mclrefcnt[]; it's dead and gone.
 1.88 26-Mar-1997  gwr Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/
 1.87 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.86 18-Feb-1997  gwr Moved straytrap() to trap.c (and minor cleanup)
 1.85 14-Feb-1997  gwr Moved regdump() and friends to sun3/regdump.c
 1.84 13-Feb-1997  gwr Moved sendsig() and sys_sigreturn() to sig_machdep.c
Rename some trapframe variables for consistency.
 1.83 10-Feb-1997  gwr branches: 1.83.2;
Change most occurrences of "struct frame" (union of all frames formats)
to "struct trapframe" (the minimal frame) because in most cases, all we
care about is the minimal, invariant part. Further, if the declaration
says we have an arg of type "frame" (big union), then KGDB will try to
print the whole bloody thing out whether you want to see it or not.
 1.82 27-Jan-1997  gwr branches: 1.82.2;
Nuke sunmon.h, add machdep.h
 1.81 27-Jan-1997  gwr Use stuff from <sun3/sun3/sunmon.h>
Setup the msgbufp here like others.
Do vm_map_protect() on kernel text.
 1.80 16-Jan-1997  gwr Use db_regs_t instead of struct mc68020_saved_state
 1.79 17-Dec-1996  gwr branches: 1.79.2;
Make sure the MDP_STACKADJ flag is cleared in p->p_md.md_flags
Do this in both machdep.c:setregs() and trap.c:(end of syscall)
for now. Need more analysis to see what is the best way...
Fixes PR#3034 (Thanks very much to Ian Dall for the fix!)
 1.78 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.77 13-Oct-1996  christos backout previous kprintf change
 1.76 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.75 09-Aug-1996  mrg Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.
 1.74 17-Jun-1996  gwr branches: 1.74.2;
KGDB support
 1.73 17-Jun-1996  gwr Correct return type of boot() and reboot2().
 1.72 05-May-1996  gwr Kernel crash dumps now work on the sun3. (Yea!)
 1.71 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.70 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.69 13-Feb-1996  gwr machdep.c
 1.68 09-Feb-1996  gwr eliminate setjmp.h
 1.67 04-Jan-1996  jtc Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.
 1.66 07-Oct-1995  mycroft Prefix names of system call implementation functions with `sys_'.
 1.65 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.64 19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.63 01-Sep-1995  mycroft SA_ONSTACK --> SS_ONSTACK
 1.62 08-Aug-1995  gwr Fix signed/unsigned comparison in dumpconf().
 1.61 27-Jun-1995  gwr Fix uses of btoc() which requires an unsigned arg.
 1.60 13-Jun-1995  gwr Fix warning about setjmp arg
 1.59 24-May-1995  gwr Make this more like the other m68k ports.
 1.58 26-Apr-1995  gwr Use vfs_shutdown()
 1.57 22-Apr-1995  christos Remove sunos_machdep.c and fix sunos_reboot.
 1.56 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.55 13-Apr-1995  gwr prepare to enable the cache
 1.54 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.53 10-Apr-1995  mycroft vmempage -> vmmap
 1.52 08-Apr-1995  gwr Add some comments.
 1.51 07-Apr-1995  gwr Allocate vmempage here (for use by /dev/mem).
 1.50 26-Mar-1995  gwr Nuke FPCOPROC
 1.49 26-Mar-1995  gwr Enable interrupts before autoconfig.
The reasons to do it later no longer exist.
 1.48 24-Mar-1995  gwr Determine FPU type during autoconfig.
 1.47 10-Mar-1995  gwr Fix sunos compat code in sigreturn (from Chuck Silvers)
 1.46 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.45 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.44 24-Jan-1995  gwr move code to enable interrupts just a little later
 1.43 20-Dec-1994  gwr Add peek_byte and peek_word using the "nofault" setjmp/longjmp
so it is no longer necessary to mis-use fubyte, etc.
 1.42 23-Nov-1994  gwr sun_* -> sunos_*
 1.41 23-Nov-1994  gwr Update sendsig() to match new prototype.
 1.40 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.39 26-Oct-1994  cgd new RCS ID format.
 1.38 20-Oct-1994  cgd update for new syscall args description mechanism
 1.37 20-Sep-1994  gwr branches: 1.37.2;
Get boothowto flags from PROM flags; fix reboot.
 1.36 27-Jul-1994  gwr Add swapconf() to compute size of swap space, and
variables required by savecore. No dumpsys() yet.
 1.35 13-Jul-1994  gwr Remove some stupidity pointed out by Adam.
 1.34 11-Jul-1994  gwr miscellaneous cleanup
 1.33 28-Jun-1994  gwr branches: 1.33.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.32 03-Jun-1994  gwr Make buffer_map and phys_map pageable for new VM code.
(Thanks to Harry Schreurs, Adam Glass)
 1.31 01-Jun-1994  gwr Remove some temporary junk.
 1.30 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.29 20-May-1994  gwr Move boothowto hack into consinit so it happens early enough.
 1.28 10-May-1994  gwr Add CTL_HW stuff, cpu_sysctl, replace ss_onstack...
 1.27 09-May-1994  gwr Add the hooks to make ddb work.
 1.26 06-May-1994  gwr Tracking 4.4 integration
 1.25 05-May-1994  gwr HPUXCOMPAT changed to COMPAT_HPUX
 1.24 04-May-1994  gwr Catch up with changes in the common vm code.
Change sun3_stop() calls to sun3_rom_xxx()
 1.23 17-Apr-1994  glass compiles again. also cleanup of development printfs. and trap stuff
 1.22 01-Mar-1994  glass bugs fixed and cleanup
 1.21 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.20 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.19 23-Jan-1994  glass now supports cachectl(). totally untested.
 1.18 13-Jan-1994  glass exec_map is now used
 1.17 08-Jan-1994  cgd kill ptrace stuff; it's common to all m68k machines now
 1.16 12-Dec-1993  glass snapshot of my private sources
 1.15 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.14 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.13 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.12 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.11 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.10 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.9 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.8 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.7 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.6 08-Aug-1993  glass lots of changes, too many printfs
 1.5 05-Aug-1993  glass gets to consinit() and blows up
 1.4 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.3 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.2 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.1 29-Jun-1993  glass various updates: but hasn't been compiled
 1.33.2.3 27-Jul-1994  cgd from trunk, per gwr.
 1.33.2.2 15-Jul-1994  cgd update from trunk.
 1.33.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.37.2.2 20-Sep-1994  gwr Get boothowto flags from PROM flags; fix reboot.
 1.37.2.1 20-Sep-1994  gwr file machdep.c was added on branch netbsd-1-0 on 1994-09-20 16:50:29 +0000
 1.74.2.2 17-Jun-1996  gwr KGDB support
 1.74.2.1 17-Jun-1996  gwr file machdep.c was added on branch netbsd-1-2 on 1996-06-17 15:40:57 +0000
 1.79.2.1 18-Jan-1997  thorpej Update from trunk.
 1.82.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.83.2.1 12-Feb-1997  mrg don't allocate swap map in allocsys.
 1.92.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.95.2.4 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.95.2.3 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.95.2.2 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.95.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.104.2.2 29-May-1998  mycroft Pull up patch from gwr.
 1.104.2.1 26-Nov-1997  mellon Pull rev 1.105 and 1.106 up from trunk (gwr)
 1.107.2.3 27-Jan-1998  gwr Make cpu_model[] begin with "Sun-3 ..."
 1.107.2.2 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.107.2.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.126.2.2 16-Apr-1999  chs branches: 1.126.2.2.2;
pull up 1.126 -> 1.127:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.126.2.1 08-Apr-1999  chs branches: 1.126.2.1.2;
file machdep.c was added on branch netbsd-1-4 on 1999-04-16 16:25:02 +0000
 1.126.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.126.2.1.2.1 locked by: joerg; 08-Apr-1999  thorpej file machdep.c was added on branch netbsd-1-4 on 1999-06-21 01:03:19 +0000
 1.132.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.132.4.1 15-Nov-1999  fvdl Sync with -current
 1.132.2.4 27-Mar-2001  bouyer Sync with HEAD.
 1.132.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.132.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.132.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.137.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.143.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.143.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.148.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.148.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.148.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.148.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.148.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.150.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.152.4.12 11-Nov-2002  nathanw Catch up to -current
 1.152.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.152.4.10 17-Sep-2002  nathanw Catch up to -current.
 1.152.4.9 27-Aug-2002  nathanw Catch up to -current.
 1.152.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.152.4.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.152.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.152.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.152.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.152.4.3 02-Dec-2001  scw If an FPU is available, call m68k_make_fpu_idle_frame() to generate
a reference FPU idle frame.
 1.152.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.152.4.1 11-Sep-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-18 19:39:01 +0000
 1.155.2.2 31-Aug-2002  gehenna catch up with -current.
 1.155.2.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.165.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.165.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.165.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.165.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.165.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.165.2.2 03-Aug-2004  skrll Sync with HEAD
 1.165.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.172.8.1 29-Apr-2005  kent sync with -current
 1.173.2.1 12-Feb-2005  yamt use new apis.
 1.175.2.4 03-Sep-2007  yamt sync with head.
 1.175.2.3 26-Feb-2007  yamt sync with head.
 1.175.2.2 30-Dec-2006  yamt sync with head.
 1.175.2.1 21-Jun-2006  yamt sync with head.
 1.176.22.2 22-Oct-2006  yamt sync with head
 1.176.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.176.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.176.20.1 18-Nov-2006  ad Sync with head.
 1.179.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.179.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.182.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.182.4.1 11-Jul-2007  mjf Sync with head.
 1.182.2.1 09-Jun-2007  ad Sync with head.
 1.183.10.1 06-Nov-2007  matt sync with HEAD
 1.184.24.1 03-Jul-2008  simonb Sync with head.
 1.184.22.3 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.184.22.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.184.22.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.184.20.3 11-Mar-2010  yamt sync with head
 1.184.20.2 19-Aug-2009  yamt sync with head.
 1.184.20.1 04-May-2009  yamt sync with head.
 1.184.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.184.16.1 02-Jul-2008  mjf Sync with HEAD.
 1.185.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.185.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.185.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.185.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.191.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.196.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.196.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.197.2.3 31-May-2011  rmind sync with head
 1.197.2.2 05-Mar-2011  rmind sync with head
 1.197.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.198.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.199.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.201.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.203.6.1 18-Feb-2012  mrg merge to -current.
 1.203.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.203.2.2 30-Oct-2012  yamt sync with head
 1.203.2.1 17-Apr-2012  yamt sync with head
 1.206.4.1 18-May-2014  rmind sync with head
 1.206.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.208.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.208.30.1 10-Jun-2019  christos Sync with HEAD
 1.208.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.208.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.41 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.40 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.39 16-Jun-2017  jdolecek dumpconf(void) long doesn't exist, remove the prototype

PR kern/39714 by Henning Petersen
 1.38 07-Sep-2013  tsutsui branches: 1.38.6;
Whitespace cleanup.
 1.37 16-May-2011  tsutsui branches: 1.37.4; 1.37.14; 1.37.18;
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
 1.36 03-Oct-2006  tsutsui branches: 1.36.78; 1.36.84;
- 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.35 28-Jun-2006  tsutsui branches: 1.35.4; 1.35.6;
Remove extern decls for static variables.
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.8; 1.34.16;
merge ktrace-lwp.
 1.33 03-Jun-2005  tsutsui branches: 1.33.2;
Constify.
 1.32 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.31 13-Feb-2004  wiz branches: 1.31.8;
Uppercase CPU, plural is CPUs.
 1.30 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 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 20-Oct-2002  chs branches: 1.28.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.27 05-Sep-2001  tsutsui branches: 1.27.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.26 14-Jun-2001  thorpej branches: 1.26.2;
Don't need to prototype child_return() here, it's in <sys/proc.h>.
 1.25 22-Feb-2001  chs branches: 1.25.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.24 04-Feb-2001  tsutsui Move cachectl1() declaration from sun3/machdep.h to include/cpu.h;
it is refered by sys/compat/linux/arch/m68k/linux_machdep.c.

XXX: all declarations in machdep.h should be moved into cpu.h?
 1.23 03-Feb-2001  tsutsui Remove declaration of getdfc(), getsfc() and fputype.
They are in <m68k/m68k.h>
 1.22 03-Feb-2001  tsutsui Remove declaration of cold; it's in <sys/kernel.h>
 1.21 22-Nov-1999  jdolecek don't prototype Debugger() here, i't done in <sys/systm.h>
 1.20 09-Apr-1999  gwr branches: 1.20.2; 1.20.8; 1.20.14;
Make sure Debugger is declared (even if no DDB).
The sun3 has one regardless of the DDB option.
Fixes kernel compile warning/errors.
 1.19 27-Feb-1999  is Correct type of 3rd argument.
 1.18 26-Feb-1999  is sun3 part of fix for PR 6152
 1.17 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.16 05-Nov-1998  jeremy Corrected incorrect definition of child_return(). It only accepts one
argument.
 1.15 06-Oct-1998  thorpej configure() prototype is in <sys/device.h>
 1.14 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.13 25-Jan-1998  gwr branches: 1.13.2;
Moved back to sun3/sun3
 1.12 06-Oct-1997  gwr Move some of the VM initialization work from _startup.c to pmap.c
where it is normally found.
 1.11 05-Oct-1997  gwr Do kernel core header initialization a little differently.
 1.10 29-May-1997  gwr Define getsr() as _getsr() for backward compatibility.
 1.9 28-Apr-1997  gwr Moved leds_* declarations into leds.h
 1.8 09-Apr-1997  thorpej regdump() is prototyped in m68k/cpu.h now.
 1.7 18-Mar-1997  gwr Moved the _KERNEL declarations to machdep.h
 1.6 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.5 11-Feb-1997  gwr Change most occurrences of "struct frame" (union of all frames formats)
to "struct trapframe" (the minimal frame) because in most cases, all we
care about is the minimal, invariant part. Further, if the declaration
says we have an arg of type "frame" (big union), then KGDB will try to
print the whole bloody thing out whether you want to see it or not.
 1.4 04-Feb-1997  perry Nuke some options GENERIC residue.
 1.3 27-Jan-1997  gwr Just declare the sunmon_* functions here. No need for sunmon.h
 1.2 27-Jan-1997  gwr Pull out things now declared elsewhere.
 1.1 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.13.2.2 27-Jan-1998  gwr Moved function code stuff from machdep.h to fc.h
 1.13.2.1 25-Jan-1998  gwr Move from sun3/include to sun3/sun3
 1.20.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.20.8.3 12-Mar-2001  bouyer Sync with HEAD.
 1.20.8.2 11-Feb-2001  bouyer Sync with HEAD.
 1.20.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.20.2.2 09-Apr-1999  gwr Make sure Debugger is declared (even if no DDB).
The sun3 has one regardless of the DDB option.
Fixes kernel compile warning/errors.
 1.20.2.1 09-Apr-1999  gwr file machdep.h was added on branch netbsd-1-4 on 1999-04-09 04:01:10 +0000
 1.25.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.26.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.27.6.3 11-Nov-2002  nathanw Catch up to -current
 1.27.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.27.6.1 05-Sep-2001  scw file machdep.h was added on branch nathanw_sa on 2001-11-18 19:39:01 +0000
 1.28.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.28.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.28.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.6.1 03-Aug-2004  skrll Sync with HEAD
 1.31.8.1 29-Apr-2005  kent sync with -current
 1.33.2.1 30-Dec-2006  yamt sync with head.
 1.34.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.34.8.1 11-Aug-2006  yamt sync with head
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.35.6.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.35.4.1 18-Nov-2006  ad Sync with head.
 1.36.84.1 06-Jun-2011  jruoho Sync with HEAD.
 1.36.78.1 31-May-2011  rmind sync with head
 1.37.18.1 18-May-2014  rmind sync with head
 1.37.14.2 03-Dec-2017  jdolecek update from HEAD
 1.37.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.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.38.6.1 28-Aug-2017  skrll Sync with HEAD
 1.20 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.19 24-Apr-2021  thorpej branches: 1.19.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.18 07-Sep-2013  tsutsui branches: 1.18.44;
Whitespace cleanup.
 1.17 28-Jun-2008  tsutsui branches: 1.17.30; 1.17.40; 1.17.46;
Split softc/device_t, 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 01-Oct-2006  tsutsui branches: 1.15.52; 1.15.54; 1.15.56;
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 11-Dec-2005  christos branches: 1.14.20; 1.14.22;
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 15-Jul-2003  lukem branches: 1.12.8;
__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 05-Feb-1998  gwr branches: 1.8.28; 1.8.32;
Merge arch/sun3x into arch/sun3
 1.7 12-Jan-1998  thorpej branches: 1.7.2;
Update for changes to config.
 1.6 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.5 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.4 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.3 13-Oct-1996  christos backout previous kprintf change
 1.2 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1 26-Mar-1996  gwr New "mainbus" driver allows control over autoconfig order.
 1.7.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.8.32.1 18-Oct-2002  nathanw Catch up to -current.
 1.8.28.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.6.4 24-Jan-2005  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.12.8.1 29-Apr-2005  kent sync with -current
 1.13.8.1 30-Dec-2006  yamt sync with head.
 1.14.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.14.20.1 18-Nov-2006  ad Sync with head.
 1.15.56.2 04-May-2009  yamt sync with head.
 1.15.56.1 16-May-2008  yamt sync with head.
 1.15.54.1 18-May-2008  yamt sync with head.
 1.15.52.2 29-Jun-2008  mjf Sync with HEAD.
 1.15.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 03-Jul-2008  simonb Sync with head.
 1.16.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.46.1 18-May-2014  rmind sync with head
 1.17.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.30.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.18.44.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.19.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.53 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.52 15-Oct-2010  tsutsui branches: 1.52.6;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.51 04-Mar-2007  tsutsui branches: 1.51.40; 1.51.64; 1.51.66;
Use (char *) casts.

Umm, vmmap on sun3/sun3x is vaddr_t, not (char *)...
 1.50 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.49 11-Dec-2005  christos branches: 1.49.26;
merge ktrace-lwp.
 1.48 22-Jan-2005  chs branches: 1.48.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.47 07-Aug-2003  agc branches: 1.47.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.46 15-Jul-2003  lukem __KERNEL_RCSID()
 1.45 01-Apr-2003  thorpej branches: 1.45.2;
Use PAGE_SIZE rather than NBPG.
 1.44 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.43 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.42 27-Feb-2002  christos branches: 1.42.8;
- Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.41 10-Sep-2001  chris branches: 1.41.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.40 05-Sep-2001  tsutsui branches: 1.40.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.39 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.38 24-Apr-2001  thorpej branches: 1.38.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.37 29-Jun-2000  mrg branches: 1.37.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.36 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.35 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.34 04-Dec-1999  ragge branches: 1.34.4;
CL* discarding.
 1.33 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.32 27-Mar-1999  mycroft branches: 1.32.8; 1.32.10; 1.32.14;
Oops; vm_offset_t -> vaddr_t.
 1.31 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.30 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.29 19-Nov-1998  mrg fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


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

by someone!
 1.28 08-Jun-1998  gwr Add UVM support
 1.27 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.26 28-Apr-1997  gwr branches: 1.26.8; 1.26.10;
include <machine/leds.h>
 1.25 24-Mar-1997  gwr Change continue to break in a few places (as suggested by mycroft).
 1.24 18-Mar-1997  gwr Add /dev/leds, and allow both that and /dev/eeprom to
return EOF when you read to the end of the device.
Garbage collect some dead code after the switch.
 1.23 28-Feb-1997  gwr Allow access to the PROM via /dev/kmem (like the sparc port)
 1.22 02-Feb-1997  thorpej branches: 1.22.4;
zeropage -> devzeropage, and make it static.
 1.21 27-Jan-1997  gwr Changed "machdep.h" to <machine/machdep.h>
 1.20 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.19 08-Aug-1995  gwr Only allow mmap in "managed" RAM for now.
 1.18 13-Apr-1995  gwr Recover from the crusade. (sigh)
 1.17 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.16 10-Apr-1995  mycroft Add mmopen(), mmclose(), and mmmmap() where appropriate. Lock vmmap when
needed. Make types consistent.
 1.15 07-Apr-1995  gwr Use vmempage for /dev/mem like other ports.
 1.14 13-Dec-1994  gwr Nuke the "vmempage" used by /dev/mem (our pmap doesn't like it).
Instead, allocate a DVMA page as needed (like vmapbuf/vunmapbuf).
 1.13 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.12 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 20-Sep-1994  gwr branches: 1.10.2;
Call eeprom driver for eeprom access.
 1.9 01-Jun-1994  gwr mem.c: Add mmap support to /dev/mem, validate offset for I/O on same.
conf.c: Add mmmap, move MEM_MAJ to 3 for SunOS compatibility.
 1.8 30-May-1994  glass MIN -> min
 1.7 04-May-1994  gwr Catch up with changes in the common vm code.
 1.6 16-Mar-1994  glass eeprom stuff
 1.5 01-Mar-1994  glass bugs fixed and cleanup
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.2 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.1 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.10.2.2 20-Sep-1994  gwr Call eeprom driver for eeprom access.
 1.10.2.1 20-Sep-1994  gwr file mem.c was added on branch netbsd-1-0 on 1994-09-20 16:51:10 +0000
 1.22.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.26.10.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.26.8.1 23-Nov-1998  cgd Fix many real and potential security problems with character device
driver mmap routines that did not properly bounds check offsets.
See NetBSD security advisory NetBSD-SA1998-005 for details. Done
as a patch because it's large, and a fair number of bits are different
in -current. (mrg)
 1.32.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.32.10.1 15-Nov-1999  fvdl Sync with -current
 1.32.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.34.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.37.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.38.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.38.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.38.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.40.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.40.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.41.4.4 11-Nov-2002  nathanw Catch up to -current
 1.41.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.41.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.41.4.1 10-Sep-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-02-28 04:12:24 +0000
 1.42.8.1 17-May-2002  gehenna Add the character device switch.
 1.45.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.45.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.45.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.45.2.1 03-Aug-2004  skrll Sync with HEAD
 1.47.8.1 29-Apr-2005  kent sync with -current
 1.48.8.1 03-Sep-2007  yamt sync with head.
 1.49.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.51.66.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.51.64.2 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.51.64.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.51.40.1 29-Mar-2008  mjf Add a mem_init() function for each architecture that requests a device
node for /dev/mem, /dev/null, /dev/zero, etc.

This will disappear when I move this code (and others) to be a
pseudo-device. When we have machine-independent mem code this will all be
unnecessary anyway.
 1.52.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3 07-Sep-2013  tsutsui Whitespace cleanup.
 1.2 12-Jun-2011  rmind branches: 1.2.2; 1.2.4; 1.2.14; 1.2.18;
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.2.18.1 18-May-2014  rmind sync with head
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.2 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.2.1 12-Jun-2011  cherry file mm_md.c was added on branch cherry-xenmp on 2011-06-23 14:19:45 +0000
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 13-Aug-1993  glass added chksum support from hp300, removed bad stub
 1.59 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.58 24-Apr-2021  thorpej branches: 1.58.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.57 07-Sep-2013  tsutsui branches: 1.57.44;
Whitespace cleanup.
 1.56 28-Jun-2008  tsutsui branches: 1.56.30; 1.56.40; 1.56.46;
Split softc/device_t, with misc cosmetic changes.
 1.55 28-Apr-2008  martin branches: 1.55.2; 1.55.4;
Remove clause 3 and 4 from TNF licenses
 1.54 01-Dec-2007  tsutsui branches: 1.54.14; 1.54.16; 1.54.18;
- some KNF
- use __func__ to print function names
 1.53 03-Feb-2007  tsutsui branches: 1.53.6; 1.53.22; 1.53.24; 1.53.30;
Prepare bus_dma(9) structures for sun3 obio devices.
 1.52 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.51 01-Oct-2006  tsutsui Don't forget to initialize obio_space_tag.
 1.50 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.49 11-Dec-2005  christos branches: 1.49.20; 1.49.22;
merge ktrace-lwp.
 1.48 26-Aug-2005  drochner s/locdesc_t/int/g
 1.47 28-Jun-2005  drochner branches: 1.47.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.46 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.45 15-Jul-2003  lukem branches: 1.45.8;
__KERNEL_RCSID()
 1.44 01-Apr-2003  thorpej branches: 1.44.2;
Use PAGE_SIZE rather than NBPG.
 1.43 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.42 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.41 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.40 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.39 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.38 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.37 05-Sep-2001  tsutsui branches: 1.37.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.36 13-Dec-1998  kleink branches: 1.36.22;
obio_find_mapping(): int -> vaddr_t where appropriate.
 1.35 08-Feb-1998  gwr Improve some diagnostics.
 1.34 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.33 12-Jan-1998  thorpej branches: 1.33.4;
Update for changes to config.
 1.32 02-Dec-1997  gwr Kill some noise from -DDEBUG
 1.31 04-Oct-1997  gwr Move the call to cninit() up a level (easier to find).
 1.30 28-Apr-1997  gwr branches: 1.30.4;
Fix a bug where OBIO locators were not presented to the children.
Rename obio_alloc to obio_mapin; add comments, etc. (like sun3x)
 1.29 27-Jan-1997  gwr Nuke sunmon.h, add machdep.h
 1.28 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic(), etc.
 1.27 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.26 18-Jan-1997  gwr Use the same names (OBIO_ZS_*) as the sun3x port so we can share zs.
 1.25 17-Dec-1996  gwr Add a diagnostic to panic when obio config data has a
default address, which is no longer supported on obio.
 1.24 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.23 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.22 30-Oct-1996  gwr Add a "submatch" function to the obio bus driver so the children
of this driver can get rid of the cruft in their match functions.
 1.21 13-Oct-1996  christos backout previous kprintf change
 1.20 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.19 27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.18 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.17 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.16 13-Feb-1995  gwr DVMA slave mapping support.
 1.15 11-Jan-1995  gwr Cleanup
 1.14 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.13 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.12 26-Oct-1994  cgd new RCS ID format.
 1.11 20-Sep-1994  gwr Add obio_find_mapping() for use by devices that need mappings before
autoconfiguration is done. It re-uses the PROM's mappings now.
 1.10 06-May-1994  gwr Tracking 4.4 integration
 1.9 05-May-1994  gwr cosmetic
 1.8 04-May-1994  gwr Add zs0_va, zs1_va
 1.7 16-Mar-1994  glass do nothing obio_probe_byte()
 1.6 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.5 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 08-Aug-1993  glass lots of changes, too many printfs
 1.30.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.33.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.36.22.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.36.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.37.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.37.6.1 05-Sep-2001  nathanw file obio.c was added on branch nathanw_sa on 2002-10-18 02:40:25 +0000
 1.44.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.44.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.44.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.44.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.44.2.1 03-Aug-2004  skrll Sync with HEAD
 1.45.8.1 29-Apr-2005  kent sync with -current
 1.47.2.4 07-Dec-2007  yamt sync with head
 1.47.2.3 26-Feb-2007  yamt sync with head.
 1.47.2.2 30-Dec-2006  yamt sync with head.
 1.47.2.1 21-Jun-2006  yamt sync with head.
 1.49.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.49.20.2 09-Feb-2007  ad Sync with HEAD.
 1.49.20.1 18-Nov-2006  ad Sync with head.
 1.53.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.53.24.1 09-Jan-2008  matt sync with HEAD
 1.53.22.1 03-Dec-2007  joerg Sync with HEAD.
 1.53.6.1 03-Dec-2007  ad Sync with HEAD.
 1.54.18.2 04-May-2009  yamt sync with head.
 1.54.18.1 16-May-2008  yamt sync with head.
 1.54.16.1 18-May-2008  yamt sync with head.
 1.54.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.54.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.55.4.1 03-Jul-2008  simonb Sync with head.
 1.55.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.56.46.1 18-May-2014  rmind sync with head
 1.56.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.30.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.57.44.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.57.44.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.58.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.22 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.21 05-Feb-1998  gwr branches: 1.21.150; 1.21.152; 1.21.154;
Merge arch/sun3x into arch/sun3
 1.20 28-Apr-1997  gwr branches: 1.20.4;
Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
 1.19 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.18 18-Jan-1997  gwr Use the same names (OBIO_ZS_*) as the sun3x port so we can share zs.
 1.17 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.16 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.15 30-Oct-1996  gwr cosmetic...
 1.14 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.13 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.12 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.11 26-Oct-1994  cgd new RCS ID format.
 1.10 20-Sep-1994  gwr Add obio_find_mapping(), kill xxx_va gunk.
 1.9 04-May-1994  gwr Add zs0_va, zs1_va
 1.8 16-Mar-1994  glass eeprom stuff
 1.7 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 16-Aug-1993  glass 'clock' is now part of the standard config system instead of being done
early and in a hacked way. the movement of startrtclock() to below
cpu_startup() allows this.
 1.2 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.1 08-Aug-1993  glass various changes
 1.20.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.21.154.1 16-May-2008  yamt sync with head.
 1.21.152.1 18-May-2008  yamt sync with head.
 1.21.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.29 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.27 07-Sep-2013  tsutsui branches: 1.27.44;
Whitespace cleanup.
 1.26 28-Jun-2008  tsutsui branches: 1.26.30; 1.26.40; 1.26.46;
Split softc/device_t, with misc cosmetic changes.
 1.25 28-Apr-2008  martin branches: 1.25.2; 1.25.4;
Remove clause 3 and 4 from TNF licenses
 1.24 30-Nov-2007  tsutsui branches: 1.24.14; 1.24.16; 1.24.18;
Pass correct size to allocate struct obmem_softc.
Fix an occasional panic on my 3/80.
 1.23 01-Oct-2006  tsutsui branches: 1.23.2; 1.23.8; 1.23.18; 1.23.26; 1.23.28; 1.23.34; 1.23.38;
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.22 11-Dec-2005  christos branches: 1.22.20; 1.22.22;
merge ktrace-lwp.
 1.21 30-Jun-2005  drochner branches: 1.21.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.20 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.19 15-Jul-2003  lukem branches: 1.19.8;
__KERNEL_RCSID()
 1.18 02-Oct-2002  thorpej branches: 1.18.6;
Add trailing ; to CFATTACH_DECL.
 1.17 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.16 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.15 05-Feb-1998  gwr branches: 1.15.28; 1.15.32;
Merge arch/sun3x into arch/sun3
 1.14 12-Jan-1998  thorpej branches: 1.14.4;
Update for changes to config.
 1.13 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.12 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.11 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.10 13-Oct-1996  christos backout previous kprintf change
 1.9 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.8 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.7 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 06-May-1994  gwr Tracking 4.4 integration
 1.2 01-Mar-1994  glass canonicalize includes. cleanup. missing copyrights.
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.14.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.15.32.1 18-Oct-2002  nathanw Catch up to -current.
 1.15.28.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.18.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.6.1 03-Aug-2004  skrll Sync with HEAD
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.21.2.2 07-Dec-2007  yamt sync with head
 1.21.2.1 30-Dec-2006  yamt sync with head.
 1.22.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.22.20.1 18-Nov-2006  ad Sync with head.
 1.23.38.1 02-Feb-2008  riz Pull up following revision(s) (requested by tsutsui in ticket #1025):
sys/arch/sun3/sun3/obmem.c: revision 1.24
Pass correct size to allocate struct obmem_softc.
Fix an occasional panic on my 3/80.
 1.23.34.1 08-Dec-2007  mjf Sync with HEAD.
 1.23.28.1 09-Jan-2008  matt sync with HEAD
 1.23.26.1 03-Dec-2007  joerg Sync with HEAD.
 1.23.18.1 03-Jun-2008  skrll Sync with netbsd-4.
 1.23.8.1 03-Dec-2007  ad Sync with HEAD.
 1.23.2.1 02-Feb-2008  riz Pull up following revision(s) (requested by tsutsui in ticket #1025):
sys/arch/sun3/sun3/obmem.c: revision 1.24
Pass correct size to allocate struct obmem_softc.
Fix an occasional panic on my 3/80.
 1.24.18.2 04-May-2009  yamt sync with head.
 1.24.18.1 16-May-2008  yamt sync with head.
 1.24.16.1 18-May-2008  yamt sync with head.
 1.24.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.24.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.4.1 03-Jul-2008  simonb Sync with head.
 1.25.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.26.46.1 18-May-2014  rmind sync with head
 1.26.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.30.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.27.44.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.27.44.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.27.44.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.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 27-Jan-1997  gwr branches: 1.8.152; 1.8.154; 1.8.156;
Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.7 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.6 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.5 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.4 26-Oct-1994  cgd new RCS ID format.
 1.3 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.8.156.1 16-May-2008  yamt sync with head.
 1.8.154.1 18-May-2008  yamt sync with head.
 1.8.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 13-Oct-1995  gwr Remove (again) things accidently revived by cvs tag...
 1.1 13-Aug-1993  glass added chksum support from hp300, removed bad stub
 1.180 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.179 20-Dec-2024  tsutsui Remove trailing whitespace.
 1.178 13-Jan-2024  thorpej branches: 1.178.2;
Fix a comment.
 1.177 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.176 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.175 17-Dec-2023  andvar Reshuffle ifdef HAVECACHE/DIAGNOSTIC blocks with the main purpose to make
code build without HAVECACHE/DIAGNOSTIC options, as well as some cleanup:
flags in pv_link is used for HAVECACHE only, declare/define it in the block.
flush_by_page declaration can omit ifdef when only conditional body is guarded.
segva is used only in DIAGNOSTIC/HAVECACHE in pmap_protect_mmu.
combine consecutive DIAGNOSTIC/HAVECACHE blocks were possible.

No functional changes intended.
 1.174 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.173 06-Feb-2022  andvar fix various typos in comments, log messages and documentation.
mainly s/aparently/apparently/ and s/implmented/implemented/.
 1.172 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.171 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.170 07-Nov-2013  christos branches: 1.170.6; 1.170.10;
fix unused warnings
 1.169 07-Sep-2013  tsutsui Whitespace cleanup.
 1.168 07-Jan-2013  chs branches: 1.168.2;
switch to __USE_TOPDOWN_VM.
 1.167 29-Jan-2012  para branches: 1.167.6;
convert from malloc(9) to kmem(9)
 1.166 03-Jun-2011  tsutsui branches: 1.166.2; 1.166.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.165 15-Oct-2010  tsutsui branches: 1.165.2; 1.165.6;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.164 11-Dec-2009  tsutsui branches: 1.164.2; 1.164.4;
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 sun3 pmap sources
and instead define and use sun3_round_seg() and sun3_trunc_seg()
since they are quite pmap implementation dependent
 1.163 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.162 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.161 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.160 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.159 10-Dec-2008  pooka branches: 1.159.2;
Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.158 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.157 28-Apr-2008  martin branches: 1.157.6; 1.157.8;
Remove clause 3 and 4 from TNF licenses
 1.156 27-Apr-2008  tsutsui Make compile with debug options.
 1.155 17-Oct-2007  garbled branches: 1.155.16; 1.155.18; 1.155.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.154 18-May-2007  tsutsui branches: 1.154.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.153 12-Mar-2007  ad branches: 1.153.2; 1.153.8;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.152 22-Feb-2007  thorpej branches: 1.152.4;
TRUE -> true, FALSE -> false
 1.151 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.150 15-Mar-2006  drochner branches: 1.150.16;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.149 11-Dec-2005  christos branches: 1.149.4; 1.149.6; 1.149.8; 1.149.10;
merge ktrace-lwp.
 1.148 19-Jun-2005  thorpej branches: 1.148.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.147 29-May-2005  chs in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.146 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.145 22-Jan-2005  chs branches: 1.145.2; 1.145.6;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.144 15-Jul-2003  lukem branches: 1.144.2; 1.144.6; 1.144.8;
__KERNEL_RCSID()
 1.143 23-Jun-2003  martin branches: 1.143.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.142 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.141 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.140 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.139 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.138 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.137 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.136 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.135 10-Sep-2001  chris branches: 1.135.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.134 07-Sep-2001  tsutsui Fix function names in panic messages.
 1.133 05-Sep-2001  tsutsui branches: 1.133.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.132 03-Jul-2001  chs branches: 1.132.2;
vm_offset_t -> [pv]addr_t.
implement pmap_k{enter_pa,remove}() correctly.
general cleanup.
 1.131 19-Jun-2001  wiz `accessible' only has one `a'.
 1.130 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.129 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.128 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.127 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.126 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.125 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.124 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.123 03-Feb-2001  tsutsui branches: 1.123.2;
m68k/m68k.h is now pulled via machine/cpu.h.
 1.122 14-Jan-2001  thorpej splpmap() -> splvm()
 1.121 24-Nov-2000  tsutsui PAGE_SIZE on sun3/sun3x is now constant;
Use uvmexp.pagesize itself for its initialization.
 1.120 27-Oct-2000  tsutsui Use pool(9) for pmap structures.
 1.119 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.118 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.117 25-Jun-2000  mrg remove some redundant <vm/vm_xxx.h> includes
 1.116 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.115 12-Sep-1999  chs branches: 1.115.2; 1.115.4; 1.115.8;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.114 08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.113 17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.112 17-Jun-1999  thorpej Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
 1.111 26-Mar-1999  mycroft branches: 1.111.4;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.110 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.109 26-Feb-1999  is sun3 part of fix for PR 6152
 1.108 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.107 17-Dec-1998  gwr Fix some "unused variable" warnings (if !HAVE_CACHE)
 1.106 19-Jul-1998  thorpej Remove redundant opt_ddb.h
 1.105 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.104 04-Jul-1998  jonathan defopt DDB.
 1.103 08-Jun-1998  gwr Add UVM support
 1.102 19-May-1998  thorpej It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
 1.101 19-Feb-1998  gwr Support MACHINE_NEW_NONCONTIG
 1.100 08-Feb-1998  gwr Fix pmap_map
 1.99 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.98 22-Jan-1998  gwr branches: 1.98.2;
Use the same names as the sun3x (DVMA_MAP_*)
 1.97 08-Jan-1998  thorpej Update a comment to reflect the vm_bootstrap_steal_memory() change, and
while I'm here, note which two functions will no longer exist when
new non-contig code is done for this pmap.
 1.96 06-Jan-1998  thorpej Always include pmap_pinit(), since it is a defined pmap interface
function (thought, we might revisit that later). Just call pmap_pinit()
in pmap_create(), instead of inlining what pmap_pinit() does.

Also, g/c a TAILQ_FIRST() macro that is now defined in <sys/queue.h>
 1.95 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.94 02-Dec-1997  gwr Kill some noise from -DDEBUG
 1.93 24-Nov-1997  gwr Remove some outdated comments, fix others.
 1.92 24-Nov-1997  gwr Kill unnecessary arguments to pmap_enter_*
Do pa=PG_PA(pte) in pv_link/pv_unlink so it
does not need to happen in as many places.
 1.91 24-Nov-1997  gwr On the 3/50 it is avail_start that must be less than hole_start,
not avail_end. Identified by Greg Oster <oster@cs.usask.ca>
 1.90 21-Nov-1997  gwr Strengthen DIAGNOSTIC checks in pmap_enter_*
Further simplify protection converter (gone).
 1.89 21-Nov-1997  gwr Minor simplifications.
 1.88 19-Nov-1997  gwr Better definition of PA_IS_DEV, and use it two more places.
 1.87 19-Nov-1997  gwr Correct handling of "physical address" values given to us by the
VM code, which may have low bits specifying device space!
 1.86 03-Nov-1997  gwr More efficient implementations of:
pmap_protect_noctx()
pmap_remove_noctx()
 1.85 03-Nov-1997  gwr More reordering
 1.84 03-Nov-1997  gwr Use a private pool of PV elements. This improves performance,
and avoids reentrance into pmap code via malloc().
 1.83 03-Nov-1997  gwr Implement a "kernel-only" context for processes that have not
touched any user-space address recently. This is efficient
for things that stay in the kernel for a while, waking up
to handle some I/O then going back to sleep (i.e. nfsd).
If and when such a process returns to user-mode, it will
fault and be given a real context at that time.

This also makes context switch faster, because all we need
to do there for the MMU is slam the context register.
 1.82 02-Nov-1997  gwr Give the kernel pmap a soft copy of its segmap (like user pmaps)
so we can optimize away calls where pm_segmap[x] == SEGINV.
 1.81 02-Nov-1997  gwr Change some debug prints to db_printf(), other minor stuff.
 1.80 01-Nov-1997  gwr Clean up spl* handling a bit (move some spl* calls up a level,
and have the callee do a CHECK_SPL for debugging).
Get rid of some private TAILQ_* macros.
some cosmetic stuff.
 1.79 31-Oct-1997  gwr More movement.
 1.78 31-Oct-1997  gwr Move things aroun a little (group by purpose, etc.)
 1.77 30-Oct-1997  gwr Replace PMAP_LOCK/PMAP_UNLOCK with splimp/splx
 1.76 30-Oct-1997  gwr Move some variables from _startup.c into pmap.c (used only there).
Re-organize pmap_bootstrap, and shorten some function names.
 1.75 06-Oct-1997  gwr branches: 1.75.2;
Move some of the VM initialization work from _startup.c to pmap.c
where it is normally found.
 1.74 05-Oct-1997  gwr Do kernel core header initialization a little differently.
 1.73 29-Jul-1997  fair branches: 1.73.2;
fix compiler warnings; %x -> 0x%x; add arg to panic in change_pte appropriate to format string; see PR#3757
 1.72 10-Jun-1997  veego s/_trunc_seg/m68k_trunc_seg/ s/_round_page/m68k_round_page/
 1.71 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.70 28-Feb-1997  gwr Allow pmap_page_index to be a macro (in pmap.h)
Make pmap_free_pages() teturn what actually remains
(Thanks to Wolfgang Solfrank for suggesting the fix.)
Fix some typos while I'm here...
 1.69 18-Feb-1997  gwr Add pmap_wired_pages()
 1.68 02-Feb-1997  thorpej branches: 1.68.4;
Use copypage() and zeropage() in the right places.
 1.67 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic(), etc.
 1.66 27-Jan-1997  gwr Implement _pmap_fault() (does the VA check and calls pmap_fault_reload).
Correct VA range checks in pmap_protect and elsewhere (lower limit of
kernel VA for our purposes is virtual_avail, not VM_MIN_KERNEL_ADDRESS).
Make pmap_activate flush the cache (only if needed). Fix copyright.
 1.65 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.64 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.63 13-Oct-1996  christos backout previous kprintf change
 1.62 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.61 05-May-1996  gwr Kernel crash dumps now work on the sun3. (Yea!)
 1.60 28-Feb-1996  gwr update PMAP_PREFER
 1.59 12-Feb-1996  christos make pmap_page_index return int
 1.58 10-Oct-1995  gwr New function: set_segmap_allctx()
 1.57 08-Oct-1995  gwr Minor cleanup re. Debugger() calls...
 1.56 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.55 15-Aug-1995  gwr Correct a comment re. splnet
 1.54 13-Aug-1995  mycroft splnet --> splsoftnet
 1.53 08-Aug-1995  gwr Make this link with PMAP_DEBUG turned off.
 1.52 27-Jun-1995  gwr Add/correct some cache-flush logic to deal with the fact that the
VAC has ref/mod bits that need write-back treatment.
 1.51 24-May-1995  gwr Add missing conditional (thanks to Jason Thorpe)
Add pmap_collect()
 1.50 13-Apr-1995  gwr prepare to enable the cache
 1.49 10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.48 08-Apr-1995  gwr Do the I-cache flush in the process switch asm code like other ports.
 1.47 07-Apr-1995  gwr Flush the cache when switching contexts (thanks to David Jones).
 1.46 17-Mar-1995  gwr Make the "removing wired pmeg" Debugger call conditional.
 1.45 10-Mar-1995  gwr Define IS_MAIN_MEM(pte) better and explain it.
 1.44 10-Mar-1995  gwr Treat high physical addresses like "device" space,
so frame-buffer devices don't go into the pv_lists.
 1.43 11-Jan-1995  gwr Cleanup
 1.42 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.41 30-Nov-1994  gwr branches: 1.41.2;
Improve diagnostic in pmap_page_index().
 1.40 30-Nov-1994  gwr Optimize pmap_page_index() and fix some comments.
 1.39 28-Nov-1994  gwr Fix syscall arg copyin, etc.
 1.38 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.37 26-Oct-1994  gwr Move sun3_round_up_seg() here from param.h as a temporary measure.
Eventually, it should be eliminated from these two files as well.
 1.36 26-Oct-1994  cgd new RCS ID format.
 1.35 29-Jul-1994  gwr branches: 1.35.2;
Remove some overly paranoid and incorrect debugging tests.
 1.34 23-Jul-1994  gwr Fix unterminated comment from when I botched the last change...
 1.33 18-Jul-1994  gwr Kill some over-zealous debugging checks.
Make sure kernel maps DVMA space non-cached.
 1.32 14-Jul-1994  gwr Oops, I inserted that last patch in the wrong place.
 1.31 14-Jul-1994  gwr Avoid trying to unmap DVMA space from pv_remove_all().
 1.30 12-Jul-1994  gwr Fix two more bugs. Seems to work now!
 1.29 11-Jul-1994  gwr Yes!!! Fix use of uninitialized variable in pmap_remove_range_mmu()
Add even more paranoid debugging checks (it's still sick )-:
 1.28 05-Jul-1994  gwr branches: 1.28.2;
Add yet more debugging code... (but still not enough).
 1.27 30-Jun-1994  gwr Add yet more debugging hacks:
set pmap_db_watchva=VADDR to see all activity for that VADDR
 1.26 29-Jun-1994  gwr Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.25 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.24 20-May-1994  gwr Add pmap_bootstrap_alloc()
 1.23 06-May-1994  gwr Tracking 4.4 integration
 1.22 04-May-1994  gwr Catch up with changes in the common vm code.
 1.21 02-May-1994  glass ugh. splimp is the greater of splnet and splbio now. used by pmap module for splpmap()
 1.20 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.19 01-Mar-1994  glass bugs fixed and cleanup
 1.18 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.17 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.16 12-Dec-1993  glass snapshot of my private sources
 1.15 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.14 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.13 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.12 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.11 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.10 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.9 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.8 10-Aug-1993  glass fixed problem that caused two consecutive segments to be using the same
pmeg unknowingly. still too many printfs, not sure how many are actualy
in the machine dependent code. reaches cpu_startup() where it stops
deliberately. next project: autoconfig(), maybe kgdb
 1.7 08-Aug-1993  glass lots of changes, too many printfs
 1.6 05-Aug-1993  glass gets to consinit() and blows up
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 02-Aug-1993  glass toasted a whole load more undefined symbols
 1.3 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.2 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.1 27-Jul-1993  glass new pmap module
 1.28.2.5 29-Jul-1994  cgd from trunk.
 1.28.2.4 24-Jul-1994  cgd update per gwr.
 1.28.2.3 19-Jul-1994  cgd from trunk, per gwr.
 1.28.2.2 15-Jul-1994  cgd update from trunk.
 1.28.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.35.2.2 29-Jul-1994  gwr Remove some overly paranoid and incorrect debugging tests.
 1.35.2.1 29-Jul-1994  gwr file pmap.c was added on branch netbsd-1-0 on 1994-07-29 04:04:32 +0000
 1.41.2.1 30-Nov-1994  gwr Make a branch that works with the 1.0 code base.
 1.68.4.1 12-Mar-1997  is Merge in changes from The Trunk
 1.73.2.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.75.2.5 15-Dec-1997  mellon Pull rev 1.94 up from trunk (gwr)
 1.75.2.4 25-Nov-1997  mellon Pull rev 1.89 through 1.93 up from trunk (gwr)
 1.75.2.3 19-Nov-1997  mellon Pull rev 1.87 and 1.88 up from trunk (gwr)
 1.75.2.2 05-Nov-1997  mellon Pull rev 1.77 through 1.86 up from trunk (gwr)
 1.75.2.1 30-Oct-1997  mellon Pull rev 1.76 up from trunk (gwr)
 1.98.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.111.4.2 02-Aug-1999  thorpej Update from trunk.
 1.111.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.115.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.115.4.1 15-Nov-1999  fvdl Sync with -current
 1.115.2.7 23-Apr-2001  bouyer Sync with HEAD.
 1.115.2.6 27-Mar-2001  bouyer Sync with HEAD.
 1.115.2.5 11-Feb-2001  bouyer Sync with HEAD.
 1.115.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.115.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.115.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.115.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.123.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.123.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.132.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.132.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.132.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.133.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.135.4.7 11-Nov-2002  nathanw Catch up to -current
 1.135.4.6 18-Oct-2002  nathanw Catch up to -current.
 1.135.4.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.135.4.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.135.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.135.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.135.4.1 10-Sep-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-18 19:39:02 +0000
 1.143.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.143.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.143.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.143.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.143.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.143.2.1 03-Aug-2004  skrll Sync with HEAD
 1.144.8.1 29-Apr-2005  kent sync with -current
 1.144.6.1 08-Jun-2005  tron Pull up revision 1.147 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.144.2.1 08-Jun-2005  tron Pull up revision 1.147 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.145.6.1 06-Jun-2005  tron Pull up revision 1.147 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.145.2.1 12-Feb-2005  yamt use new apis.
 1.148.2.3 03-Sep-2007  yamt sync with head.
 1.148.2.2 26-Feb-2007  yamt sync with head.
 1.148.2.1 21-Jun-2006  yamt sync with head.
 1.149.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.149.8.1 01-Apr-2006  yamt sync with head.
 1.149.6.1 22-Apr-2006  simonb Sync with head.
 1.149.4.1 09-Sep-2006  rpaulo sync with head
 1.150.16.2 24-Mar-2007  yamt sync with head.
 1.150.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.152.4.2 27-May-2007  ad Sync with head.
 1.152.4.1 13-Mar-2007  ad Sync with head.
 1.153.8.1 22-May-2007  matt Update to HEAD.
 1.153.2.1 11-Jul-2007  mjf Sync with head.
 1.154.10.1 06-Nov-2007  matt sync with HEAD
 1.155.20.3 11-Mar-2010  yamt sync with head
 1.155.20.2 04-May-2009  yamt sync with head.
 1.155.20.1 16-May-2008  yamt sync with head.
 1.155.18.1 18-May-2008  yamt sync with head.
 1.155.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.155.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.157.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.157.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.157.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.159.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.164.4.2 12-Jun-2011  rmind sync with head
 1.164.4.1 05-Mar-2011  rmind sync with head
 1.164.2.2 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.164.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.165.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.165.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.166.6.1 18-Feb-2012  mrg merge to -current.
 1.166.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.166.2.2 23-Jan-2013  yamt sync with head
 1.166.2.1 17-Apr-2012  yamt sync with head
 1.167.6.3 03-Dec-2017  jdolecek update from HEAD
 1.167.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.167.6.1 25-Feb-2013  tls resync with head
 1.168.2.1 18-May-2014  rmind sync with head
 1.170.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.170.6.1 05-Feb-2017  skrll Sync with HEAD
 1.178.2.1 02-Aug-2025  perseant Sync with HEAD
 1.23 24-May-1995  gwr Merged locore code back into locore.s
 1.22 08-Apr-1995  gwr Do the I-cache flush in the process switch asm code like other ports.
 1.21 26-Mar-1995  gwr Nuke FPCOPROC
 1.20 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.19 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.18 26-Oct-1994  cgd new RCS ID format.
 1.17 28-Jun-1994  gwr Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.16 01-Jun-1994  gwr No longer need V_SWTCH (or any other vmstat stuff) in assembly code.
 1.15 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.14 20-May-1994  gwr swtch() ==> cpu_switch(), add cpu_coredump()
 1.13 16-May-1994  gwr Lite: setrq -> setrunqueue
 1.12 06-May-1994  gwr Tracking 4.4 integration
 1.11 04-May-1994  gwr Add missing .text to avoid confusing the assembler.
 1.10 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.9 12-Dec-1993  glass snapshot of my private sources
 1.8 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.7 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.4 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.3 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.2 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.1 29-Jun-1993  glass various updates: but hasn't been compiled
 1.4 07-Dec-2004  chs use the m68k-common procfs_machdep.c on all m68k platforms.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 18-Jan-2001  tv branches: 1.2.24;
No-op commit to force update to a non-"-kk" revision.
 1.1 17-Jan-2001  fvdl branches: 1.1.2;
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.1.2.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.1.2.1 17-Jan-2001  bouyer file procfs_machdep.c was added on branch thorpej_scsipi on 2001-01-18 09:23:06 +0000
 1.2.24.4 18-Dec-2004  skrll Sync with HEAD.
 1.2.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.24.1 03-Aug-2004  skrll Sync with HEAD
 1.2 10-Apr-1997  thorpej This file is obsolete.
 1.1 14-Feb-1997  gwr branches: 1.1.2;
Pull regdump() out of machdep.c and correct a problem where it
would try to print things that are beyond the end of the stack.
 1.1.2.2 12-Mar-1997  is Merge in changes from The Trunk
 1.1.2.1 14-Feb-1997  is file regdump.c was added on branch is-newarp on 1997-03-12 14:05:22 +0000
 1.2 13-Mar-1997  gwr Use arch/m68k/m68k/sig_machdep.c
 1.1 13-Feb-1997  gwr branches: 1.1.2;
Move sendsig() and sys_sigreturn() from machdep.c to here.
Should probably move to m68k/m68k eventually...
 1.1.2.2 12-Mar-1997  is Merge in changes from The Trunk
 1.1.2.1 13-Feb-1997  is file sig_machdep.c was added on branch is-newarp on 1997-03-12 14:05:23 +0000
 1.7 24-May-1995  gwr Merged locore code back into locore.s
 1.6 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 28-Jun-1994  gwr Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.3 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.2 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.1 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.10 24-May-1995  gwr Merged locore code back into locore.s
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 20-Sep-1994  gwr branches: 1.7.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.6 29-Jun-1994  gwr ...wrong version last time...
 1.5 28-Jun-1994  gwr Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.4 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.1 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.7.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.7.2.1 20-Sep-1994  gwr file softint.s was added on branch netbsd-1-0 on 1994-09-20 16:52:30 +0000
 1.22 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.21 11-Dec-2005  christos branches: 1.21.20; 1.21.22;
merge ktrace-lwp.
 1.20 22-Jan-2005  chs branches: 1.20.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.19 15-Jul-2003  lukem branches: 1.19.8;
__KERNEL_RCSID()
 1.18 22-Nov-1999  jdolecek branches: 1.18.28;
Debugger() --> cpu_Debugger(), include <sys/sytm.h> for it's prototype
remove obsolete comment
 1.17 04-Jul-1998  jonathan branches: 1.17.14; 1.17.20;
defopt DDB.
 1.16 04-Feb-1997  perry Nuke some options GENERIC residue.
 1.15 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.14 30-Dec-1996  gwr Fix warnings.
 1.13 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.12 17-Jun-1996  gwr branches: 1.12.2;
KGDB support
 1.11 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.10 23-Nov-1994  gwr Fix a warning.
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.6 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.5 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.4 13-Aug-1993  glass added chksum support from hp300, removed bad stub
 1.3 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.2 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.1 29-Jun-1993  glass various updates: but hasn't been compiled
 1.12.2.2 17-Jun-1996  gwr KGDB support
 1.12.2.1 17-Jun-1996  gwr file stub.c was added on branch netbsd-1-2 on 1996-06-17 15:41:03 +0000
 1.17.20.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.28.4 24-Jan-2005  skrll Sync with HEAD.
 1.18.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.28.1 03-Aug-2004  skrll Sync with HEAD
 1.19.8.1 29-Apr-2005  kent sync with -current
 1.20.8.1 30-Dec-2006  yamt sync with head.
 1.21.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.21.20.1 18-Nov-2006  ad Sync with head.
 1.72 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.71 30-Oct-1997  gwr branches: 1.71.2;
Move some variables from _startup.c into pmap.c (used only there).
Re-organize pmap_bootstrap, and shorten some function names.
 1.70 06-Oct-1997  gwr branches: 1.70.2;
Move some of the VM initialization work from _startup.c to pmap.c
where it is normally found.
 1.69 04-Oct-1997  gwr Move the call to cninit() up a level (easier to find).
 1.68 04-Oct-1997  gwr Move dumppage initialization from sun3_startup.c to machdep.c
(so it can be a normal kmem_alloc)
 1.67 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.66 10-Jun-1997  veego branches: 1.66.4;
s/_round_seg/m68k_round_seg/ s/_trunc_seg/m68k_trunc_seg/
s/_round_page/m68k_round_page/ s/_trunc_page/m68k_trunc_page/
 1.65 28-Apr-1997  gwr Be quiet in _save_symtab() unless there is a problem.
Improve some comments (and sync with sun3x code).
 1.64 13-Mar-1997  gwr s/sun3_/_/ in sun3_(round|trunc)_(page|seg) macros
 1.63 18-Feb-1997  gwr Define "cold" over in autoconf.c
 1.62 10-Feb-1997  gwr Set cputype,mmutype at compile-time.
 1.61 02-Feb-1997  thorpej branches: 1.61.2;
Declare and set cputype and mmutype.
 1.60 27-Jan-1997  gwr Nuke sunmon.h, add machdep.h
 1.59 27-Jan-1997  gwr Use sunmon_abort() instead of mon_panic(), etc.
 1.58 27-Jan-1997  gwr Remove code that is now in sun3/sunmon.c (shared with sun3x)
Rename some functions (remove sun3 prefix). Fix copyright.
 1.57 30-Dec-1996  gwr Remove some junk.
 1.56 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.55 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.54 13-Oct-1996  christos backout previous kprintf change
 1.53 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.52 05-May-1996  gwr Kernel crash dumps now work on the sun3. (Yea!)
 1.51 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.50 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.49 16-Feb-1996  gwr Improved delay() implementation with lower overhead,
makes very short delays much more accurate.
 1.48 17-Oct-1995  gwr branches: 1.48.2;
Explain why sun3_context_equiv() can not just call set_segmap_allctx().
 1.47 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.46 05-Jul-1995  gwr Do not advance esym if the SYMTAB_SPACE option is set.
 1.45 27-Jun-1995  gwr Fix uses of btoc() which requires an unsigned arg.
 1.44 13-Jun-1995  gwr Fix cpuspeed values for Carerra and similar.
Enable the virtual address cache on the 3/260
 1.43 09-Jun-1995  gwr More liberal check for exec header. Nuke machine type defines (support all)
 1.42 02-Jun-1995  gwr Use the exec header left by the boot program to validate the
symbol table size, and then preserve symbols for ddb.
 1.41 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.40 26-Apr-1995  gwr Disable the cache stuff for now. Add more comments.
 1.39 13-Apr-1995  gwr prepare to enable the cache
 1.38 08-Apr-1995  gwr minor cleanup
 1.37 07-Apr-1995  gwr Make sure curproc->p_addr is set before any faults occur.
Put msgbuf in page zero (so its location is predictable).
 1.36 26-Mar-1995  gwr Add/fix some comments.
 1.35 24-Mar-1995  gwr Determine FPU type during autoconfig.
 1.34 13-Feb-1995  gwr DVMA slave mapping support.
 1.33 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.32 07-Feb-1995  gwr Add ddb commands: machine {abort|halt|reboot}
 1.31 18-Jan-1995  gwr Disable the NMI clock earlier, so the PROM does not touch the ZS chip
while we are using it. (No need to preserve orig_nmi_vect either).
 1.30 11-Jan-1995  gwr Cleanup
 1.29 13-Dec-1994  gwr Nuke the "vmempage" used by /dev/mem (our pmap doesn't like it).
Instead, allocate a DVMA page as needed (like vmapbuf/vunmapbuf).
 1.28 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.27 21-Nov-1994  gwr branches: 1.27.2;
Lots of changes. Fairly stable now.
 1.26 26-Oct-1994  gwr Move sun3_round_up_seg() here from param.h as a temporary measure.
Eventually, it should be eliminated from these two files as well.
 1.25 26-Oct-1994  cgd new RCS ID format.
 1.24 20-Sep-1994  gwr branches: 1.24.2;
Get boothowto flags from PROM flags; fix reboot.
 1.23 11-Jul-1994  gwr miscellaneous cleanup
 1.22 28-Jun-1994  gwr branches: 1.22.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.21 06-May-1994  gwr Tracking 4.4 integration
 1.20 04-May-1994  gwr Enable/disable clocks in sun3_stop()
Add functions to call sun3_stop() with the appropriate arg.
Set the cpuspeed according to the machine type.
 1.19 18-Apr-1994  glass some incredibly trivial cleanup
 1.18 17-Apr-1994  glass compiles again. also cleanup of development printfs. and trap stuff
 1.17 01-Mar-1994  glass bugs fixed and cleanup
 1.16 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.15 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.14 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.13 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.12 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.11 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.10 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.9 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.8 13-Aug-1993  glass snapshot. ready to call configure(), partial integration of torek's config
stuff, i.e it looks to do the right thing but we haven't written any code
yet :)
 1.7 08-Aug-1993  glass lots of changes, too many printfs
 1.6 05-Aug-1993  glass gets to consinit() and blows up
 1.5 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.4 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.3 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.22.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.24.2.2 20-Sep-1994  gwr Get boothowto flags from PROM flags; fix reboot.
 1.24.2.1 20-Sep-1994  gwr file sun3_startup.c was added on branch netbsd-1-0 on 1994-09-20 16:50:31 +0000
 1.27.2.1 30-Nov-1994  gwr Make a branch that works with the 1.0 code base.
 1.48.2.2 17-Oct-1995  gwr Explain why sun3_context_equiv() can not just call set_segmap_allctx().
 1.48.2.1 17-Oct-1995  gwr file sun3_startup.c was added on branch netbsd-1-1 on 1995-10-17 23:16:41 +0000
 1.61.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.66.4.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.66.4.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.70.2.1 30-Oct-1997  mellon Pull rev 1.71 up from trunk (gwr)
 1.71.2.1 25-Jan-1998  gwr Now locore2.c
 1.24 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.23 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.22 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.21 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.20 07-Sep-2013  tsutsui Whitespace cleanup.
 1.19 28-Apr-2008  martin branches: 1.19.34; 1.19.44; 1.19.50;
Remove clause 3 and 4 from TNF licenses
 1.18 01-Oct-2006  tsutsui branches: 1.18.52; 1.18.54; 1.18.56;
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 24-Dec-2005  perry branches: 1.17.20; 1.17.22;
bare asm -> __asm
 1.16 11-Dec-2005  christos merge ktrace-lwp.
 1.15 03-Jun-2005  tsutsui branches: 1.15.2;
Constify.
 1.14 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.13 15-Jul-2003  lukem branches: 1.13.8;
__KERNEL_RCSID()
 1.12 22-Feb-2001  chs branches: 1.12.24;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.11 09-Nov-2000  tsutsui On sun3x, cpu_reboot() calls sunmon_abort() for PROM bug work-around,
but sunmon_abort() does not restore mon_crp so it causes problems.
Instead, call romVectorPtr->abortEntry (via trap14) from sunmon_halt()
and call it from cpu_reboot().

Now PROM boot command works properly even after halt on my 3/80.
 1.10 24-Sep-2000  jdolecek add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.9 26-Feb-1998  gwr branches: 1.9.14; 1.9.24;
Use trap 14 as PROM abort
 1.8 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7 29-Jul-1997  fair branches: 1.7.8;
%x -> 0x%x, fixes for PR#3757
 1.6 25-Apr-1997  gwr Be quiet in sunmon_abort().
 1.5 28-Feb-1997  gwr Remove a diagnostic check in sunmon_reboot broke reboot on the sun3.
 1.4 10-Feb-1997  gwr Save/restore the monitor "v" command handler.
 1.3 27-Jan-1997  gwr branches: 1.3.2;
Nuke sunmon.h, add machdep.h
 1.2 23-Jan-1997  gwr Use <machine/machdep.h>
 1.1 21-Jan-1997  gwr Separate out the stuff used to get in and out of the PROM monitor.
This file can be shared between the sun3 and sun3x.
 1.3.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.7.8.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.9.24.1 15-Dec-2000  he Pull up revision 1.11 (requested by tsutsui):
Make PROM boot command work properly even after halt on 3/80.
 1.9.14.3 12-Mar-2001  bouyer Sync with HEAD.
 1.9.14.2 22-Nov-2000  bouyer Sync with HEAD.
 1.9.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.12.24.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.24.4 24-Jan-2005  skrll Sync with HEAD.
 1.12.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.24.1 03-Aug-2004  skrll Sync with HEAD
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.2.2 30-Dec-2006  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.17.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.17.20.1 18-Nov-2006  ad Sync with head.
 1.18.56.1 16-May-2008  yamt sync with head.
 1.18.54.1 18-May-2008  yamt sync with head.
 1.18.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.50.1 18-May-2014  rmind sync with head
 1.19.44.2 03-Dec-2017  jdolecek update from HEAD
 1.19.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 27-Jan-1997  gwr The sunmon_* declarations are now in machdep.h
 1.1 21-Jan-1997  gwr Separate out the stuff used to get in and out of the PROM monitor.
This file can be shared between the sun3 and sun3x.
 1.3 22-Apr-1995  christos Remove sunos_machdep.c and fix sunos_reboot.
 1.2 22-Apr-1995  christos Convert sun_ to sunos_ and fix sunos_sigreturn() bugs.
 1.1 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.21 31-Jan-1997  thorpej This file is obsolete; this information is now generated by config(8).
 1.20 27-Jan-1997  gwr Eliminate reference to "romp" macro. Moved machdep.h, Fix copyright.
 1.19 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.18 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.17 13-Oct-1996  christos backout previous kprintf change
 1.16 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.15 09-Aug-1996  mrg Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.
 1.14 26-Apr-1995  gwr Avoid null reference with unsupported configurations.
 1.13 07-Apr-1995  gwr Fix to make "root on sd2a" work (from David Jones)
 1.12 24-Feb-1995  gwr Fix mappings of PROM (ctlr,unit,part) to minor numbers.
 1.11 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.10 26-Oct-1994  cgd new RCS ID format.
 1.9 20-Sep-1994  gwr branches: 1.9.2;
Add GENERIC support.
 1.8 12-May-1994  gwr Revert to the equivalent of sun3_stop() when "no suitable root".
 1.7 04-May-1994  gwr Replace unnecessary call to sun3_stop() with a simple panic()
 1.6 01-Mar-1994  glass bugs fixed and cleanup
 1.5 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.4 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.3 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.2 27-Jun-1993  glass clock.c: now compiles even if address is bogus :)
conf.c: compiled, until prom addition :)
cons.c: add entry for prom driver
lib.s: remove some includes; we're being included by locore.s
locore.s: include asm.h, syscall.h, add icode
m68k.s: now included by locore.s
added signal.s; contains signal support
sun3_startup.c: fixed compile bug in vector table initialization; fixed mon
usage
swapgeneric.c: doesn't refer to drivers we don't have
 1.1 25-Jun-1993  glass initial commit
 1.9.2.2 20-Sep-1994  gwr Add GENERIC support.
 1.9.2.1 20-Sep-1994  gwr file swapgeneric.c was added on branch netbsd-1-0 on 1994-09-20 16:49:52 +0000
 1.22 07-Sep-2013  tsutsui Whitespace cleanup.
 1.21 20-Dec-2007  dsl branches: 1.21.12; 1.21.44; 1.21.54; 1.21.60;
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.20 09-Feb-2007  ad branches: 1.20.24; 1.20.32; 1.20.36;
Merge newlock2 to head.
 1.19 11-Dec-2005  christos branches: 1.19.20;
merge ktrace-lwp.
 1.18 22-Jan-2005  chs branches: 1.18.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.17 07-Aug-2003  agc branches: 1.17.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.16 15-Jul-2003  lukem __KERNEL_RCSID()
 1.15 18-Jan-2003  thorpej branches: 1.15.2;
Merge the nathanw_sa branch.
 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 13-Dec-2000  jdolecek branches: 1.13.8;
g/c obsolete vtrace(2) stuff
 1.12 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.11 23-Mar-1999  gwr branches: 1.11.8;
Fix prototype mismatch.
 1.10 26-Feb-1999  is synchronize types, and s/curproc/p/ in one forgotten place
 1.9 26-Feb-1999  is sun3 part of fix for PR 6152
 1.8 19-Jan-1999  thorpej No need for <sys/mtio.h>
 1.7 25-Feb-1998  perry note second parm of sysarch() is now void *, + trivial KNF, etc.
 1.6 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.5 27-Jan-1997  gwr branches: 1.5.14;
Changed "machdep.h" to <machine/machdep.h>
 1.4 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.3 27-Oct-1995  gwr Fix names (vtrace ==> sys_vtrace, etc.)
 1.2 10-Oct-1995  gwr branches: 1.2.2;
sysarch --> sys_sysarch
 1.1 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.2.2.1 27-Oct-1995  gwr Update from HEAD
 1.5.14.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.11.8.2 05-Jan-2001  bouyer Sync with HEAD
 1.11.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.8.4 11-Nov-2002  nathanw Catch up to -current
 1.13.8.3 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.13.8.2 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.13.8.1 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.15.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.8.1 29-Apr-2005  kent sync with -current
 1.18.8.2 21-Jan-2008  yamt sync with head
 1.18.8.1 26-Feb-2007  yamt sync with head.
 1.19.20.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.20.36.1 02-Jan-2008  bouyer Sync with HEAD
 1.20.32.1 26-Dec-2007  ad Sync with head.
 1.20.24.1 09-Jan-2008  matt sync with HEAD
 1.21.60.1 18-May-2014  rmind sync with head
 1.21.54.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.44.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.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.21.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.150 20-Jan-2024  thorpej Largely unify the <machine/cpu.h> headers on the m68k platforms.
 1.149 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.148 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.147 10-Aug-2020  rin Fix siginfo support for amiga, mac68k, and sun3:

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

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

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

XXX
Apply similar fixes to other m68k ports.
 1.146 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.145 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.144 04-Mar-2015  martin branches: 1.144.18;
Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF
 1.143 07-Sep-2013  tsutsui branches: 1.143.6;
Whitespace cleanup.
 1.142 19-Feb-2012  rmind branches: 1.142.2; 1.142.4;
Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.141 17-Jan-2011  tsutsui branches: 1.141.6; 1.141.10;
Explicitly include <machine/pcb.h> for struct pcb.
 1.140 20-Dec-2010  matt branches: 1.140.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.139 07-Jul-2010  chs implement ucas_* for m68k.
 1.138 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.137 21-Nov-2009  rmind branches: 1.137.2; 1.137.4;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.136 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.135 15-Oct-2008  wrstuden branches: 1.135.2; 1.135.4;
Merge wrstuden-revivesa into HEAD.
 1.134 24-Apr-2008  ad branches: 1.134.2; 1.134.4; 1.134.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.133 05-Nov-2007  ad branches: 1.133.16; 1.133.18;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.132 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.131 01-Sep-2007  mhitch branches: 1.131.4;
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.

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

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

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

Fixes PR#36848.
 1.130 12-Jun-2007  mhitch branches: 1.130.4; 1.130.8; 1.130.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.129 18-May-2007  tsutsui Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.128 04-Mar-2007  christos branches: 1.128.2; 1.128.4; 1.128.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.127 09-Feb-2007  ad branches: 1.127.2;
Merge newlock2 to head.
 1.126 23-Jul-2006  ad branches: 1.126.4; 1.126.8; 1.126.10;
Use the LWP cached credentials where sane.
 1.125 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.124 15-May-2006  yamt include kauth.h for kauth_cred_geteuid.
 1.123 14-May-2006  elad integrate kauth.
 1.122 15-Mar-2006  drochner branches: 1.122.2;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.121 25-Feb-2006  wiz branches: 1.121.2; 1.121.4;
Fix some typos.
 1.120 11-Dec-2005  christos branches: 1.120.2; 1.120.4; 1.120.6;
merge ktrace-lwp.
 1.119 03-Jun-2005  tsutsui branches: 1.119.2;
Constify.
 1.118 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.117 28-Aug-2004  jdolecek branches: 1.117.4;
use uvm_grow() to update stack segment size on stack page fault instead
of MD code
 1.116 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.115 08-Nov-2003  tsutsui Remove obsolete comments about curproc.
 1.114 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.113 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.112 22-Sep-2003  cl SA_SIGINFO support for m68k (port specific changes)
 1.111 17-Sep-2003  cl add MD part of SA/pthread pagefault handling on all m68k ports
 1.110 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.109 15-Jul-2003  lukem __KERNEL_RCSID()
 1.108 23-Jun-2003  martin branches: 1.108.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.107 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.106 20-Oct-2002  chs branches: 1.106.2;
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.105 14-May-2002  matt Eliminate more commons or redundant declarations.
 1.104 14-Feb-2002  chs allow writing to write-only mappings. fixes PR 3493.
 1.103 05-Sep-2001  tsutsui branches: 1.103.6;
- vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.102 03-Jun-2001  chs branches: 1.102.2;
clear and restore pcb_onfault around calling uvm_fault(),
so that bugs in the fault-handling code will panic sooner.
 1.101 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.100 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.99 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.98 22-Feb-2001  chs branches: 1.98.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.97 03-Feb-2001  tsutsui Remove reg_dump() declaration, which is in <m68k/m68k.h>
 1.96 27-Dec-2000  jdolecek adapt to recent changes of signal structures
 1.95 19-Dec-2000  scw Unification of the m68k syscall() function.
 1.94 21-Nov-2000  jdolecek restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
provide single struct emul per emulation
* elf:
- kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
per emulation and contains pointer to respective probe function
- interp is allocated via MALLOC() rather than on stack
- elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
part of appropriate execsw[] entry
* constify couple of structures
 1.93 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.92 27-Jun-2000  mrg remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h>
 1.91 06-Jun-2000  soren defopt SYSCALL_DEBUG.
 1.90 27-May-2000  sommerfeld branches: 1.90.2;
Reduce use of curproc in several places:

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

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

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

Also, miscellaneous cleanups in ktrace:

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

- move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

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

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.88 24-May-2000  thorpej Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
 1.87 05-Dec-1999  ragge clrnd()/clbase() discarding.
 1.86 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.85 24-Mar-1999  mrg branches: 1.85.8; 1.85.10; 1.85.12;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.84 18-Mar-1999  chs if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it. this will be used to recover from
out-of-swap conditions.
 1.83 15-Dec-1998  itohy Added COMPAT_LINUX support.
 1.82 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.81 01-Oct-1998  thorpej Adapt to signal changes.
 1.80 18-Jul-1998  thorpej Make DDB work again.
 1.79 25-Jun-1998  thorpej defopt COMPAT_SUNOS
 1.78 25-Jun-1998  thorpej defopt KTRACE
 1.77 09-Jun-1998  gwr Move sun3x _pmap_fault macro from pmap.h to trap.c
 1.76 08-Jun-1998  gwr Add UVM support
 1.75 26-Feb-1998  gwr Make the messages printed by _nodb_trap() more helpful.
 1.74 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.73 02-Dec-1997  gwr branches: 1.73.2;
Remove the broken trap recursion check (#if DEBUG)
 1.72 12-Aug-1997  gwr branches: 1.72.2; 1.72.4;
Resolve conflict with <m68k/cpu.h>
 1.71 29-Jul-1997  fair branches: 1.71.2;
%x -> 0x%x, fixes for PR#3757
 1.70 09-Apr-1997  thorpej Pull in m68k/cpu.h to get regdump() prototype
 1.69 11-Mar-1997  gwr Correct handling for Trap #2 in SunOS executables,
now that we know it is supposed to flush the cache.
(Was thought to be "some obscure FPU operation".)
 1.68 18-Feb-1997  gwr Add a debug helper for detecting recursive kernel-mode traps.
Move straytrap() here from machdep.c
 1.67 12-Feb-1997  gwr The KGDB include is now <sys/kgdb.h>
Add the kgdb_recover trick.
 1.66 11-Feb-1997  gwr Change most occurrences of "struct frame" (union of all frames formats)
to "struct trapframe" (the minimal frame) because in most cases, all we
care about is the minimal, invariant part. Further, if the declaration
says we have an arg of type "frame" (big union), then KGDB will try to
print the whole bloody thing out whether you want to see it or not.

Also add the function trap_kdebug() which takes care of calling one of:
kgdb_trap (for KGDB), or kdb_trap, (for DDB) or the Sun PROM monitor.
This logic used to be in locore, but it is better as C code.
 1.65 27-Jan-1997  gwr branches: 1.65.2;
Nuke sunmon.h, add machdep.h
 1.64 27-Jan-1997  gwr Sync. with the sun3x version (now the same, so sun3x can use this).
Update exframesize[] array from hp300, comments, misc. cleanup, etc.
Replace machine-dependent section that called pmap_fault_reload()
with a simple call to the new _pmap_fault() macro which does any
of that MD stuff that might be necessary.
 1.63 16-Jan-1997  gwr Use db_regs_t instead of struct mc68020_saved_state
 1.62 17-Dec-1996  gwr branches: 1.62.2;
Make sure the MDP_STACKADJ flag is cleared in p->p_md.md_flags
Do this in both machdep.c:setregs() and trap.c:(end of syscall)
for now. Need more analysis to see what is the best way...
Fixes PR#3034 (Thanks very much to Ian Dall for the fix!)
 1.61 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.60 13-Oct-1996  christos backout previous kprintf change
 1.59 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.58 07-Sep-1996  mycroft Use SIGBUS iff we get a legitimate bus fault. Use SIGSEGV for page protection
violations (per Solaris, SVR4, AIX, Linux, Irix, and SunOS).
 1.57 17-Jun-1996  gwr branches: 1.57.2;
KGDB support
 1.56 21-Mar-1996  gwr Correct type of the nofault pointer.
 1.55 10-Oct-1995  gwr SUNOS_SYS_sunos_sigreturn -> SUNOS_SYS_sigreturn
 1.54 26-Sep-1995  gwr Correct child_return() so child is charged for its cpu time.
 1.53 08-Aug-1995  gwr Do errno translation when emulation needs it.
 1.52 27-Jun-1995  gwr Fix uses of btoc() which requires an unsigned arg.
 1.51 26-May-1995  gwr Add a comment
 1.50 24-May-1995  gwr Add child_return()
 1.49 26-Apr-1995  gwr SUNOS_SYS_sigreturn -> SUNOS_SYS_sunos_sigreturn
Also, add check for trap during panic.
 1.48 22-Apr-1995  christos Fixed comparison in SYS__syscall to be against sysent instead of
p->p_emul->e_sysent [Thanks Charles for pointing this out].
I think that this code needs to be fixed anyway for emulations where
SYS_syscall is not the same number as the NetBSD one (0)... (Only the
alpha port so far?)
 1.47 22-Apr-1995  christos - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
 1.46 07-Apr-1995  gwr Look out for null curproc->p_addr which caused a "Watchdog Reset!"
when the recursive faults overflowed the stack. (from David Jones)
 1.45 26-Mar-1995  gwr Nuke FPCOPROC
 1.44 26-Mar-1995  cgd invoke ktrsyscall with (vp, code, argsize, args) as args.
 1.43 09-Mar-1995  mycroft Fix last arg to scdebug_ret().
 1.42 09-Mar-1995  mycroft Fix some types:
* code, args, and rval should use register_t.
* argsize should be a size_t.
 1.41 01-Mar-1995  gwr Call fpu_emulate to handle T_FPEMULI or T_FPEMULD traps.
 1.40 24-Feb-1995  gwr Call trap() for FP faults (T_FPEMULI*)
 1.39 24-Jan-1995  gwr Add hack to block interrupts while in ddb.
 1.38 18-Jan-1995  gwr Just return if kdb_trap returns non-zero (now that kdb_trap is fixed).
Print correct message for kernel coprocessor exception.
 1.37 16-Jan-1995  gwr Fix syntax errors in some #ifdef code.
 1.36 11-Jan-1995  gwr Cleanup
 1.35 02-Dec-1994  gwr Make traps that will panic stop ONCE in the debugger.
 1.34 28-Nov-1994  gwr Fix syscall arg copyin, etc.
 1.33 23-Nov-1994  gwr Revert trap/dopanic case (avoid recursive traps).
 1.32 23-Nov-1994  gwr sun_* -> sunos_*
 1.31 21-Nov-1994  gwr branches: 1.31.2;
Lots of changes. Fairly stable now.
 1.30 26-Oct-1994  cgd new RCS ID format.
 1.29 20-Oct-1994  cgd update for new syscall args description mechanism
 1.28 20-Sep-1994  gwr branches: 1.28.2;
Cleanup, use obio_find_mapping() instead of xxx_va
 1.27 19-Jul-1994  gwr Conditionalize some more debugging code.
(Don't need to drop into DDB on each COW fault :-)
 1.26 11-Jul-1994  gwr miscellaneous cleanup
 1.25 01-Jul-1994  gwr branches: 1.25.2;
Oops, the call to trapsignal needs to be conditional.
 1.24 30-Jun-1994  gwr Yes, trap() can be called when curproc==NULL
 1.23 29-Jun-1994  gwr Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.22 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.21 20-May-1994  gwr swtch() ==> cpu_switch(), add cpu_coredump()
 1.20 16-May-1994  gwr Lite: setrq -> setrunqueue
 1.19 10-May-1994  gwr Add CTL_HW stuff, cpu_sysctl, replace ss_onstack...
 1.18 09-May-1994  gwr Add the hooks to make ddb work.
 1.17 06-May-1994  gwr Tracking 4.4 integration
 1.16 05-May-1994  gwr proc flag names
 1.15 05-May-1994  gwr HPUXCOMPAT changed to COMPAT_HPUX
 1.14 24-Apr-1994  glass fixed to use new queue stuff. random diffs to make ddb stuff mostly compile
 1.13 17-Apr-1994  glass compiles again. also cleanup of development printfs. and trap stuff
 1.12 08-Apr-1994  glass sys to sun_sys
 1.11 02-Apr-1994  glass part one of two..need to give someone a ring...
 1.10 01-Mar-1994  glass bugs fixed and cleanup
 1.9 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.8 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.7 12-Dec-1993  glass snapshot of my private sources
 1.6 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.5 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.4 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.3 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.25.2.2 19-Jul-1994  cgd from trunk, per gwr.
 1.25.2.1 12-Jul-1994  cgd updates from trunk, per gwr
 1.28.2.2 20-Sep-1994  gwr Cleanup, use obio_find_mapping() instead of xxx_va
 1.28.2.1 20-Sep-1994  gwr file trap.c was added on branch netbsd-1-0 on 1994-09-20 16:52:31 +0000
 1.31.2.1 30-Nov-1994  gwr Make a branch that works with the 1.0 code base.
 1.57.2.2 17-Jun-1996  gwr KGDB support
 1.57.2.1 17-Jun-1996  gwr file trap.c was added on branch netbsd-1-2 on 1996-06-17 15:41:06 +0000
 1.62.2.1 18-Jan-1997  thorpej Update from trunk.
 1.65.2.2 13-Mar-1997  gwr Merge changes from the trunk
 1.65.2.1 12-Mar-1997  is Merge in changes from The Trunk
 1.71.2.1 23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.72.4.1 15-Dec-1997  mellon Pull rev 1.73 up from trunk (gwr)
 1.72.2.1 08-Sep-1997  thorpej Significantly restructure the way signal state for a process is stored.
Rather than using bitmasks to redundantly store the information kept
in the process's sigacts (because the sigacts was kept in the u-area),
hang sigacts directly off the process, and access it directly.

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

Make sigacts sharable by adding reference counting.
 1.73.2.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.85.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.85.10.1 15-Nov-1999  fvdl Sync with -current
 1.85.8.6 27-Mar-2001  bouyer Sync with HEAD.
 1.85.8.5 12-Mar-2001  bouyer Sync with HEAD.
 1.85.8.4 11-Feb-2001  bouyer Sync with HEAD.
 1.85.8.3 05-Jan-2001  bouyer Sync with HEAD
 1.85.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.85.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.90.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.98.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.98.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.102.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.102.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.102.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.103.6.11 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.103.6.10 11-Nov-2002  nathanw Catch up to -current
 1.103.6.9 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.103.6.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.103.6.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.103.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.103.6.5 28-Feb-2002  nathanw Catch up to -current.
 1.103.6.4 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.103.6.3 25-Nov-2001  scw Deal with `want_resched' with trap()'s T_ASTFLT case where it belongs
instead of in userret().
 1.103.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.103.6.1 05-Sep-2001  scw file trap.c was added on branch nathanw_sa on 2001-11-18 19:39:03 +0000
 1.106.2.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.108.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.108.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.108.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.108.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.108.2.2 03-Sep-2004  skrll Sync with HEAD
 1.108.2.1 03-Aug-2004  skrll Sync with HEAD
 1.117.4.1 29-Apr-2005  kent sync with -current
 1.119.2.5 15-Nov-2007  yamt sync with head.
 1.119.2.4 03-Sep-2007  yamt sync with head.
 1.119.2.3 26-Feb-2007  yamt sync with head.
 1.119.2.2 30-Dec-2006  yamt sync with head.
 1.119.2.1 21-Jun-2006  yamt sync with head.
 1.120.6.2 01-Jun-2006  kardel Sync with head.
 1.120.6.1 22-Apr-2006  simonb Sync with head.
 1.120.4.1 09-Sep-2006  rpaulo sync with head
 1.120.2.1 01-Mar-2006  yamt sync with head.
 1.121.4.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.121.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.121.2.3 11-Aug-2006  yamt sync with head
 1.121.2.2 24-May-2006  yamt sync with head.
 1.121.2.1 01-Apr-2006  yamt sync with head.
 1.122.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.126.10.2 23-Sep-2007  wrstuden Sync with somewhat-recent netbsd-4.
 1.126.10.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.126.8.2 11-Sep-2007  msaitoh Pull up following revision(s) (requested by mhitch in ticket #866):
sys/arch/atari/atari/trap.c: 1.92
sys/arch/mac68k/mac68k/trap.c: 1.129
sys/arch/amiga/amiga/trap.c: 1.116
sys/arch/mvme68k/mvme68k/trap.c: 1.91
sys/arch/news68k/news68k/trap.c: 1.54
sys/arch/sun3/sun3/trap.c: 1.131
sys/arch/next68k/next68k/trap.c: 1.68
sys/arch/luna68k/luna68k/trap.c: 1.47
sys/arch/cesfic/cesfic/trap.c: 1.36
sys/arch/x68k/x68k/trap.c: 1.90
sys/arch/hp300/hp300/trap.c: 1.132
68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer. The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection. The page would
be read-only and the instruction would fault over and over.
A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.
When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.
68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.
Fixes PR#36848.
 1.126.8.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.126.4.2 06-Feb-2007  ad Update m68k pasteware.
 1.126.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.127.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.128.10.3 03-Oct-2007  garbled Sync with HEAD
 1.128.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.128.10.1 22-May-2007  matt Update to HEAD.
 1.128.4.1 11-Jul-2007  mjf Sync with head.
 1.128.2.4 03-Dec-2007  ad Sync with HEAD.
 1.128.2.3 09-Oct-2007  ad Sync with head.
 1.128.2.2 15-Jul-2007  ad Sync with head.
 1.128.2.1 27-May-2007  ad Sync with head.
 1.130.10.1 06-Nov-2007  matt sync with HEAD
 1.130.8.2 06-Nov-2007  joerg Sync with HEAD.
 1.130.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.130.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.131.4.1 13-Nov-2007  bouyer Sync with HEAD
 1.133.18.1 18-May-2008  yamt sync with head.
 1.133.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.133.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.134.8.1 19-Oct-2008  haad Sync with HEAD.
 1.134.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.134.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.134.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.134.2.3 11-Aug-2010  yamt sync with head.
 1.134.2.2 11-Mar-2010  yamt sync with head
 1.134.2.1 04-May-2009  yamt sync with head.
 1.135.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.135.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.137.4.2 05-Mar-2011  rmind sync with head
 1.137.4.1 30-May-2010  rmind sync with head
 1.137.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.137.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.140.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.141.10.1 24-Feb-2012  mrg sync to -current.
 1.141.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.141.6.1 17-Apr-2012  yamt sync with head
 1.142.4.1 18-May-2014  rmind sync with head
 1.142.2.2 03-Dec-2017  jdolecek update from HEAD
 1.142.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.143.6.1 06-Apr-2015  skrll Sync with HEAD
 1.144.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.144.18.1 10-Jun-2019  christos Sync with HEAD
 1.14 24-May-1995  gwr Merged locore code back into locore.s
 1.13 26-Mar-1995  gwr Nuke FPCOPROC
 1.12 24-Feb-1995  gwr Call trap() for FP faults (T_FPEMULI*)
 1.11 11-Feb-1995  gwr Cleanup related to sfc/dfc register use. Make FPU code conditional
on run-time fpu_type value (in preparation for real FPU probe).
 1.10 20-Dec-1994  gwr Test different bits to identify an MMU fault.
 1.9 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.8 26-Oct-1994  cgd new RCS ID format.
 1.7 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.6 01-Mar-1994  glass bugs fixed and cleanup
 1.5 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.4 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.3 23-Jan-1994  glass now supports cachectl(). totally untested.
 1.2 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.1 28-Aug-1993  glass last snapshot before uploading
 1.26 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.25 11-Dec-2005  christos branches: 1.25.20; 1.25.22;
merge ktrace-lwp.
 1.24 22-Jan-2005  chs branches: 1.24.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.23 22-Sep-2003  cl branches: 1.23.8;
SA_SIGINFO support for m68k (port specific changes)
 1.22 15-Jul-2003  lukem __KERNEL_RCSID()
 1.21 18-Dec-1998  drochner branches: 1.21.42;
COMPAT_xxx option review: add missing opt_compat_netbsd.h
 1.20 04-Oct-1998  thorpej Sigh, we are going to have to burn a vector for Just Sigreturn again,
for now, until we have a more generic {get,set}context(). Update the
comment for trap #3 accordingly.
 1.19 30-Sep-1998  thorpej If !COMPAT_13, make trap #1 produce an illegal instruction. Fix the comment
for trap #2 to reflect that it's the trace trap.
 1.18 30-Sep-1998  thorpej Note that trap #1 is compat_13_sigreturn, and give trap #3 to syscalls
which require special handling, e.g. sigreturn on m68k.

This differs from the old sigreturn trap in that we require the syscall
number to be in register d0, just like the regular syscall entry point.
This will allow sigreturn to be versioned in the future without the need
to allocate another trap vector.
 1.17 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.16 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.15 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.14 16-Feb-1996  gwr Fix comments
 1.13 21-Aug-1995  gwr Fix vectored interrupts, and do autovectored ones similarly.
 1.12 18-Jan-1995  gwr Kill some warnings.
 1.11 11-Jan-1995  gwr Add VME interrupt attach.
 1.10 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.9 26-Oct-1994  cgd new RCS ID format.
 1.8 06-May-1994  gwr Tracking 4.4 integration
 1.7 01-Mar-1994  glass bugs fixed and cleanup
 1.6 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.5 23-Jan-1994  glass now supports cachectl(). totally untested.
 1.4 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 25-Jun-1993  glass initial commit
 1.21.42.4 24-Jan-2005  skrll Sync with HEAD.
 1.21.42.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.42.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.42.1 03-Aug-2004  skrll Sync with HEAD
 1.23.8.1 29-Apr-2005  kent sync with -current
 1.24.8.1 30-Dec-2006  yamt sync with head.
 1.25.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.25.20.1 18-Nov-2006  ad Sync with head.
 1.16 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.15 11-Dec-2005  christos branches: 1.15.20; 1.15.22;
merge ktrace-lwp.
 1.14 22-Jan-2005  chs branches: 1.14.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.13 30-Sep-1998  thorpej branches: 1.13.46; 1.13.54;
Note that trap #1 is compat_13_sigreturn, and give trap #3 to syscalls
which require special handling, e.g. sigreturn on m68k.

This differs from the old sigreturn trap in that we require the syscall
number to be in register d0, just like the regular syscall entry point.
This will allow sigreturn to be versioned in the future without the need
to allocate another trap vector.
 1.12 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.11 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.10 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.9 21-Aug-1995  gwr Fix vectored interrupts, and do autovectored ones similarly.
 1.8 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.7 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.6 26-Oct-1994  cgd new RCS ID format.
 1.5 04-Feb-1994  glass sun3 port works under NetBSD-current now. rcsids probably fucked
 1.4 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.3 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.2 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.1 25-Jun-1993  glass initial commit
 1.13.54.1 29-Apr-2005  kent sync with -current
 1.13.46.1 24-Jan-2005  skrll Sync with HEAD.
 1.14.8.1 30-Dec-2006  yamt sync with head.
 1.15.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.15.20.1 18-Nov-2006  ad Sync with head.
 1.68 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.67 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.66 10-Sep-2001  chris branches: 1.66.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.65 05-Sep-2001  tsutsui branches: 1.65.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.64 05-Sep-2001  tsutsui - vm_offset_t -> vaddr_t, vsize_t, paddr_t
- vm_size_t -> vsize_t
- remove register prefixes
- misc cleanup
 1.63 19-Aug-2001  chs in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
 1.62 29-Jul-2001  chs use pmap_k* in pagemove().
 1.61 24-Apr-2001  thorpej branches: 1.61.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.60 29-Jun-2000  mrg branches: 1.60.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.59 26-Jun-2000  mrg remove/move more mach vm header files:

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

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

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
 1.57 20-Jan-2000  sommerfeld branches: 1.57.2;
Fix PR9240: comment above cpu_fork() out of synch with reality on most ports.
(comment change only, but was wrong for more than just i386).
 1.56 04-Dec-1999  ragge CL* discarding.
 1.55 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.54 08-Jul-1999  thorpej branches: 1.54.2; 1.54.4; 1.54.8;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.53 26-May-1999  thorpej Generally update the comment above vunmapbuf().
 1.52 26-May-1999  thorpej Generally update the comment above the vmapbuf() implementations.
 1.51 14-May-1999  nisimura - Adjust descriptive comment of cpu_fork() which returns nothing and
returns once.
- Minor fixes in mips/vm_machdep.c.
 1.50 13-May-1999  thorpej Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior). Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
 1.49 07-Apr-1999  gwr branches: 1.49.2; 1.49.4;
That last commit left pagemove() entering random mappings...
 1.48 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.47 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.46 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.45 09-Sep-1998  thorpej In cpu_coredump(), use MID_MACHINE rather than MID_* (whatever it expands
to).
 1.44 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.43 28-Jul-1998  thorpej Don't cast the null residual pointer passed to vn_rdwr().
 1.42 08-Jun-1998  gwr Add UVM support
 1.41 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.40 07-Oct-1997  gwr branches: 1.40.4;
Be sure to kmem_free_wakeup() the same range of address space we
got from kmem_alloc_wait() earlier. Thanks to Michael L. Hitch
and Scott Reynolds. (Fixes the sun3/sun3x part of PR#4120.)
 1.39 04-Apr-1997  gwr branches: 1.39.4;
Add a comment.
 1.38 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.37 24-Jan-1997  gwr Use <machine/machdep.h>
 1.36 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.35 26-Apr-1996  gwr Catch up with some prototype changes.
 1.34 20-Feb-1996  gwr use phys_map for DVMA like the sparc
 1.33 05-Feb-1996  christos vm prototype changes
 1.32 09-Dec-1995  mycroft cpu_fork() now returns void.
 1.31 26-Sep-1995  gwr New DVMA interface, and various cleanup.
 1.30 30-May-1995  gwr Make sure curpcb is up-to-date before possibly copying it.
Let child start at spl0 (just like system call entry).
 1.29 26-May-1995  gwr Cleanup in cpu_fork - remove use of curproc
Startup code now ensures proc0pcb is valid.
 1.28 24-May-1995  gwr Update cpu_fork() to eliminate double mapping of kernel stacks.
 1.27 13-Apr-1995  gwr prepare to enable the cache
 1.26 10-Apr-1995  mycroft kernel_pmap --> pmap_kernel()
 1.25 03-Apr-1995  gwr Use new core file format in cpu_coredump()
 1.24 13-Feb-1995  gwr DVMA slave mapping support.
 1.23 24-Jan-1995  gwr Use kmem_alloc_wait instead of calling the vm code directly.
(The old way somehow allowed the pages to be stolen!)
 1.22 11-Jan-1995  gwr Cleanup
 1.21 28-Nov-1994  gwr Fix syscall arg copyin, etc.
 1.20 21-Nov-1994  gwr Lots of changes. Fairly stable now.
 1.19 26-Oct-1994  cgd new RCS ID format.
 1.18 23-Jul-1994  gwr branches: 1.18.2;
Get rid of MDP_AST
 1.17 28-Jun-1994  gwr branches: 1.17.2;
Make setsoft* use the real software interrupt register.
Integrate several fixes from the amiga port (and drop COMPAT_HPUX for now).
Add lots of debugging checks to pmap.c - still needs work.
 1.16 27-May-1994  gwr Catch up with frame.h chages, merge stuff from new hp300 port.
 1.15 20-May-1994  gwr swtch() ==> cpu_switch(), add cpu_coredump()
 1.14 06-May-1994  gwr Tracking 4.4 integration
 1.13 04-May-1994  gwr Get rid of some compiler warnings.
 1.12 05-Apr-1994  glass chopps fix
 1.11 01-Mar-1994  glass bugs fixed and cleanup
 1.10 23-Feb-1994  glass boots, presents shell prompt, and doesn't crash immediately
 1.9 23-Nov-1993  glass Now works with current tree, as opposed to the july 8th tree in which it was
written.
Requires magnum infrastructure now, particularly the clock stuff.
Fails to exec init because the /sbin/init binary
is a sunos binary. Next step is to integrate sunos compatibility code
from /sys/compat/sunos, and the amiga port.
Does not yet implement MACHINE_NOCONTIG support.

[from glass Mon Nov 22 21:22:45 PST 1993 home tag: home2]
 1.8 12-Oct-1993  glass sun3 port updated. netboot integrated.
 1.7 28-Aug-1993  glass last snapshot before uploading. we still have serious clock problems
 1.6 22-Aug-1993  glass gets past enablertclock(), now time to deal with the mountroot mess
 1.5 21-Aug-1993  glass snapshot. for uploading. gets lost in swtch after enablertclock()
 1.4 15-Aug-1993  glass runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
 1.3 03-Aug-1993  glass it links with out any unresolved symbols, last few are just stubs
because we aren't likely to get near execing init for a while
 1.2 02-Aug-1993  glass cleanup, one time compile with -Wall, include systm.h
conversion to new asm.h, removal of ALTENTRY(), ENTRY() pairs replaced by
TWOENTRY().
moved idprom fetching stuff to sun3_startup
bug fixes to pmap
added to sun3_startup.c support for initializing the vm layout, and for
verifying the hardware vs the -Ds from config(8)
still doesn't link. but list is much shorter, and much stupider
 1.1 30-Jul-1993  glass snapshot. working on vm bootstrapping problems, and resolution of undefined
symbols.
 1.17.2.1 26-Jul-1994  cgd From trunk.
 1.18.2.2 23-Jul-1994  gwr Get rid of MDP_AST
 1.18.2.1 23-Jul-1994  gwr file vm_machdep.c was added on branch netbsd-1-0 on 1994-07-23 03:23:16 +0000
 1.39.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.40.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.49.4.2 02-Aug-1999  thorpej Update from trunk.
 1.49.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.49.2.2 07-Apr-1999  gwr That last commit left pagemove() entering random mappings...
 1.49.2.1 07-Apr-1999  gwr file vm_machdep.c was added on branch netbsd-1-4 on 1999-04-07 06:08:00 +0000
 1.54.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.54.4.1 15-Nov-1999  fvdl Sync with -current
 1.54.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.57.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.60.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.61.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.61.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.61.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.61.2.1 03-Aug-2001  lukem update to -current
 1.65.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.66.4.7 11-Nov-2002  nathanw Catch up to -current
 1.66.4.6 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.66.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.66.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.66.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.66.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.66.4.1 10-Sep-2001  scw file vm_machdep.c was added on branch nathanw_sa on 2001-11-18 19:39:03 +0000
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.22 07-Sep-2013  tsutsui branches: 1.22.44;
Whitespace cleanup.
 1.21 28-Jun-2008  tsutsui branches: 1.21.30; 1.21.40; 1.21.46;
Split softc/device_t, with misc cosmetic changes.
 1.20 28-Apr-2008  martin branches: 1.20.2; 1.20.4;
Remove clause 3 and 4 from TNF licenses
 1.19 03-Feb-2007  tsutsui branches: 1.19.44; 1.19.46; 1.19.48;
Add bus_space(9) and bus_dma(9) glue to sun3 MD VME attachment
to test these APIs on TME.

XXX I hope these sun3 MD VME stuff will be replaced by MI VME driver soon.
 1.18 28-Mar-2006  thorpej branches: 1.18.8;
Use device_unit().
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.6; 1.17.8; 1.17.10; 1.17.12;
merge ktrace-lwp.
 1.16 30-Jun-2005  drochner branches: 1.16.2;
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 15-Jul-2003  lukem branches: 1.14.8;
__KERNEL_RCSID()
 1.13 02-Oct-2002  thorpej branches: 1.13.6;
Add trailing ; to CFATTACH_DECL.
 1.12 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 05-Feb-1998  gwr branches: 1.10.28; 1.10.32;
Merge arch/sun3x into arch/sun3
 1.9 12-Jan-1998  thorpej branches: 1.9.4;
Update for changes to config.
 1.8 27-Jan-1997  gwr Fix copyrights (/s/REGENTS/FOUNDATION/)
 1.7 17-Dec-1996  gwr Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!) Also get rid of __BROKEN_INDIRECT_CONFIG
 1.6 20-Nov-1996  gwr Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
 1.5 13-Oct-1996  christos backout previous kprintf change
 1.4 11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3 26-Mar-1996  gwr New autoconfig design that controls attach order.
 1.2 17-Mar-1996  thorpej New device attachment scheme:

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

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1 12-Dec-1994  gwr New autoconfig interface to support VME, etc.
 1.9.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.10.32.1 18-Oct-2002  nathanw Catch up to -current.
 1.10.28.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.13.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.13.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.6.1 03-Aug-2004  skrll Sync with HEAD
 1.14.8.1 29-Apr-2005  kent sync with -current
 1.16.2.2 26-Feb-2007  yamt sync with head.
 1.16.2.1 21-Jun-2006  yamt sync with head.
 1.17.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.17.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.17.8.1 01-Apr-2006  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.18.8.1 09-Feb-2007  ad Sync with HEAD.
 1.19.48.2 04-May-2009  yamt sync with head.
 1.19.48.1 16-May-2008  yamt sync with head.
 1.19.46.1 18-May-2008  yamt sync with head.
 1.19.44.2 29-Jun-2008  mjf Sync with HEAD.
 1.19.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.4.1 03-Jul-2008  simonb Sync with head.
 1.20.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.21.46.1 18-May-2014  rmind sync with head
 1.21.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.30.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.22.44.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.22.44.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.22.44.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.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 05-Feb-1998  gwr branches: 1.2.150; 1.2.152; 1.2.154;
Merge arch/sun3x into arch/sun3
 1.1 26-Jan-1998  gwr branches: 1.1.2;
file vme.h was initially added on branch gwr-3x3.
 1.1.2.1 26-Jan-1998  gwr Sun3 VME info.
 1.2.154.1 16-May-2008  yamt sync with head.
 1.2.152.1 18-May-2008  yamt sync with head.
 1.2.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.33 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.32 07-Nov-2009  cegger branches: 1.32.12; 1.32.22; 1.32.26;
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.31 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.30 03-Oct-2006  tsutsui branches: 1.30.52; 1.30.54; 1.30.56;
- 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.29 30-Sep-2006  tsutsui Unmap pmap region in bus_mapout() as well as sun3/sun3/bus_subr.c does.
 1.28 11-Dec-2005  christos branches: 1.28.20; 1.28.22;
merge ktrace-lwp.
 1.27 01-Apr-2005  yamt branches: 1.27.2;
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.26 22-Jan-2005  chs branches: 1.26.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.25 15-Jul-2003  lukem branches: 1.25.8;
__KERNEL_RCSID()
 1.24 01-Apr-2003  thorpej branches: 1.24.2;
Use PAGE_SIZE rather than NBPG.
 1.23 11-Sep-2001  chs branches: 1.23.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.22 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.21 05-Sep-2001  tsutsui branches: 1.21.2;
- vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.20 24-Apr-2001  thorpej branches: 1.20.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.19 14-Jan-2001  thorpej branches: 1.19.2;
splimp() -> splvm()
 1.18 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.17 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.16 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.15 26-Mar-1999  mycroft branches: 1.15.8; 1.15.10; 1.15.14;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.14 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.13 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.12 09-Jun-1998  gwr Fix a warning
 1.11 08-Feb-1998  gwr Factor *peek out of bus_subr.c and move it to autoconf.c
(to reduce duplication). Add bus_tmapin and bus_tmapout
for use in probe functions (gets a temporary mapping).
Add bus_mapout() to undo bus_mapin() if needed.
 1.10 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.9 16-Oct-1997  gwr branches: 1.9.4;
Add VME support
 1.8 10-Jun-1997  veego s/_trunc_page/m68k_trunc_page/
 1.7 30-May-1997  jeremy Undo changes which make pmap_xxxx_page() functions re-entrant; just block
all interrupts which might cause re-entrancy.

Allow virtual addresses which are not managed by the MI VM system to
participate in the PV system.

Remove a few frivoulous TLB cache flushes.
 1.6 28-May-1997  jeremy Coded to work with new lock system for tmp_vpages.
 1.5 25-Apr-1997  gwr Moved bus_scan() and bus_print() here from autoconf.c
because they are now different in sun3 vs sun3x.
 1.4 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.3 24-Feb-1997  jeremy branches: 1.3.2;
Get rid of inclusion of pmap_pvt.h and use the standard pmap functions for
mapping.
 1.2 22-Feb-1997  gwr Suport size=4 in bus_peek(), and clean out some junk.
 1.1 18-Feb-1997  gwr Move bus_peek(), bus_mapin() here from autoconf.c so the latter
may be shared with the sun3 port.
 1.3.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.9.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.15.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.10.1 15-Nov-1999  fvdl Sync with -current
 1.15.8.2 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.15.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.19.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.4.2 11-Sep-2001  chs replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.23.4.1 11-Sep-2001  chs file bus_subr.c was added on branch nathanw_sa on 2001-09-11 20:37:14 +0000
 1.24.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.24.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.8.1 29-Apr-2005  kent sync with -current
 1.26.2.1 12-Feb-2005  yamt use new apis.
 1.27.2.1 30-Dec-2006  yamt sync with head.
 1.28.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.28.20.1 18-Nov-2006  ad Sync with head.
 1.30.56.2 11-Mar-2010  yamt sync with head
 1.30.56.1 16-May-2008  yamt sync with head.
 1.30.54.1 18-May-2008  yamt sync with head.
 1.30.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.32.26.1 18-May-2014  rmind sync with head
 1.32.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.12.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.45 19-Jan-2024  thorpej Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
 1.44 15-Jan-2024  thorpej Provide a m68k_count_intr() macro that hides the details of how interrupts
are counted, and also ensures that ci_data.cpu_nintr is incremented.
 1.43 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.42 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.41 02-Apr-2021  rin For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived
variables into u_int, to match with kern/subr_evcnt.c.
 1.40 06-Sep-2013  tsutsui branches: 1.40.42; 1.40.44;
Tab/whitespace cleanup.
 1.39 20-Dec-2010  matt branches: 1.39.8; 1.39.18; 1.39.22;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.38 28-Jan-2010  mbalmer branches: 1.38.4;
Fix language.
 1.37 29-Mar-2008  tsutsui branches: 1.37.4;
Don't forget to initialize sc_dev.
 1.36 28-Mar-2008  tsutsui Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
 1.35 26-Jan-2008  tsutsui branches: 1.35.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.34 10-Jan-2008  tsutsui Move todr_attach(9) calls from each MD attachment to MI intersil7170_attach().
 1.33 10-Jan-2008  tsutsui - move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments
 1.32 04-Oct-2006  tsutsui branches: 1.32.28; 1.32.34; 1.32.42;
Make sun3 port use MI mk48txx(4) and intersil7170(4) TOD clock drivers
with bus_space(9) support.
Note clock device name in obio.sun3 is renamed to oclock to use the same
MI attribute (intersil7170) with sun3x.

Tested on 3/80 and TME emulating 3/120 (but not on 3/4xx VME monsters).
 1.31 05-Sep-2006  gdamore branches: 1.31.2; 1.31.4;
Update sun3 to use timecounters (interrupt clock only) and generic-todr.
 1.30 11-Dec-2005  christos branches: 1.30.4; 1.30.8;
merge ktrace-lwp.
 1.29 19-Jun-2005  thorpej branches: 1.29.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.28 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.27 22-Sep-2003  tsutsui branches: 1.27.8;
Count clock interrupts.
clock_intr() functions on sun3 are called directly without dispatchers.

XXX should use evcnt(9)?
 1.26 22-Sep-2003  tsutsui KNF a bit.
 1.25 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.24 15-Jul-2003  lukem __KERNEL_RCSID()
 1.23 02-Oct-2002  thorpej branches: 1.23.6;
Add trailing ; to CFATTACH_DECL.
 1.22 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.21 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.20 05-Sep-2001  tsutsui branches: 1.20.6;
bcopy() -> memcpy(), bzero() -> memset()
 1.19 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.18 03-Feb-2001  tsutsui branches: 1.18.4;
Remove some of broken cf_unit usage.
 1.17 19-Jan-2000  msaitoh check whether tv_usec >= 1000000
 1.16 08-Feb-1998  gwr branches: 1.16.14;
Default the interrupt priority in match functions.
 1.15 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.14 12-Jan-1998  thorpej branches: 1.14.4;
Update for config changes.
 1.13 14-May-1997  gwr Make the "hydra" call leds_hydra() from clock_attach().
 1.12 01-May-1997  gwr oops...
 1.11 28-Apr-1997  gwr Drivers that use obio_mapin should enforce OBIO attachment
(just to be paranoid).
 1.10 25-Apr-1997  gwr Add "oclock" support for the Sun3/470.
 1.9 05-Mar-1997  gwr Fix race conditions that allowed the interrupt latch register to have
the wrong value. Now using the <m68k/asm_single.h> stuff from Leo.
 1.8 19-Feb-1997  gwr Make this use sys/dev/clock_subr.[ch]
 1.7 12-Feb-1997  gwr Must convert from/to BCD when reading/writing the clock chip.
 1.6 27-Jan-1997  gwr branches: 1.6.4;
Kill sunmon.h
 1.5 26-Jan-1997  gwr Check interrupt_reg==0, not clock_va (Oops!)
 1.4 25-Jan-1997  gwr Just return if clock_va is not set.
Use <sun3/sun3/sunmon.h> for abort.
 1.3 23-Jan-1997  gwr Replace the intersil7170 stuff with mostek48t02 stuff.
XXX: Still need to move date conversion functions to
XXX: libkern or somewhere...
 1.2 23-Jan-1997  jeremy Fixed leap year bug. (Doesn't happen until 2100, but still important.)
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.6.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.14.4.2 27-Jan-1998  gwr Fix header file name.
 1.14.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.16.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.16.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.20.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.20.6.1 05-Sep-2001  nathanw file clock.c was added on branch nathanw_sa on 2002-10-18 02:40:26 +0000
 1.23.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.23.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.23.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.23.6.1 03-Aug-2004  skrll Sync with HEAD
 1.27.8.1 29-Apr-2005  kent sync with -current
 1.29.2.3 04-Feb-2008  yamt sync with head.
 1.29.2.2 21-Jan-2008  yamt sync with head
 1.29.2.1 30-Dec-2006  yamt sync with head.
 1.30.8.1 14-Sep-2006  yamt sync with head.
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.31.4.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.31.2.1 18-Nov-2006  ad Sync with head.
 1.32.42.1 10-Jan-2008  bouyer Sync with HEAD
 1.32.34.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.28.1 23-Mar-2008  matt sync with HEAD
 1.35.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.37.4.1 11-Mar-2010  yamt sync with head
 1.38.4.1 05-Mar-2011  rmind sync with head
 1.39.22.1 18-May-2014  rmind sync with head
 1.39.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.39.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.40.44.1 03-Apr-2021  thorpej Sync with HEAD.
 1.40.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.46 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.45 20-Dec-2023  thorpej branches: 1.45.2;
Remove unnecessary <sys/malloc.h>.
 1.44 01-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage DVMA mappings.
 1.43 07-Nov-2013  christos fix variable usage
 1.42 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.41 27-Jan-2012  para branches: 1.41.6; 1.41.10;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.40 21-Nov-2009  rmind branches: 1.40.12; 1.40.16;
Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.39 10-Nov-2009  he Add a zero argument to pmap_kenter_pa() invocations.
According to cegger@ this is the right thing to do for the moment.
 1.38 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.37 04-Mar-2007  christos branches: 1.37.40; 1.37.42; 1.37.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.36 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.35 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.34 03-Feb-2007  tsutsui branches: 1.34.2;
Fix botch in #ifdef DIAGNOSTIC.
 1.33 03-Feb-2007  tsutsui Implement bus_dmamap_load(9) and bus_dmamap_unload(9) for sun3x.
 1.32 02-Feb-2007  tsutsui KNF
 1.31 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.30 11-Dec-2005  christos branches: 1.30.20; 1.30.22;
merge ktrace-lwp.
 1.29 01-Apr-2005  yamt branches: 1.29.2;
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.28 22-Jan-2005  chs branches: 1.28.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.27 15-Jul-2003  lukem branches: 1.27.8;
__KERNEL_RCSID()
 1.26 01-Apr-2003  thorpej branches: 1.26.2;
Use PAGE_SIZE rather than NBPG.
 1.25 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.24 25-Sep-2002  thorpej Don't use rmaps; use extent maps.
 1.23 11-Sep-2001  chs branches: 1.23.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.22 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.21 05-Sep-2001  tsutsui branches: 1.21.2;
- vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.20 31-Aug-2001  simonb Use comments around the token after a #endif.
 1.19 24-Apr-2001  thorpej branches: 1.19.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.18 14-Jan-2001  thorpej branches: 1.18.2;
splimp() -> splvm()
 1.17 03-Nov-2000  tsutsui Fix printf formats in panic messages.
 1.16 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.15 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.14 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.13 08-Jul-1999  thorpej branches: 1.13.2; 1.13.4; 1.13.8;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.12 26-Mar-1999  mycroft branches: 1.12.4;
Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.11 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.10 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 22-Jan-1998  gwr branches: 1.8.4;
Change our DVMA map from the last 16MB to the last 1MB because that is
the only part that is visible to VME masters, and is adequate space.
This allows the "si" driver (on VME) to use DMA transfers.
 1.7 22-Jan-1998  gwr When calling iommu_* functions, use IOMMU_VA_MASK.
 1.6 16-Oct-1997  gwr Check bustype in dvma_kvtopa()
 1.5 10-Oct-1997  jeremy Corrected typo in comments.
 1.4 07-Oct-1997  gwr Add dvma_malloc() for the ie driver.
 1.3 24-Feb-1997  jeremy branches: 1.3.4;
Added some more comments and disabled removal of DVMA alias mapping from
kernel space in dvma_mapout() as it may cause problems with the current
pmap_remove().
 1.2 23-Jan-1997  gwr branches: 1.2.4;
Use <machine/machdep.h>
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.12.4.1 02-Aug-1999  thorpej Update from trunk.
 1.13.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.4.1 15-Nov-1999  fvdl Sync with -current
 1.13.2.3 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.13.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.13.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.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.19.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.23.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.23.4.1 11-Sep-2001  nathanw file dvma.c was added on branch nathanw_sa on 2002-10-18 02:40:26 +0000
 1.26.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.26.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.26.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.1 03-Aug-2004  skrll Sync with HEAD
 1.27.8.1 29-Apr-2005  kent sync with -current
 1.28.2.1 12-Feb-2005  yamt use new apis.
 1.29.2.3 03-Sep-2007  yamt sync with head.
 1.29.2.2 26-Feb-2007  yamt sync with head.
 1.29.2.1 30-Dec-2006  yamt sync with head.
 1.30.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.30.20.2 09-Feb-2007  ad Sync with HEAD.
 1.30.20.1 18-Nov-2006  ad Sync with head.
 1.34.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.34.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.37.44.2 11-Mar-2010  yamt sync with head
 1.37.44.1 16-May-2008  yamt sync with head.
 1.37.42.1 18-May-2008  yamt sync with head.
 1.37.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.40.16.1 18-Feb-2012  mrg merge to -current.
 1.40.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.40.12.1 17-Apr-2012  yamt sync with head
 1.41.10.1 18-May-2014  rmind sync with head
 1.41.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.8 28-Apr-2008  martin branches: 1.8.34; 1.8.44; 1.8.50;
Remove clause 3 and 4 from TNF licenses
 1.7 03-Oct-2006  tsutsui branches: 1.7.52; 1.7.54; 1.7.56;
- 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.6 11-Dec-2005  christos branches: 1.6.20; 1.6.22;
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 19-Sep-2001  thorpej branches: 1.3.4; 1.3.20;
machine/fbio.h -> dev/sun/fbio.h
 1.2 05-Feb-1998  gwr branches: 1.2.26; 1.2.28;
Merge arch/sun3x into arch/sun3
 1.1 26-Jan-1998  gwr branches: 1.1.2;
file enable.c was initially added on branch gwr-3x3.
 1.1.2.2 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.1.2.1 26-Jan-1998  gwr Sun3X enable register stuff.
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.26.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.20.4 24-Jan-2005  skrll Sync with HEAD.
 1.3.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.20.1 03-Aug-2004  skrll Sync with HEAD
 1.3.4.2 19-Sep-2001  thorpej machine/fbio.h -> dev/sun/fbio.h
 1.3.4.1 19-Sep-2001  thorpej file enable.c was added on branch nathanw_sa on 2001-09-19 18:10:35 +0000
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.5.8.1 30-Dec-2006  yamt sync with head.
 1.6.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.6.20.1 18-Nov-2006  ad Sync with head.
 1.7.56.1 16-May-2008  yamt sync with head.
 1.7.54.1 18-May-2008  yamt sync with head.
 1.7.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.50.1 18-May-2014  rmind sync with head
 1.8.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.2 28-Apr-2008  martin branches: 1.2.34; 1.2.44; 1.2.50;
Remove clause 3 and 4 from TNF licenses
 1.1 14-Jan-1997  gwr branches: 1.1.152; 1.1.154; 1.1.156;
Initial revision
 1.1.156.1 16-May-2008  yamt sync with head.
 1.1.154.1 18-May-2008  yamt sync with head.
 1.1.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.50.1 18-May-2014  rmind sync with head
 1.2.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25 07-Dec-2000  jdolecek convert to use genassym.cf & genassym.sh, as other ports do
 1.24 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.23 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.22 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.21 01-Jul-1999  thorpej branches: 1.21.2; 1.21.4; 1.21.6;
Const poison local printf prototype.
 1.20 06-May-1999  kleink SVR4-related typo in previous.
 1.19 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.18 01-Oct-1998  thorpej branches: 1.18.8;
Define SYS_compat_13_sigreturn13.
 1.17 30-Sep-1998  thorpej Make sure SYS_exit and SYS___sigreturn14 are defined. Garbage collect
SYS_sigreturn.
 1.16 24-May-1998  is Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
 1.15 23-May-1998  is Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
 1.14 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.13 22-Jan-1998  gwr branches: 1.13.4;
Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.
 1.12 23-Oct-1997  gwr Make this generate the same output as kern/genassym.awk
 1.11 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
(also fix some comments).
 1.10 19-Feb-1997  gwr Just M68030 is enough.
 1.9 19-Feb-1997  gwr Forgot the quotes (slow down...)
 1.8 19-Feb-1997  gwr Oops... need to define M68020 for copy.s
 1.7 12-Feb-1997  gwr Adapt to changes in pmap.h
 1.6 11-Feb-1997  gwr Add NBPG
 1.5 03-Feb-1997  gwr branches: 1.5.2;
Put all the name/value pairs in an initialized array of structures
so that this can be compiled to assembly code and then translated
directly into assym.h by a simple awk program (genassym.awk).
This program can still be run the old way for verification.
 1.4 23-Jan-1997  gwr Use <machine/machdep.h>
 1.3 23-Jan-1997  gwr Remove PCB_MMUCRP, add VM_PMAP_MMUCRP and VM_PMAP_A_TMGR
 1.2 17-Jan-1997  gwr Update for rename of pcb_mmuctx to pcb_mmucrp
Also reorder things a little.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.13.4.1 27-Jan-1998  gwr Accomodate some name changes in mon.h and elsewhere.
 1.18.8.2 01-Jul-1999  thorpej Sync w/ -current.
 1.18.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.21.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.21.4.1 15-Nov-1999  fvdl Sync with -current
 1.21.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.21.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.17 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.16 20-Feb-2020  skrll G/C
 1.15 17-Feb-2020  skrll G/C LS{SLEEP,RUN,ONPROC}

LWP status manipulation was moved out of assembly long ago.
 1.14 19-Dec-2018  maxv branches: 1.14.6;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.13 15-Oct-2010  tsutsui branches: 1.13.58; 1.13.60;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.12 07-Jul-2010  chs enable usermode RAS for sun[23] also.
 1.11 10-Dec-2009  rmind branches: 1.11.2; 1.11.4;
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 28-Mar-2008  he branches: 1.9.4; 1.9.6; 1.9.10;
Remove <m68k/saframe.h> here as well, patterned after hp300.
 1.8 17-Oct-2007  garbled branches: 1.8.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.7 18-May-2007  tsutsui branches: 1.7.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.6 11-Dec-2005  christos branches: 1.6.30; 1.6.32; 1.6.38;
merge ktrace-lwp.
 1.5 27-Sep-2003  tsutsui branches: 1.5.16;
sys__sigreturn14 -> compat_16_sys___sigreturn14
 1.4 11-Apr-2003  nathanw branches: 1.4.2;
Use PAGE_SIZE rather than NBPG.
 1.3 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.2 11-May-2002  jdolecek use _KERNEL_OPT rather than _KERNEL && !_LKM
 1.1 07-Dec-2000  jdolecek branches: 1.1.2; 1.1.6; 1.1.10;
convert to use genassym.cf & genassym.sh, as other ports do
 1.1.10.4 02-Aug-2002  nathanw Don't need SAF_UPCALL anymore.
 1.1.10.3 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.1.10.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.1 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.1.2.1 07-Dec-2000  bouyer file genassym.cf was added on branch thorpej_scsipi on 2000-12-13 15:49:39 +0000
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.1 03-Sep-2007  yamt sync with head.
 1.6.38.1 22-May-2007  matt Update to HEAD.
 1.6.32.1 11-Jul-2007  mjf Sync with head.
 1.6.30.1 27-May-2007  ad Sync with head.
 1.7.10.1 06-Nov-2007  matt sync with HEAD
 1.8.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.8.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.9.10.1 19-Oct-2008  haad Sync with HEAD.
 1.9.6.1 10-Oct-2008  skrll Sync with HEAD.
 1.9.4.3 11-Aug-2010  yamt sync with head.
 1.9.4.2 11-Mar-2010  yamt sync with head
 1.9.4.1 04-May-2009  yamt sync with head.
 1.11.4.1 05-Mar-2011  rmind sync with head
 1.11.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.11.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.13.60.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.60.1 10-Jun-2019  christos Sync with HEAD
 1.13.58.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.14.6.1 29-Feb-2020  ad Sync with head.
 1.16 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.15 28-Apr-2008  martin branches: 1.15.34; 1.15.44; 1.15.50;
Remove clause 3 and 4 from TNF licenses
 1.14 04-Mar-2007  christos branches: 1.14.40; 1.14.42; 1.14.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 03-Oct-2006  tsutsui branches: 1.13.4;
- 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.12 11-Dec-2005  christos branches: 1.12.20; 1.12.22;
merge ktrace-lwp.
 1.11 22-Jan-2005  chs branches: 1.11.8;
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 05-Sep-2001  tsutsui branches: 1.9.6; 1.9.22;
bcopy() -> memcpy(), bzero() -> memset()
 1.8 12-Apr-1999  gwr branches: 1.8.2; 1.8.22;
Fix unused variable warning
 1.7 08-Apr-1999  gwr Fix the IDPROM checksum. It should check only the first 16 bytes.
Also try to make the sun3 and sun3x versions more similar.
 1.6 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.5 16-Oct-1997  gwr branches: 1.5.4;
Remove the autoconfig glue. This driver is mandatory,
and the match/attach functions did nothing anyway.
 1.4 28-Apr-1997  gwr Use unsigned when doing copy/xor check.
 1.3 25-Apr-1997  gwr Make idprom_init() figure out where the IDPROM resides.
Add autoconfig glue, which currently just shows the
address where the IDPROM was found.
 1.2 27-Jan-1997  gwr Add machdep.h; use sunmon_abort() instead of mon_exit_to_mon().
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.8.22.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.8.2.2 12-Apr-1999  gwr Fix unused variable warning
 1.8.2.1 12-Apr-1999  gwr file idprom.c was added on branch netbsd-1-4 on 1999-04-12 01:30:23 +0000
 1.9.22.4 24-Jan-2005  skrll Sync with HEAD.
 1.9.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.22.1 03-Aug-2004  skrll Sync with HEAD
 1.9.6.2 05-Sep-2001  tsutsui bcopy() -> memcpy(), bzero() -> memset()
 1.9.6.1 05-Sep-2001  tsutsui file idprom.c was added on branch nathanw_sa on 2001-09-05 14:18:11 +0000
 1.10.8.1 29-Apr-2005  kent sync with -current
 1.11.8.2 03-Sep-2007  yamt sync with head.
 1.11.8.1 30-Dec-2006  yamt sync with head.
 1.12.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.12.20.1 18-Nov-2006  ad Sync with head.
 1.13.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.44.1 16-May-2008  yamt sync with head.
 1.14.42.1 18-May-2008  yamt sync with head.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.50.1 18-May-2014  rmind sync with head
 1.15.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.18 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.17 28-Jun-2008  tsutsui branches: 1.17.30; 1.17.40; 1.17.46;
Split softc/device_t, 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 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.13 15-Jul-2003  lukem branches: 1.13.8;
__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-May-2001  chs branches: 1.9.2; 1.9.8;
don't abuse cf_unit.
 1.8 05-Feb-1998  gwr branches: 1.8.26;
Merge arch/sun3x into arch/sun3
 1.7 22-Jan-1998  gwr branches: 1.7.4;
No need to print the size (it's constant).
 1.6 12-Jan-1998  thorpej Update for config changes.
 1.5 25-Apr-1997  gwr Use bus_mapin, and minor tweaks.
 1.4 03-Mar-1997  jeremy Use IOMMU_PAGE_SIZE instead of NBPG, since theoretically the IOMMU page size
is different than the CPU page size.
 1.3 22-Feb-1997  jeremy Make the device attach output look more like the SPARC iommu.
 1.2 13-Feb-1997  jeremy Convert meaningless '0' into a more human readable 'IOMMU_PDE_DT_INVALID'.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.6;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.8.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.9.8.1 27-May-2001  nathanw file iommu.c was added on branch nathanw_sa on 2002-10-18 02:40:26 +0000
 1.9.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.12.6.4 24-Jan-2005  skrll Sync with HEAD.
 1.12.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.6.1 03-Aug-2004  skrll Sync with HEAD
 1.13.8.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 29-Jun-2008  mjf Sync with HEAD.
 1.15.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 03-Jul-2008  simonb Sync with head.
 1.16.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.46.1 18-May-2014  rmind sync with head
 1.17.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.30.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.8 28-Apr-2008  martin branches: 1.8.34; 1.8.44; 1.8.50;
Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.76; 1.7.78;
merge ktrace-lwp.
 1.6 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.5 22-Jan-1998  gwr branches: 1.5.50; 1.5.58;
Add: IOMMU_VA_MASK
 1.4 10-Oct-1997  jeremy Rewrote the comments about the operation of the I/O mapper to make them more
accurate and (hopefully) easier to understand.
 1.3 22-Feb-1997  jeremy branches: 1.3.4;
Add page size constant, since I/O mapper page size may differ from cpu page
size.
 1.2 16-Jan-1997  jeremy branches: 1.2.6;
Added conditional include of iommu kernel driver manipulation routines.
Fixed a few comments.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.3.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.58.1 29-Apr-2005  kent sync with -current
 1.5.50.1 24-Jan-2005  skrll Sync with HEAD.
 1.7.78.1 16-May-2008  yamt sync with head.
 1.7.76.1 18-May-2008  yamt sync with head.
 1.7.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.50.1 18-May-2014  rmind sync with head
 1.8.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.78 17-Jan-2024  thorpej Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.
 1.77 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.76 16-Jan-2024  thorpej Build m68k/support.s on its own; don't include it from locore.s
 1.75 15-Jan-2024  thorpej G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.
 1.74 14-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k interrupt dispatch code.
 1.73 13-Jan-2024  thorpej G/C unreferenced copies of _spl() and _splraise().
 1.72 12-Jan-2024  thorpej We only need one copy of getvbr() and setvbr().
 1.71 12-Jan-2024  thorpej Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
 1.70 12-Jan-2024  thorpej Remove getsp(); nothing uses it.
 1.69 16-Mar-2022  andvar branches: 1.69.4;
s/paniced/panicked/ and s/borken/broken/ in comments.
 1.68 31-Mar-2021  simonb Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.
 1.67 25-Jan-2021  tsutsui branches: 1.67.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.
 1.66 19-Dec-2018  maxv branches: 1.66.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
 1.65 24-Mar-2014  christos branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros
 1.64 22-Dec-2011  tsutsui branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
 1.63 15-Nov-2011  tsutsui branches: 1.63.4;
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.62 08-Feb-2011  rmind branches: 1.62.4;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.61 15-Oct-2010  tsutsui branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.60 25-Feb-2010  skrll branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment
 1.59 10-Dec-2009  rmind branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.58 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.57 17-Oct-2007  garbled branches: 1.57.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.56 20-Jul-2007  tsutsui branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> 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.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.
 1.55 18-May-2007  tsutsui branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.54 11-Dec-2005  christos branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.
 1.53 05-Mar-2004  he branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.
 1.52 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.51 18-Jan-2003  thorpej branches: 1.51.2;
Merge the nathanw_sa branch.
 1.50 02-Nov-2002  chs finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
 1.49 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.48 22-Jul-2001  scw branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.
 1.47 30-May-2001  lukem branches: 1.47.2;
add missing #include "opt_kgdb.h"
 1.46 12-May-2001  kleink Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.
 1.45 22-Feb-2001  chs branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.44 26-Nov-2000  jdolecek split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
 1.43 03-Nov-2000  tsutsui Fix typo in the previous revision. (s/LIdle/Lidle/)
 1.42 20-Aug-2000  thorpej Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
 1.41 31-May-2000  thorpej Add a comment on single-processor systems about p_cpu being initialized
by fork1().
 1.40 31-May-2000  nathanw Update for qs -> sched_qs change.
Kernel compiles again.
 1.39 26-May-2000  thorpej branches: 1.39.2;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.38 26-May-2000  thorpej Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
 1.37 26-Oct-1999  itohy Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.
 1.36 01-Aug-1999  thorpej branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.
 1.35 30-Apr-1999  christos Include opt_compat_sunos.h
 1.34 19-Apr-1999  kleink Add COMPAT_SVR4 for m68k.
 1.33 24-Mar-1999  mrg branches: 1.33.2;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.32 26-Feb-1999  is sun3 part of fix for PR 6152
 1.31 11-Nov-1998  thorpej Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
 1.30 30-Sep-1998  thorpej Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s
 1.29 30-Sep-1998  thorpej Pull in opt_compat_netbsd.h
 1.28 09-Sep-1998  thorpej Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
 1.27 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.26 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.25 22-Jan-1998  gwr branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.
 1.24 22-Jan-1998  gwr Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.
 1.23 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.22 16-Oct-1997  gwr MONSTART/monstart symbol
 1.21 29-May-1997  gwr Add non-inline version of _splraise.
 1.20 13-May-1997  gwr Eliminate references to vmspace.vm_pmap
(also fix some comments).
 1.19 02-May-1997  jeremy Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)
 1.18 25-Apr-1997  gwr Rename "Idle" to "_Idle" so clock.c can reference it.
 1.17 25-Apr-1997  thorpej Adjust for <m68k/m68k/trap_subr.s>
 1.16 13-Apr-1997  thorpej Use common m68k sigcode.
 1.15 09-Apr-1997  thorpej Use <m68k/m68k/proc_subr.s>
 1.14 31-Mar-1997  jeremy In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.
 1.13 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.12 16-Mar-1997  thorpej Use <m68k/m68k/support.s>
 1.11 13-Mar-1997  gwr Sync with sun3 (Trap 1,2,15 handlers)
 1.10 05-Mar-1997  gwr Add ptest_addr
 1.9 20-Feb-1997  jeremy Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.
 1.8 12-Feb-1997  gwr Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.
 1.7 11-Feb-1997  gwr Add a few more coments. (i.e. why init a6=0)
 1.6 11-Feb-1997  gwr Sync with sun3.
 1.5 02-Feb-1997  thorpej branches: 1.5.2;
Remove an un-true comment.
 1.4 23-Jan-1997  gwr Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap
 1.3 17-Jan-1997  gwr Fix a comment (PCB_MMUCTX is a virtual address).
 1.2 17-Jan-1997  gwr Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.5.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.25.4.1 27-Jan-1998  gwr Accomodate some name changes in mon.h and elsewhere.
 1.33.2.1 30-Apr-1999  perry branches: 1.33.2.1.2;
pullup 1.34->1.35 (christos); conflicts manually edited
 1.33.2.1.2.2 02-Aug-1999  thorpej Update from trunk.
 1.33.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.36.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.36.4.1 15-Nov-1999  fvdl Sync with -current
 1.36.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.36.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.36.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.36.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.39.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.45.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.47.2.1 03-Aug-2001  lukem update to -current
 1.48.6.5 11-Nov-2002  nathanw Catch up to -current
 1.48.6.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.48.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.48.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.48.6.1 22-Jul-2001  scw file locore.s was added on branch nathanw_sa on 2001-11-18 19:39:04 +0000
 1.51.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.51.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.51.2.1 03-Aug-2004  skrll Sync with HEAD
 1.53.16.1 03-Sep-2007  yamt sync with head.
 1.54.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.54.38.2 03-Oct-2007  garbled Sync with HEAD
 1.54.38.1 22-May-2007  matt Update to HEAD.
 1.54.32.1 11-Jul-2007  mjf Sync with head.
 1.54.30.2 20-Aug-2007  ad Sync with HEAD.
 1.54.30.1 27-May-2007  ad Sync with head.
 1.54.24.1 22-Jul-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #782):
sys/arch/sun3/sun3x/locore.s: revision 1.56
Sync with sun3/locore.s rev 1.88:
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.
Fixes MMU fault panic in trap() on sun3x.
This should be pulled up to netbsd-4 too.
 1.55.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.55.2.1 07-Aug-2007  matt Sync with HEAD.
 1.56.6.1 06-Nov-2007  matt sync with HEAD
 1.57.20.1 11-Mar-2010  yamt sync with head
 1.59.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.59.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.60.2.1 05-Mar-2011  rmind sync with head
 1.61.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.61.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.62.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.62.4.1 17-Apr-2012  yamt sync with head
 1.63.4.1 18-Feb-2012  mrg merge to -current.
 1.64.10.1 18-May-2014  rmind sync with head
 1.64.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.65.30.1 10-Jun-2019  christos Sync with HEAD
 1.65.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.66.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.67.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.69.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.43 13-Jan-2024  thorpej Switch the sun68k platforms over to the common m68k vector table.
 1.42 11-Jul-2020  nia Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.
 1.41 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.40 06-Sep-2013  tsutsui branches: 1.40.28; 1.40.30;
Tab/whitespace cleanup.
 1.39 10-Aug-2012  tsutsui branches: 1.39.2; 1.39.4;
Appease gcc -fno-common:
- initialize cn_tab in locore2.c:_bootstrap() for early printf calls
Tested on sun3 (3/160 on TME) and sun3x (real 3/80).

XXX: sun3 with >16MB RAM gets "panic: ubc_init: failed to map ubc_object"
 1.38 30-Nov-2009  he branches: 1.38.12;
Cast a vaddr_t to void* before passing to memset, so that this builds again.
 1.37 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.36 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.35 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.34 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.33 04-Mar-2007  christos branches: 1.33.40; 1.33.42; 1.33.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.32 01-Oct-2006  tsutsui branches: 1.32.4;
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.31 11-Dec-2005  christos branches: 1.31.20; 1.31.22;
merge ktrace-lwp.
 1.30 22-Jan-2005  chs branches: 1.30.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.29 15-Jul-2003  lukem branches: 1.29.8;
__KERNEL_RCSID()
 1.28 18-Jan-2003  thorpej branches: 1.28.2;
Merge the nathanw_sa branch.
 1.27 02-Aug-2002  soren G/c vestiges of old sun3-specific SYMTAB_SPACE support.
 1.26 05-Sep-2001  tsutsui branches: 1.26.6; 1.26.14;
bcopy() -> memcpy(), bzero() -> memset()
 1.25 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.24 22-Feb-2001  chs branches: 1.24.4;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.23 03-Feb-2001  tsutsui Use macro in <m68k/m68k.h> for cputype and mmutype.
 1.22 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.21 04-Jul-1998  jonathan branches: 1.21.14;
defopt DDB.
 1.20 12-Jun-1998  gwr Sync with the sun3 version.
 1.19 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.18 04-Oct-1997  gwr branches: 1.18.4;
Move the call to cninit() up a level (easier to find).
 1.17 10-Jun-1997  veego branches: 1.17.4;
s/_round_page/m68k_round_page/
 1.16 14-May-1997  gwr Remove call to leds_init (it is already in obio_init).
 1.15 11-May-1997  jeremy Add call to leds_init() after everything has started up ok.
 1.14 25-Apr-1997  gwr Move the _verify_hardware() work into machdep.c:identifycpu().
Call obio_init() after _vm_init() so we can use peek_byte() to
probe the idprom. Be quiet in _save_symtab() when all is well.
 1.13 24-Mar-1997  gwr No longer force boothowto=RB_SINGLE|RB_KDB
(Yes, it goes multi-user just fine! 8^)
 1.12 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.11 18-Feb-1997  gwr Define "cold" over in autoconf.c
 1.10 12-Feb-1997  gwr Force RB_SINGLE for now (in addition to RB_KDB).
 1.9 11-Feb-1997  gwr Sync with sun3.
 1.8 02-Feb-1997  thorpej branches: 1.8.2;
Declare and set cputype and mmutype.
 1.7 27-Jan-1997  gwr Kill sunmon.h; add sun "code names" (Hydra, Pegasus).
 1.6 25-Jan-1997  gwr Use sunmon_abort() instead of mon_panic().
 1.5 23-Jan-1997  gwr Move a bunch of stuff to sun3/sunmon.c where we can share it.
 1.4 18-Jan-1997  gwr Do loadcrp(&mon_crp) only when returning permanently to the monitor.
 1.3 17-Jan-1997  gwr Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
 1.2 16-Jan-1997  gwr Before dropping into the PROM monitor, restore its CPU Root Pointer (CRP),
and restore our own CRP if we resume. Make sure the string passed to
mon_reboot() is in our data segment where the PROM can see it.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.8.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.17.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.21.14.3 12-Mar-2001  bouyer Sync with HEAD.
 1.21.14.2 11-Feb-2001  bouyer Sync with HEAD.
 1.21.14.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.24.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.26.14.1 31-Aug-2002  gehenna catch up with -current.
 1.26.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.26.6.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.26.6.3 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.26.6.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.26.6.1 05-Sep-2001  scw file locore2.c was added on branch nathanw_sa on 2001-11-18 19:39:05 +0000
 1.28.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.8.1 29-Apr-2005  kent sync with -current
 1.30.8.2 03-Sep-2007  yamt sync with head.
 1.30.8.1 30-Dec-2006  yamt sync with head.
 1.31.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.31.20.1 18-Nov-2006  ad Sync with head.
 1.32.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.33.44.2 11-Mar-2010  yamt sync with head
 1.33.44.1 16-May-2008  yamt sync with head.
 1.33.42.1 18-May-2008  yamt sync with head.
 1.33.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.38.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.38.12.1 30-Oct-2012  yamt sync with head
 1.39.4.1 18-May-2014  rmind sync with head
 1.39.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.30.1 10-Jun-2019  christos Sync with HEAD
 1.40.28.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.141 11-Jun-2025  andvar s/congiguous/contiguous/ in comment.
 1.140 20-Dec-2023  thorpej branches: 1.140.2;
Remove unnecessary <sys/malloc.h>.
 1.139 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.138 31-Dec-2019  ad Rename uvm_free() -> uvm_availmem().
 1.137 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.136 03-Jun-2019  msaitoh Fix typo in comment(s/similiar/similar/).
 1.135 24-Mar-2014  christos branches: 1.135.10; 1.135.20; 1.135.30;
use cpu_{g,s}etmodel
 1.134 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.133 28-Jul-2012  matt branches: 1.133.2; 1.133.4;
Remove declartions of physmem
 1.132 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.131 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.130 14-Jun-2011  tsutsui branches: 1.130.2; 1.130.6;
Fix merge botch. KERNBASE macro was split into KERNBASE3 and KERNBASE3X
for kernel, and was replaced with kernbase constant for possible reference
of USRSTACK in module(7).
 1.129 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.128 16-May-2011  tsutsui branches: 1.128.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.127 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.126 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.125 17-Jan-2011  tsutsui branches: 1.125.2;
Explicitly include <machine/pcb.h> for struct pcb.
 1.124 15-Oct-2010  tsutsui branches: 1.124.2;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.123 08-Feb-2010  joerg branches: 1.123.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.122 10-Dec-2009  matt branches: 1.122.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.121 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.120 10-Nov-2009  he Add a zero argument to pmap_kenter_pa() invocations.
According to cegger@ this is the right thing to do for the moment.
 1.119 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.118 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.117 21-Jan-2009  he branches: 1.117.2;
Re-adapt to the changed return types for major() and minor().
 1.116 12-Jan-2009  tsutsui Use PRIu64 to print 64 bit dev_t.
 1.115 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.114 25-Nov-2008  ad dumpsys: don't spew numbers into the log.
 1.113 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.112 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.111 02-Jul-2008  ad branches: 1.111.2; 1.111.4; 1.111.6;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.110 17-Oct-2007  garbled branches: 1.110.16; 1.110.20; 1.110.22; 1.110.24;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.109 02-Jun-2007  tsutsui branches: 1.109.10;
- Don't refer fputype before FPU is probed.
- Call m68k_make_fpu_idle_frame() from initfpu().
 1.108 04-Mar-2007  tsutsui branches: 1.108.2; 1.108.4; 1.108.10;
Use (char *) on pointer arith.
 1.107 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.106 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.105 09-Feb-2007  ad branches: 1.105.2;
Merge newlock2 to head.
 1.104 21-Oct-2006  mrg in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

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

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

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.103 05-Oct-2006  tsutsui Make sun3 use common sun68k/sun68k/isr.c, sun68k/include/cpu.h and
sun68k/include/intr.h.

This also means now sun3 has GENERIC_SOFT_INTERRUPTS support,
so also adapt fd.c and zs.c to MI softintr(9) APIs.

(I'll also update related sources in yamt-splraiseipl branch later)
 1.102 11-Dec-2005  christos branches: 1.102.20; 1.102.22;
merge ktrace-lwp.
 1.101 19-Jun-2005  thorpej branches: 1.101.2;
Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
 1.100 03-Jun-2005  tsutsui Constify.
 1.99 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.98 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.97 22-Jan-2005  chs branches: 1.97.2;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.96 24-Mar-2004  atatat branches: 1.96.8;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.95 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.94 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.93 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.92 26-Oct-2003  mycroft Fix a compiler warning.
 1.91 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.90 15-Jul-2003  lukem __KERNEL_RCSID()
 1.89 29-Jun-2003  fvdl branches: 1.89.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.88 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.87 26-Apr-2003  ragge Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.86 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.85 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.84 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.83 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.82 19-Sep-2002  ragge Do not include <sys/clist.h>, it's not used in NetBSD at all.
 1.81 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.80 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.79 18-May-2002  lukem add missing union sun3sir sun3sir; (hi gimpy!)
 1.78 20-Mar-2002  christos branches: 1.78.4;
kill remaining PS_STRINGS instances.
 1.77 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.76 11-Sep-2001  chs branches: 1.76.4;
replace pmap_enter() with pmap_kenter_pa() where appropriate.
 1.75 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.74 05-Sep-2001  tsutsui branches: 1.74.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.73 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.72 31-Aug-2001  simonb Use comments around the token after a #endif.
 1.71 16-Jun-2001  tsutsui branches: 1.71.2;
Make sure to write out the dump header into an independent block
on the dump device on sun3x. (sync with sun3)
Now savecore(8) can find core dump in dumpdev properly.

XXX "target kcore /dev/mem" on gdb does not work yet.
 1.70 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.69 30-May-2001  lukem add missing #include "opt_kgdb.h"
 1.68 28-May-2001  chs remove check for too-small MSGBUFOFF now that the reason for it is gone.
 1.67 28-May-2001  chs remove a useless call to uvm_map_protect(). the kernel text is already
mapped read-only in pmap_bootstrap() and the comment which tried to
explain why this might be needed anyway didn't make any sense.
 1.66 28-May-2001  chs make sun3x work again after the recent change to the m68k cpu_kcore_hdr:
allocate a page for dumps like the sun3 does rather than using part of
the msgbuf page. this also lets the msgbuf use the full msgbuf page.
 1.65 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.64 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.63 22-Feb-2001  chs branches: 1.63.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
 1.62 26-Jan-2001  tsutsui Sync with sun3/machdep.c:

> Require the machine-dependant DDB commands to be in db_machine_command_table[]
> and link it directly to db_command_table[] so that it's not necessary
> to do this at runtime. Make db_machine_command_table[] const on all ports.
> g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()
>
> Patch written by enami.
 1.61 09-Nov-2000  tsutsui On sun3x, cpu_reboot() calls sunmon_abort() for PROM bug work-around,
but sunmon_abort() does not restore mon_crp so it causes problems.
Instead, call romVectorPtr->abortEntry (via trap14) from sunmon_halt()
and call it from cpu_reboot().

Now PROM boot command works properly even after halt on my 3/80.
 1.60 13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.59 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.58 26-Jun-2000  mrg remove/move more mach vm header files:

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

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

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

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

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

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

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.55 19-Jan-2000  thorpej Move callout initialization to a single location; no need to duplicate
that code all over the place.
 1.54 04-Dec-1999  ragge CL* discarding.
 1.53 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.52 12-Sep-1999  chs branches: 1.52.2; 1.52.4; 1.52.8;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.51 26-May-1999  thorpej Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.
 1.50 20-May-1999  lukem * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
 1.49 26-Apr-1999  thorpej Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.48 25-Apr-1999  simonb g/c REAL_CLISTS.
 1.47 11-Apr-1999  chs add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.46 08-Apr-1999  gwr branches: 1.46.2;
Use the string kernel_arch to determine "sun3" vs "sun3x"
and leave the machine string as it was (make uses it).
 1.45 01-Apr-1999  thorpej Don't call configure() from cpu_startup().
 1.44 30-Mar-1999  gwr Arrange for "sysctl hw.machine" to show sun3x.
(Needed by the miniroot, etc.)
 1.43 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.42 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.41 04-Mar-1999  kleink Need to include DDB headers only if DDB is defined.
 1.40 27-Feb-1999  scottr defopt BUFCACHE and BUFPAGES.
 1.39 09-Jan-1999  thorpej Garbage-collect `mbutl'.
 1.38 13-Dec-1998  kleink Printf format warning cleanup: the type of the result of a shift operation is
that of the promoted left operand.
 1.37 24-Nov-1998  kleink Need <sys/device.h> to bring configure() declaration in scope.
 1.36 19-Oct-1998  tron Defopt SYSVMSG, SYSVSEM and SYSVSHM.
 1.35 04-Jul-1998  jonathan defopt DDB.
 1.34 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.33 09-Jun-1998  gwr Make this compile...
 1.32 09-Jun-1998  tv Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
 1.31 08-Mar-1998  gwr Sync with sun3/machdep.c (should factor out common stuff...)
> Do the "early breakpoint" (if booted with "-d") even if we
> have only the PROM to handle it, so one can patch things.
 1.30 19-Feb-1998  thorpej Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
 1.29 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.28 24-Jan-1998  mycroft When dumping, print out the device number as major,minor.
 1.27 04-Dec-1997  tv branches: 1.27.2;
Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
 1.26 18-Nov-1997  hannken Change order of include files. See PR #4532.
 1.25 05-Oct-1997  gwr branches: 1.25.2;
Do the cpu_kcore_hdr initialization a little differently.
(also fix - was not setting pg_frame, pg_valid)
 1.24 04-Oct-1997  gwr Make cpu_reboot un-blank the screen (cnpollc(1)).
Validate space in page zero for the kcore header.
 1.23 02-Oct-1997  gwr Make msgbuf stay in page zero
 1.22 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.21 12-Sep-1997  mycroft Set the status word as well, and remove a bogus comment.
 1.20 12-Sep-1997  mycroft Always initialize all registers in setregs().
 1.19 11-Sep-1997  mycroft Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way. (See tech-kern.)
 1.18 12-Jun-1997  mrg branches: 1.18.4;
bring mrg-vm-swap2 onto mainilne.
 1.17 08-Jun-1997  veego Initialize machine from MACHINE.
 1.16 14-May-1997  gwr The Hydra is 20 MHz and the Pegasus is 33 MHz.
 1.15 25-Apr-1997  gwr branches: 1.15.2;
Moved the actual model identification work into identifycpu(),
which used to be in _startup.c:_verify_hardware().
Use sunmon_abort() in cpu_reboot() for now...
 1.14 09-Apr-1997  thorpej Adjust for new kcore.h
 1.13 04-Apr-1997  gwr Add a comment.
 1.12 27-Mar-1997  thorpej Don't allocate mclrefcnt[]; it's dead and gone.
 1.11 26-Mar-1997  gwr Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/
 1.10 21-Mar-1997  gwr First cut at crashdump support.
 1.9 17-Mar-1997  gwr s/fpu_type/fputype/g
 1.8 18-Feb-1997  gwr Moved straytrap() to trap.c (and minor cleanup)
 1.7 14-Feb-1997  gwr Moved sendsig(), sys_sigreturn() to sun3/sig_machdep.c
Moved regdump() and friends to sun3/regdump.c
 1.6 12-Feb-1997  gwr Avoid dereferencing null curproc in dumpmem().
 1.5 11-Feb-1997  gwr branches: 1.5.2;
Sync with sun3.
 1.4 27-Jan-1997  gwr branches: 1.4.2;
Kill sunmon.h
 1.3 23-Jan-1997  gwr Use <machine/machdep.h> and <sun3/sun3/sunmon.h>
 1.2 16-Jan-1997  gwr Make sure the string passed to mon_reboot() is in our data segment
where the PROM can see it. (Bug found by Jeremy -- Thanks!)
 1.1 14-Jan-1997  gwr Initial revision
 1.4.2.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.5.2.1 12-Feb-1997  mrg don't allocate swap map in allocsys.
 1.15.2.2 01-Jun-1997  mrg update to trunk.
 1.15.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.18.4.3 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.2 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.18.4.1 16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.25.2.1 18-Nov-1997  mellon Pull rev 1.26 up from trunk (hannken)
 1.27.2.3 27-Jan-1998  gwr Fix the kcore header (needs "sun3x", not "sun3")
Make cpu_model[] begin with "Sun-3X ..."
 1.27.2.2 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.27.2.1 26-Jan-1998  gwr Merge recent changes on the head onto the gwr-3x3 branch.
 1.46.2.2 16-Apr-1999  chs branches: 1.46.2.2.2;
pull up 1.46 -> 1.47:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
 1.46.2.1 08-Apr-1999  chs branches: 1.46.2.1.2;
file machdep.c was added on branch netbsd-1-4 on 1999-04-16 16:25:36 +0000
 1.46.2.2.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.46.2.1.2.1 locked by: joerg; 08-Apr-1999  thorpej file machdep.c was added on branch netbsd-1-4 on 1999-06-21 01:03:21 +0000
 1.52.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.52.4.1 15-Nov-1999  fvdl Sync with -current
 1.52.2.5 27-Mar-2001  bouyer Sync with HEAD.
 1.52.2.4 12-Mar-2001  bouyer Sync with HEAD.
 1.52.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.52.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.52.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.56.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.57.2.1 15-Dec-2000  he Pull up revision 1.61 (requested by tsutsui):
Make PROM boot command work properly even after halt on 3/80.
 1.63.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.63.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.71.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.71.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.71.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.71.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.71.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.74.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.76.4.12 11-Nov-2002  nathanw Catch up to -current
 1.76.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.76.4.10 17-Sep-2002  nathanw Catch up to -current.
 1.76.4.9 27-Aug-2002  nathanw Catch up to -current.
 1.76.4.8 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.76.4.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.76.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.76.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.76.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.76.4.3 02-Dec-2001  scw If an FPU is available, call m68k_make_fpu_idle_frame() to generate
a reference FPU idle frame.
 1.76.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.76.4.1 11-Sep-2001  scw file machdep.c was added on branch nathanw_sa on 2001-11-18 19:39:05 +0000
 1.78.4.3 31-Aug-2002  gehenna catch up with -current.
 1.78.4.2 30-May-2002  gehenna Catch up with -current.
 1.78.4.1 17-May-2002  gehenna Replace the access to devsw table and the hard-coded major with devsw API.
 1.89.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.89.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.89.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.89.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.89.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.89.2.2 03-Aug-2004  skrll Sync with HEAD
 1.89.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.96.8.1 29-Apr-2005  kent sync with -current
 1.97.2.2 27-Feb-2005  tsutsui Add a missing third arg (align) of uvm_km_alloc() for the new API world.
 1.97.2.1 12-Feb-2005  yamt use new apis.
 1.101.2.4 03-Sep-2007  yamt sync with head.
 1.101.2.3 26-Feb-2007  yamt sync with head.
 1.101.2.2 30-Dec-2006  yamt sync with head.
 1.101.2.1 21-Jun-2006  yamt sync with head.
 1.102.22.2 22-Oct-2006  yamt sync with head
 1.102.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.102.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.102.20.1 18-Nov-2006  ad Sync with head.
 1.105.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.105.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.108.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.108.4.1 11-Jul-2007  mjf Sync with head.
 1.108.2.1 09-Jun-2007  ad Sync with head.
 1.109.10.1 06-Nov-2007  matt sync with HEAD
 1.110.24.1 03-Jul-2008  simonb Sync with head.
 1.110.22.3 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.110.22.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.110.22.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.110.20.3 11-Mar-2010  yamt sync with head
 1.110.20.2 19-Aug-2009  yamt sync with head.
 1.110.20.1 04-May-2009  yamt sync with head.
 1.110.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.110.16.1 02-Jul-2008  mjf Sync with HEAD.
 1.111.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.111.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.111.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.111.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.117.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.122.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.122.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.123.2.3 31-May-2011  rmind sync with head
 1.123.2.2 05-Mar-2011  rmind sync with head
 1.123.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.124.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.125.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.125.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.128.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.130.6.1 18-Feb-2012  mrg merge to -current.
 1.130.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.130.2.2 30-Oct-2012  yamt sync with head
 1.130.2.1 17-Apr-2012  yamt sync with head
 1.133.4.1 18-May-2014  rmind sync with head
 1.133.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.135.30.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.135.30.1 10-Jun-2019  christos Sync with HEAD
 1.135.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.135.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.140.2.1 02-Aug-2025  perseant Sync with HEAD
 1.36 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.35 08-Feb-2011  rmind branches: 1.35.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.34 15-Oct-2010  tsutsui branches: 1.34.2; 1.34.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.33 04-Mar-2007  tsutsui branches: 1.33.64; 1.33.66;
Use (char *) casts.

Umm, vmmap on sun3/sun3x is vaddr_t, not (char *)...
 1.32 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 11-Dec-2005  christos branches: 1.31.26;
merge ktrace-lwp.
 1.30 22-Jan-2005  chs branches: 1.30.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.29 07-Aug-2003  agc branches: 1.29.8;
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 01-Apr-2003  thorpej branches: 1.27.2;
Use PAGE_SIZE rather than NBPG.
 1.26 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.25 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.24 27-Feb-2002  simonb branches: 1.24.8;
s/DEL_ZERO/DEV_ZERO/
 1.23 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.22 10-Sep-2001  chris branches: 1.22.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.21 05-Sep-2001  tsutsui branches: 1.21.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.20 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.19 24-Apr-2001  thorpej branches: 1.19.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.18 29-Jun-2000  mrg branches: 1.18.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.17 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.16 26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.15 04-Dec-1999  ragge branches: 1.15.4;
CL* discarding.
 1.14 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.13 27-Mar-1999  mycroft branches: 1.13.8; 1.13.10; 1.13.14;
Oops; vm_offset_t -> vaddr_t.
 1.12 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.11 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.10 19-Nov-1998  mrg fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


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

by someone!
 1.9 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.8 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7 25-Apr-1997  gwr branches: 1.7.4;
Add /dev/leds support.
 1.6 24-Mar-1997  gwr Change continue to break in a few places (as suggested by mycroft).
 1.5 18-Mar-1997  gwr Sync with the sun3 version.
 1.4 05-Mar-1997  gwr Allow access to the PROM via /dev/kmem (like the sparc port)
 1.3 02-Feb-1997  thorpej branches: 1.3.4;
zeropage -> devzeropage, and make it static.
 1.2 23-Jan-1997  gwr Use <machine/machdep.h>
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.3.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.7.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.13.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.10.1 15-Nov-1999  fvdl Sync with -current
 1.13.8.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.4.1 30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.18.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.19.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.19.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.19.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.21.2.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.21.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.22.4.4 11-Nov-2002  nathanw Catch up to -current
 1.22.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.22.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.22.4.1 10-Sep-2001  nathanw file mem.c was added on branch nathanw_sa on 2002-02-28 04:12:25 +0000
 1.24.8.1 17-May-2002  gehenna Add the character device switch.
 1.27.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.27.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.27.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.8.1 29-Apr-2005  kent sync with -current
 1.30.8.1 03-Sep-2007  yamt sync with head.
 1.31.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.33.66.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.33.64.2 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.33.64.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.34.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.34.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.35.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5 18-May-2007  tsutsui Remove an obsolete file. (superseded by MI mk48txx(4))
 1.4 11-Dec-2005  christos branches: 1.4.30; 1.4.32; 1.4.38;
merge ktrace-lwp.
 1.3 07-Aug-2003  agc branches: 1.3.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.2 25-Apr-1997  gwr branches: 1.2.50;
Provide a struct representing only the clock.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.2.50.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.50.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.50.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.1 03-Sep-2007  yamt sync with head.
 1.4.38.1 22-May-2007  matt Update to HEAD.
 1.4.32.1 11-Jul-2007  mjf Sync with head.
 1.4.30.2 09-Jun-2007  ad Sync with head.
 1.4.30.1 27-May-2007  ad Sync with head.
 1.3 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.2 12-Jun-2011  rmind branches: 1.2.2; 1.2.4; 1.2.14; 1.2.18;
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.2.18.1 18-May-2014  rmind sync with head
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.2 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.2.1 12-Jun-2011  cherry file mm_md.c was added on branch cherry-xenmp on 2011-06-23 14:19:45 +0000
 1.36 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.35 24-Apr-2021  thorpej branches: 1.35.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.34 06-Sep-2013  tsutsui branches: 1.34.44;
Tab/whitespace cleanup.
 1.33 13-Oct-2012  tsutsui branches: 1.33.2;
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.32 28-Jun-2008  tsutsui branches: 1.32.30; 1.32.40;
Split softc/device_t, with misc cosmetic changes.
 1.31 28-Apr-2008  martin branches: 1.31.2; 1.31.4;
Remove clause 3 and 4 from TNF licenses
 1.30 01-Dec-2007  tsutsui branches: 1.30.14; 1.30.16; 1.30.18;
- use __arraycount()
- some KNF
- use __func__ to print function names
 1.29 03-Feb-2007  tsutsui branches: 1.29.6; 1.29.22; 1.29.24; 1.29.30;
Prepare bus_dma(9) structures for sun3x obio devices.
 1.28 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.27 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.26 11-Dec-2005  christos branches: 1.26.20; 1.26.22;
merge ktrace-lwp.
 1.25 26-Aug-2005  drochner s/locdesc_t/int/g
 1.24 28-Jun-2005  drochner branches: 1.24.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.23 22-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.22 15-Jul-2003  lukem branches: 1.22.8;
__KERNEL_RCSID()
 1.21 01-Apr-2003  thorpej branches: 1.21.2;
Use PAGE_SIZE rather than NBPG.
 1.20 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.19 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.16 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.15 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.14 05-Sep-2001  tsutsui branches: 1.14.6;
obio_find_mapping() takes PA. (missed in the previous commit)
 1.13 05-Sep-2001  tsutsui - vm_offset_t -> [pv]addr_t
- vm_size_t -> vsize_t
- remove register prefixes
 1.12 02-Nov-2000  tsutsui branches: 1.12.4;
Fix typo in comment.
 1.11 06-Apr-1999  gwr branches: 1.11.2; 1.11.8;
Add the address of the DMA gate array (used by the esp driver).
 1.10 08-Feb-1998  gwr Improve some diagnostics.
 1.9 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.8 12-Jan-1998  thorpej branches: 1.8.4;
Update for config changes.
 1.7 04-Oct-1997  gwr Move the call to cninit() up a level (easier to find).
 1.6 28-Apr-1997  gwr branches: 1.6.4;
Add a comment about obio_mapin().
 1.5 25-Apr-1997  gwr Change the OBIO address probe order a little, to allow determination of
which kind of idprom and clock we have (3/80 vs 3/470 differences).
Fix a bug where obio_submatch() failed to copy some locators.
Rename obio_alloc to obio_mapin. Add lots of comments.
 1.4 21-Feb-1997  gwr Add OBIO_EMULEX_SCSI, and some comments about attach order.
 1.3 27-Jan-1997  gwr branches: 1.3.4;
Kill sunmon.h
 1.2 25-Jan-1997  gwr Use sunmon_abort() instead of mon_panic().
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.3.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.6.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.11.8.1 22-Nov-2000  bouyer Sync with HEAD.
 1.11.2.2 06-Apr-1999  gwr Add the address of the DMA gate array (used by the esp driver).
 1.11.2.1 06-Apr-1999  gwr file obio.c was added on branch netbsd-1-4 on 1999-04-06 02:07:52 +0000
 1.12.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.12.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.14.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.14.6.1 05-Sep-2001  nathanw file obio.c was added on branch nathanw_sa on 2002-10-18 02:40:27 +0000
 1.21.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.21.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.22.8.1 29-Apr-2005  kent sync with -current
 1.24.2.4 07-Dec-2007  yamt sync with head
 1.24.2.3 26-Feb-2007  yamt sync with head.
 1.24.2.2 30-Dec-2006  yamt sync with head.
 1.24.2.1 21-Jun-2006  yamt sync with head.
 1.26.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.26.20.2 09-Feb-2007  ad Sync with HEAD.
 1.26.20.1 18-Nov-2006  ad Sync with head.
 1.29.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.29.24.1 09-Jan-2008  matt sync with HEAD
 1.29.22.1 03-Dec-2007  joerg Sync with HEAD.
 1.29.6.1 03-Dec-2007  ad Sync with HEAD.
 1.30.18.2 04-May-2009  yamt sync with head.
 1.30.18.1 16-May-2008  yamt sync with head.
 1.30.16.1 18-May-2008  yamt sync with head.
 1.30.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.30.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.31.4.1 03-Jul-2008  simonb Sync with head.
 1.31.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.40.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.30.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32.30.1 30-Oct-2012  yamt sync with head
 1.33.2.1 18-May-2014  rmind sync with head
 1.34.44.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.34.44.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.35.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 06-Apr-1999  gwr branches: 1.6.2; 1.6.144; 1.6.146; 1.6.148;
Add the address of the DMA gate array (used by the esp driver).
 1.5 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.4 25-Apr-1997  gwr branches: 1.4.4;
Rename obio_alloc to obio_mapin, update *_init declarations.
Remove OBIO_P4_REG (not a fixed address, but per-device).
 1.3 09-Apr-1997  jeremy Location of printer port registers for 3/80 was off.
 1.2 27-Jan-1997  gwr Add OBIO_EMULEX_SCSI
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.4.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.6.148.1 16-May-2008  yamt sync with head.
 1.6.146.1 18-May-2008  yamt sync with head.
 1.6.144.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.2 06-Apr-1999  gwr Add the address of the DMA gate array (used by the esp driver).
 1.6.2.1 06-Apr-1999  gwr file obio.h was added on branch netbsd-1-4 on 1999-04-06 02:07:52 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 14-Jan-1997  gwr branches: 1.1.152; 1.1.154; 1.1.156;
Initial revision
 1.1.156.1 16-May-2008  yamt sync with head.
 1.1.154.1 18-May-2008  yamt sync with head.
 1.1.152.1 02-Jun-2008  mjf Sync with HEAD.
 1.123 11-May-2024  andvar s/pmap_bootstap_aalign/pmap_bootstrap_aalign/ in comment.
 1.122 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.121 31-May-2022  andvar fix various typos in comments, documentation and messages.
 1.120 04-May-2022  andvar fix various typos in comments and log messages.
 1.119 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.118 05-Dec-2021  msaitoh s/coresponding/corresponding/ in comment.
 1.117 19-Aug-2020  tsutsui Make sure pmap_kenter_pa(9) handles uncached mappings properly.

Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80
that has been broken since NetBSD 1.6.
Now Xorg 1.20 based Xsun 8bpp color server is confirmed working
on the cgfour(4).

Should be pulled up to netbsd-9.

XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag.
 1.116 05-Mar-2020  msaitoh miscelaneous -> miscellaneous in comment.
 1.115 21-Aug-2019  skrll Spell pmap_bootstrap in comments correctly
 1.114 22-Dec-2016  cherry branches: 1.114.16; 1.114.20;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.113 06-Sep-2013  tsutsui branches: 1.113.6; 1.113.10;
Tab/whitespace cleanup.
 1.112 03-Jun-2011  tsutsui branches: 1.112.2; 1.112.12; 1.112.16;
- 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.111 15-Oct-2010  tsutsui branches: 1.111.2; 1.111.6;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.110 26-Nov-2009  matt branches: 1.110.2; 1.110.4;
Kill proc0paddr. Use lwp0.l_addr instead.
 1.109 21-Nov-2009  rmind Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage.
 1.108 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.107 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.106 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.105 25-Apr-2009  tsutsui Remove an extra whitespace.
 1.104 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.103 18-Mar-2009  cegger bcopy -> memcpy
 1.102 18-Mar-2009  cegger bzero -> memset
 1.101 10-Dec-2008  pooka branches: 1.101.2;
Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.100 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.99 28-Apr-2008  martin branches: 1.99.6; 1.99.8;
Remove clause 3 and 4 from TNF licenses
 1.98 17-Oct-2007  garbled branches: 1.98.16; 1.98.18; 1.98.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.97 18-May-2007  tsutsui branches: 1.97.10;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).
 1.96 12-Mar-2007  ad branches: 1.96.2; 1.96.8;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.95 22-Feb-2007  thorpej branches: 1.95.4;
TRUE -> true, FALSE -> false
 1.94 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.93 24-Nov-2006  christos branches: 1.93.4;
fix spelling of accommodate; from Zapher.
 1.92 20-Sep-2006  tsutsui - move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
 1.91 16-Sep-2006  tsutsui branches: 1.91.2;
Handle unwiring page cases properly in pmap_enter(9) and pmap_remove(9).
Previously sun3x pmap assumed that pmap_unwire(9) was the only interface
which should handle unwiring page, but nowadays apparently it isn't true.
Fixes a longstanding "panic: get_a_table: out of A tables"
(and also B, C tables) problem on my 3/80.

While here, make this compile with PMAP_DEBUG.
 1.90 10-May-2006  skrll branches: 1.90.6; 1.90.8;
Fix a bunch of cast lvalues.
 1.89 11-Dec-2005  christos branches: 1.89.4; 1.89.6; 1.89.8; 1.89.10; 1.89.12;
merge ktrace-lwp.
 1.88 03-Jun-2005  tsutsui branches: 1.88.2;
Fix shadowing variable warnings.
 1.87 29-May-2005  chs in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.86 22-Jan-2005  chs branches: 1.86.6;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.85 16-May-2004  wiz branches: 1.85.4;
"panicking" needs a k.
 1.84 26-Sep-2003  wiz branches: 1.84.2; 1.84.4;
Process has only one c. From miod@openbsd.
 1.83 15-Jul-2003  lukem __KERNEL_RCSID()
 1.82 23-Jun-2003  martin branches: 1.82.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.81 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.80 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.79 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.78 28-Jan-2003  wiz eventually, not eventualy. Noted by mjl.
 1.77 28-Jan-2003  wiz success, not sucess. Noted by mjl.
 1.76 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.75 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.74 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.73 10-Sep-2001  chris branches: 1.73.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.72 07-Sep-2001  tsutsui Fix function names in panic messages.
 1.71 05-Sep-2001  tsutsui branches: 1.71.2;
bcopy() -> memcpy(), bzero() -> memset()
 1.70 20-Aug-2001  wiz precede, not preceed.
 1.69 03-Jul-2001  chs branches: 1.69.2;
vm_offset_t -> [pv]addr_t.
implement pmap_k{enter_pa,remove}() correctly.
general cleanup.
 1.68 19-Jun-2001  wiz `existent', not `existant'
 1.67 02-Jun-2001  chs replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.66 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.65 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.64 23-Apr-2001  thorpej Add local prototype for internal pmap_bootstrap_alloc() function.
 1.63 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.62 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.61 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.60 20-Feb-2001  tsutsui branches: 1.60.2;
Adjust only avail_end address rather than reduce
the last bank size of avail_mem[] so that all RAM area
will be dumped in dumpsys().
 1.59 03-Feb-2001  tsutsui Remove declaration of copypage() and zeropage(); they are in <m68k/m68k.h>
 1.58 14-Jan-2001  thorpej splimp() -> splvm()
 1.57 24-Nov-2000  tsutsui PAGE_SIZE on sun3/sun3x is now constant;
Use uvmexp.pagesize itself for its initialization.
 1.56 27-Oct-2000  tsutsui Use pool(9) for pmap structures.
 1.55 21-Oct-2000  tsutsui Initialize pmap->pm_refcount properly in pmap_pinit() and
add simple_locks where pmap->pm_refcount are refered.

This should fix a long-standing "out of space kmem_map" panic bug on sun3x.
 1.54 29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.53 26-Jun-2000  mrg remove/move more mach vm header files:

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

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.52 17-Dec-1999  jeremy branches: 1.52.4;
Renamed a temporary variable in pmap_enter() that conflicted with the
name of the new 'flags' argument, added as part of the new pmap_enter() API.
Added a comment which explains why there are still sun3x-specific flags
being passed in the unused bits of the physical address, and how these flags
are independent of the new 'flags' argument.
 1.51 13-Nov-1999  thorpej Update for pmap_enter() API change. No functional difference.
 1.50 19-Sep-1999  chs branches: 1.50.2; 1.50.4; 1.50.8;
fix something that was missed in the PMAP_NEW cleanup.
 1.49 12-Sep-1999  chs eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.48 08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.47 17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.46 17-Jun-1999  thorpej Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
 1.45 08-Apr-1999  gwr branches: 1.45.2; 1.45.4;
Add opt_ddb.h
 1.44 26-Mar-1999  mycroft Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.
 1.43 24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.42 26-Feb-1999  is sun3 part of fix for PR 6152
 1.41 16-Jan-1999  chuck MNN is no longer optional, remove dead code
 1.40 12-Dec-1998  gwr Fix MACHINE_NEW_NONCONTIG support (UVM works now:)
thanks to Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Closes PR#6540
 1.39 08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.38 09-Jun-1998  gwr First cut at UVM support. Compiles, but not tested yet.
 1.37 09-Jun-1998  gwr First cut at MACHINE_NEW_NONCONTIG - not enabled yet.
 1.36 19-May-1998  thorpej It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
 1.35 09-Feb-1998  jeremy Modified the comments for the recentlty implemented pmap_map() function.
 1.34 08-Feb-1998  gwr Add pmap_map
 1.33 05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.32 22-Jan-1998  gwr branches: 1.32.4;
In pmap_bootstrap_copyprom, copy only the last PTE from the PROM's
DVMA segment (for the page reserved by the PROM). If we copy all
the mappings, pmap_enter_kernel may complain about finding valid
PTEs that are not recorded in our PV lists. Make pmap_remove_pte
do something reasonable if it finds a PTE for a managed page that
has not been recorded in the PV lists. (Plus other minor stuff).
 1.31 22-Jan-1998  gwr Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.
 1.30 02-Jan-1998  thorpej Make pmap_activate() take a proc *.
 1.29 23-Oct-1997  gwr Remove the for-loop that wants to map multiple msgbuf pages.
Multiple msgbuf pages will not work without a redesign of
the kernel VM layout, so let's not pretend we can do it.
 1.28 05-Oct-1997  gwr Do the cpu_kcore_hdr initialization a little differently.
(also fix - was not setting pg_frame, pg_valid)
 1.27 19-Sep-1997  leo Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
 1.26 02-Jul-1997  jeremy branches: 1.26.2;
Implement pmap and va caching within C table managers to help speed
up PV->(pmap,va) operations.
 1.25 10-Jun-1997  veego s/_round_page/m68k_round_page/ s/_trunc_page/m68k_trunc_page/
s/_btop/m68k_btop/ s/_ptob/m68k_ptob/
 1.24 30-May-1997  jeremy Undo changes which make pmap_xxxx_page() functions re-entrant; just block
all interrupts which might cause re-entrancy.

Allow virtual addresses which are not managed by the MI VM system to
participate in the PV system.

Remove a few frivoulous TLB cache flushes.
 1.23 28-May-1997  jeremy Added new lock system for the two virtual pages used in temporary mappings.
Allows pmap_zero_page() and pmap_copy_page() to be re-entrant.
 1.22 20-May-1997  jeremy Implement code to dynamically size the number of page tables based on available
RAM at boot.

Also did some cleanup of unused functions, updated several comments, and
removed unecessary 'XXX's.
 1.21 01-May-1997  gwr Implement pmap_pa_exists() so that /dev/mem works.
This was the reason ps (kvm_getargs) did not work.
 1.20 09-Apr-1997  thorpej Adjust for new kcore.h
 1.19 01-Apr-1997  jeremy Physical page status functions pmap_clear_reference()
and pmap_clear_modify() weren't testing if the page whose status was being
changed was being managed. This caused kernel panics with X11.
 1.18 26-Mar-1997  gwr fix a warning
 1.17 21-Mar-1997  gwr First cut at crashdump support.
 1.16 13-Mar-1997  gwr s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros
 1.15 06-Mar-1997  gwr Get the numbers of kernel MMU tables right.
 1.14 06-Mar-1997  gwr Clean out some junk I forgot to remove last time...
 1.13 06-Mar-1997  gwr Add pmap_bootstrap_setprom() with sets the PROM level-A tables to
allow the PROM monitor to see mappings in kernel space. This also
fixes a problem with exiting to the monitor with the stack pointer
set to some place in kernel space. Also fix NUM_KERN_PTES, and
change get_pte() so it works on any virtual address.
 1.12 02-Mar-1997  jeremy Took switch statement out of main loop in pmap_protect() and explained more
of the rationale behind it.
 1.11 22-Feb-1997  jeremy Rewrite pmap_remove() to be speedier with large address spaces.
 1.10 19-Feb-1997  jeremy Update copyright and fix typos in macro definition used when not debugging.
 1.9 16-Feb-1997  gwr Fix a major bug in pmap_remove_kernel() that causd the removal of
one page too many (worse, it unmapped our stack page... Ouch!)
Also, use loadcrp() and such instead of calling pmap_activate
in various places so we have more control over TLB flush.
Now pmap_activate() is called only by locore (and that call is
done only if PMAP_DEBUG is defined). Other minor clean-up...
 1.8 14-Feb-1997  gwr Add pmap_count(), fix some bugs... (from Jeremy).
 1.7 12-Feb-1997  gwr Latest version from Jeremy. Changes too numerous to describe here.
 1.6 02-Feb-1997  thorpej branches: 1.6.4;
Use copypage() and zeropage() in the right places.
 1.5 27-Jan-1997  gwr Change "machdep.h" to <machine/machdep.h>
 1.4 17-Jan-1997  gwr Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
 1.3 16-Jan-1997  gwr Move declaration of struct mmu_rootptr to mc68851.h
Kill a cast that is now unnecessary.
 1.2 14-Jan-1997  gwr Punt some historical stuff that was ifdefed out.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.6.4.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.26.2.2 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.26.2.1 22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.32.4.1 27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.45.4.2 02-Aug-1999  thorpej Update from trunk.
 1.45.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.45.2.2 17-Jan-2001  he Pull up revision 1.55 (requested by tsutsui):
Properly handle pmap->pm_refcount (initialize and lock before
access). Should fix long-standing "out of space in kmem_map"
bug on sun3x.
 1.45.2.1 08-Apr-1999  he file pmap.c was added on branch netbsd-1-4 on 2001-01-17 16:37:46 +0000
 1.50.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.50.4.1 15-Nov-1999  fvdl Sync with -current
 1.50.2.8 23-Apr-2001  bouyer Sync with HEAD.
 1.50.2.7 27-Mar-2001  bouyer Sync with HEAD.
 1.50.2.6 12-Mar-2001  bouyer Sync with HEAD.
 1.50.2.5 11-Feb-2001  bouyer Sync with HEAD.
 1.50.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.50.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.50.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.50.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.52.4.1 21-Oct-2000  tv Pullup 1.55 [tsutsui]:
Initialize pmap->pm_refcount properly in pmap_pinit() and
add simple_locks where pmap->pm_refcount are refered.

This should fix a long-standing "out of space kmem_map" panic bug on sun3x.
 1.60.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.60.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.69.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.69.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.69.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.71.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.73.4.6 11-Nov-2002  nathanw Catch up to -current
 1.73.4.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.73.4.4 24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.73.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.73.4.2 18-Nov-2001  scw MD Scheduler Activation bits for sun3/3x.
Compile-tested only.
 1.73.4.1 10-Sep-2001  scw file pmap.c was added on branch nathanw_sa on 2001-11-18 19:39:05 +0000
 1.82.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.82.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.82.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.82.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.82.2.1 03-Aug-2004  skrll Sync with HEAD
 1.84.4.1 08-Jun-2005  tron Pull up revision 1.87 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.84.2.1 08-Jun-2005  tron Pull up revision 1.87 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.85.4.1 29-Apr-2005  kent sync with -current
 1.86.6.2 23-Oct-2006  ghen Pull up following revision(s) (requested by tsutsui in ticket #1518):
sys/arch/sun3/sun3x/pmap.c: revision 1.91
sys/arch/sun3/sun3x/pmap.c: revision 1.88
Fix shadowing variable warnings.
Handle unwiring page cases properly in pmap_enter(9) and pmap_remove(9).
Previously sun3x pmap assumed that pmap_unwire(9) was the only interface
which should handle unwiring page, but nowadays apparently it isn't true.
Fixes a longstanding "panic: get_a_table: out of A tables"
(and also B, C tables) problem on my 3/80.
While here, make this compile with PMAP_DEBUG.
 1.86.6.1 06-Jun-2005  tron Pull up revision 1.87 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.88.2.4 03-Sep-2007  yamt sync with head.
 1.88.2.3 26-Feb-2007  yamt sync with head.
 1.88.2.2 30-Dec-2006  yamt sync with head.
 1.88.2.1 21-Jun-2006  yamt sync with head.
 1.89.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.89.10.1 11-May-2006  elad sync with head
 1.89.8.1 24-May-2006  yamt sync with head.
 1.89.6.1 01-Jun-2006  kardel Sync with head.
 1.89.4.1 09-Sep-2006  rpaulo sync with head
 1.90.8.2 12-Jan-2007  ad Sync with head.
 1.90.8.1 18-Nov-2006  ad Sync with head.
 1.90.6.1 23-Sep-2006  snj Pull up following revision(s) (requested by tsutsui in ticket #171):
sys/arch/sun3/sun3x/pmap.c: revision 1.91
Handle unwiring page cases properly in pmap_enter(9) and pmap_remove(9).
Previously sun3x pmap assumed that pmap_unwire(9) was the only interface
which should handle unwiring page, but nowadays apparently it isn't true.
Fixes a longstanding "panic: get_a_table: out of A tables"
(and also B, C tables) problem on my 3/80.
While here, make this compile with PMAP_DEBUG.
 1.91.2.2 10-Dec-2006  yamt sync with head.
 1.91.2.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.93.4.2 24-Mar-2007  yamt sync with head.
 1.93.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.95.4.2 27-May-2007  ad Sync with head.
 1.95.4.1 13-Mar-2007  ad Sync with head.
 1.96.8.1 22-May-2007  matt Update to HEAD.
 1.96.2.1 11-Jul-2007  mjf Sync with head.
 1.97.10.1 06-Nov-2007  matt sync with HEAD
 1.98.20.4 11-Mar-2010  yamt sync with head
 1.98.20.3 19-Aug-2009  yamt sync with head.
 1.98.20.2 04-May-2009  yamt sync with head.
 1.98.20.1 16-May-2008  yamt sync with head.
 1.98.18.1 18-May-2008  yamt sync with head.
 1.98.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.98.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.99.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.99.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.99.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.101.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.110.4.2 12-Jun-2011  rmind sync with head
 1.110.4.1 05-Mar-2011  rmind sync with head
 1.110.2.2 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.110.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.111.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.111.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.112.16.1 18-May-2014  rmind sync with head
 1.112.12.2 03-Dec-2017  jdolecek update from HEAD
 1.112.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.112.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.113.10.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.113.6.1 05-Feb-2017  skrll Sync with HEAD
 1.114.20.1 26-Aug-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #1060):

sys/arch/sun3/sun3x/pmap.c: revision 1.117

Make sure pmap_kenter_pa(9) handles uncached mappings properly.

Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80
that has been broken since NetBSD 1.6.

Now Xorg 1.20 based Xsun 8bpp color server is confirmed working
on the cgfour(4).

Should be pulled up to netbsd-9.

XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag.
 1.114.16.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.114.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16 06-Sep-2013  tsutsui Tab/whitespace cleanup.
 1.15 28-Apr-2008  martin branches: 1.15.34; 1.15.44; 1.15.50;
Remove clause 3 and 4 from TNF licenses
 1.14 20-Sep-2006  tsutsui branches: 1.14.52; 1.14.54; 1.14.56;
- move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
 1.13 11-Dec-2005  christos branches: 1.13.20; 1.13.22;
merge ktrace-lwp.
 1.12 22-Jan-2005  chs branches: 1.12.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.11 26-Sep-2003  tsutsui branches: 1.11.8;
TAB/space cleanup.
 1.10 23-Jun-2003  martin branches: 1.10.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.9 05-Sep-2001  tsutsui branches: 1.9.6;
vm_offset_t -> [pv]addr_t (sync with sun3x/pmap.c rev 1.69)
 1.8 19-Sep-1999  chs branches: 1.8.16;
fix a prototype that was missed in the pmap_extract() API change.
 1.7 17-Dec-1997  jeremy Pad out table manager structures so that all the members in the contiguous
table manager array allocated in pmap_startup() are properly aligned for
faster bus access.
 1.6 02-Jul-1997  jeremy branches: 1.6.6;
Implement pmap and va caching within C table managers to help speed
up PV->(pmap,va) operations.
 1.5 21-Mar-1997  gwr First cut at crashdump support.
 1.4 05-Mar-1997  gwr Add pmap_bootstrap_setprom
 1.3 14-Feb-1997  gwr Add pmap_count(), fix some bugs... (from Jeremy).
 1.2 12-Feb-1997  gwr Latest version from Jeremy. Changes too numerous to describe here.
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr branches: 1.1.1.1.6;
Initial import. Gets as far as nfs_mountroot.
 1.1.1.1.6.1 12-Mar-1997  is Merge in Changes from The Trunk.
 1.6.6.1 18-Dec-1997  mellon Pull rev 1.7 up from trunk (jeremy)
 1.8.16.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.9.6.2 05-Sep-2001  tsutsui vm_offset_t -> [pv]addr_t (sync with sun3x/pmap.c rev 1.69)
 1.9.6.1 05-Sep-2001  tsutsui file pmap_pvt.h was added on branch nathanw_sa on 2001-09-05 12:15:22 +0000
 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.12.8.1 30-Dec-2006  yamt sync with head.
 1.13.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.13.20.1 18-Nov-2006  ad Sync with head.
 1.14.56.1 16-May-2008  yamt sync with head.
 1.14.54.1 18-May-2008  yamt sync with head.
 1.14.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.50.1 18-May-2014  rmind sync with head
 1.15.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 06-Sep-2013  tsutsui branches: 1.17.44;
Tab/whitespace cleanup.
 1.16 13-Oct-2012  tsutsui branches: 1.16.2;
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
 1.15 28-Jun-2008  tsutsui branches: 1.15.30; 1.15.40;
Split softc/device_t, 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 03-Feb-2007  tsutsui branches: 1.13.44; 1.13.46; 1.13.48;
Add bus_space(9) and bus_dma(9) glue to sun3 MD VME attachment
to test these APIs on TME.

XXX I hope these sun3 MD VME stuff will be replaced by MI VME driver soon.
 1.12 28-Mar-2006  thorpej branches: 1.12.8;
Use device_unit().
 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 30-Jun-2005  drochner branches: 1.10.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.9 22-Jan-2005  chs 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 02-Oct-2002  thorpej branches: 1.7.6;
Add trailing ; to CFATTACH_DECL.
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 05-Feb-1998  gwr branches: 1.4.28; 1.4.32;
Merge arch/sun3x into arch/sun3
 1.3 12-Jan-1998  thorpej branches: 1.3.4;
Update for config changes.
 1.2 16-Oct-1997  gwr Add VME support
 1.1 14-Jan-1997  gwr branches: 1.1.1;
Initial revision
 1.1.1.1 14-Jan-1997  gwr Initial import. Gets as far as nfs_mountroot.
 1.3.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.4.32.1 18-Oct-2002  nathanw Catch up to -current.
 1.4.28.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.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.8.8.1 29-Apr-2005  kent sync with -current
 1.10.2.2 26-Feb-2007  yamt sync with head.
 1.10.2.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.8.1 09-Feb-2007  ad Sync with HEAD.
 1.13.48.2 04-May-2009  yamt sync with head.
 1.13.48.1 16-May-2008  yamt sync with head.
 1.13.46.1 18-May-2008  yamt sync with head.
 1.13.44.2 29-Jun-2008  mjf Sync with HEAD.
 1.13.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.4.1 03-Jul-2008  simonb Sync with head.
 1.14.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.15.40.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.30.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.15.30.1 30-Oct-2012  yamt sync with head
 1.16.2.1 18-May-2014  rmind sync with head
 1.17.44.3 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.17.44.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.17.44.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.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 05-Feb-1998  gwr branches: 1.2.150; 1.2.152; 1.2.154;
Merge arch/sun3x into arch/sun3
 1.1 16-Oct-1997  gwr branches: 1.1.4;
VME support
 1.1.4.1 27-Jan-1998  gwr Support the new vme bus autoconfig design, etc.
 1.2.154.1 16-May-2008  yamt sync with head.
 1.2.152.1 18-May-2008  yamt sync with head.
 1.2.150.1 02-Jun-2008  mjf Sync with HEAD.

RSS XML Feed